Digital Image Processing Practical Approach Borko Furht instant download
Digital Image Processing Practical Approach Borko Furht instant download
https://textbookfull.com/product/digital-image-processing-
practical-approach-borko-furht/
https://textbookfull.com/product/digital-image-processing-a-
signal-processing-and-algorithmic-approach-1st-edition-d-
sundararajan-auth/
https://textbookfull.com/product/digital-image-enhancement-
restoration-and-compression-digital-image-processing-and-
analysis-for-true-epub-scott-e-umbaugh/
https://textbookfull.com/product/computer-vision-and-image-
analysis-digital-image-processing-and-analysis-4th-edition-scott-
e-umbaugh/
https://textbookfull.com/product/introductory-digital-image-
processing-a-remote-sensing-perspective-john-r-jensen-dr-kalmesh-
lulla/
Image operators image processing in Python First
Edition Kinser
https://textbookfull.com/product/image-operators-image-
processing-in-python-first-edition-kinser/
https://textbookfull.com/product/mathematical-image-processing-
kristian-bredies/
https://textbookfull.com/product/digital-image-watermarking-
theoretical-and-computational-advances-intelligent-signal-
processing-and-data-analysis-1st-edition-borra/
https://textbookfull.com/product/sensor-projects-with-raspberry-
pi-internet-of-things-and-digital-image-processing-1st-edition-
guillermo-guillen/
https://textbookfull.com/product/computing-colour-image-
processing-alan-parkin/
SPRINGER BRIEFS IN COMPUTER SCIENCE
Borko Furht
Esad Akar · Whitney Angelica Andrews
Digital Image
Processing:
Practical
Approach
123
SpringerBriefs in Computer Science
Series Editors
Stan Zdonik, Brown University, Providence, Rhode Island, USA
Shashi Shekhar, University of Minnesota, Minneapolis, Minnesota, USA
Xindong Wu, University of Vermont, Burlington, Vermont, USA
Lakhmi C. Jain, University of South Australia, Adelaide, South Australia, Australia
David Padua, University of Illinois Urbana-Champaign, Urbana, Illinois, USA
Xuemin Sherman Shen, University of Waterloo, Waterloo, Ontario, Canada
Borko Furht, Florida Atlantic University, Boca Raton, Florida, USA
V. S. Subrahmanian, University of Maryland, College Park, Maryland, USA
Martial Hebert, Carnegie Mellon University, Pittsburgh, Pennsylvania, USA
Katsushi Ikeuchi, University of Tokyo, Tokyo, Japan
Bruno Siciliano, Università di Napoli Federico II, Napoli, Italy
Sushil Jajodia, George Mason University, Fairfax, Virginia, USA
Newton Lee, Newton Lee Laboratories, LLC, Burbank, California, USA
SpringerBriefs present concise summaries of cutting-edge research and practical
applications across a wide spectrum of fields. Featuring compact volumes of 50 to
125 pages, the series covers a range of content from professional to academic.
Typical topics might include:
• A timely report of state-of-the art analytical techniques
• A bridge between new research results, as published in journal articles, and a
contextual literature review
• A snapshot of a hot or emerging topic
• An in-depth case study or clinical example
• A presentation of core concepts that students must understand in order to make
independent contributions
Briefs allow authors to present their ideas and readers to absorb them with
minimal time investment. Briefs will be published as part of Springer’s eBook
collection, with millions of users worldwide. In addition, Briefs will be available
for individual print and electronic purchase. Briefs are characterized by fast, global
electronic dissemination, standard publishing contracts, easy-to-use manuscript
preparation and formatting guidelines, and expedited production schedules. We
aim for publication 8-12 weeks after acceptance. Both solicited and unsolicited
manuscripts are considered for publication in this series.
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface
This book is intended for beginners in the field who would like to understand the
basic concepts of digital image processing and apply them in programming some
fundamental digital image processing algorithms. It is our assumption that the reader
has some background in programming including the basics of C and C++. The book
is of practical nature, and the fundamental concepts of image processing discussed in
each chapter are showcased with demo programs. The reader is encouraged to
understand and run these programs as well as create similar programs proposed in
the book.
The book consists of ten chapters. The book begins with the introduction to image
concept, classification of images, and various image formats. Then, it follows up
with Chaps. 2 and 3 on creating user interface and image loading and rendering.
After successfully completing and understanding these concepts, the reader will be
able to begin writing basic programs in image processing. In Chaps. 4 and 5, we
introduce some relatively simple image processing techniques, such as creating
image histograms and detecting changes in colors and present programs that accom-
plish these techniques. Chapters 6 and 7 introduce more complex image processing
problems and their solutions including lossless image compression and similarity-
based image retrieval.
When completing these chapters and related programming examples, the reader
will be able to understand and write some exciting image processing applications.
Lastly, Chaps. 8, 9, and 10 present three applications including how to hide data in
digital images, how to create a transition from one to another image, and how to
embed one image into another image with resizing. Chapters 11, 12, and 13 were
completed by students as part of Introduction to Image and Video Processing class at
Florida Atlantic University taught in Spring 2018.
v
vi Preface
The book can be used as a practical textbook for basic courses on image
processing. The main features of the book can be summarized as follows:
1. The book describes the basic concept of digital image processing.
2. The focus of the book is practical programming examples of fundamental image
processing algorithms.
3. Link to complete programs allows readers to run, test programs, and design
various image processing solutions. The libraries used in this book can be
found at https://github.com/scarface382/libraries, and source code for all pro-
grams described in the book can be found at http://github.com/scarface382/
multimedia-examples.
vii
viii Contents
the layer information is not stored so the areas where the layers overlap are forced in
a single stream of pixels instead of two. In applications such as Internet browsers that
render images to the screen, images with RGBA channels inform the application
how the image should be displayed when it is displayed over any background image
e.g. a solid background color or another image.
Digital cameras typically contain filters with three sensors for each color compo-
nent in RGB. The light source captured by the lenses is processed through the color
1.1 Image Concept 3
Mirrors and
Light splitter Red Sensor Amplifier R
RGB Monitor
Scene
Lens G
Green Sensor Amplifier
B
Blue Sensor Amplifier
Fig. 1.4 Three-sensor RGB color video camera and TGB monitor
filter, which produces RGB component values for every pixel. The captured RGB
values then can be displayed using a RGB monitor as illustrated in Fig. 1.4.
Another color model often used in digital image and video processing is UYV
color model, which describes color perception and consists of one luminance
component (Y) and two chrominance components (U and V). The YUV image
representation can be created from RGB presentation using the following approxi-
mate mathematical description:
The YUV color model consists of a luminance component Y, which captures the
brightness of the pixel, and two chrominance components, U and V, that capture
color information.
When R ¼ G ¼ B then Y ¼ R ¼ G ¼ B, which is a grayscale image. In summary,
to convert a full color RGB image into a grayscale image, the following approximate
formula can be used:
4 1 Introduction to Digital Imaging
This formula will be used in subsequent chapters when dealing with grayscale
images.
As we already discussed, an image is defined using pixels. The resolution (R) defines
the total number of pixels in an image as:
R¼nm
Here are two examples of calculating the number of pixels and the memory for
two types of images:
(a) For a 640 480 VGA pixel image with 240 bit color, the number of pixels is
640 480 ¼ 307,200 pixels. The memory required to store the image is:
M ¼ 307,200 pixels 3 bytes ¼ 921,600 bytes ¼ 921.600 KB
(b) For a high-definition image 1920 1800, the number of pixels is
1920 1800 ¼ 2,073,600 pixels, and the required memory to store the image is:
M ¼ 2,073,600 pixels 3 bytes ¼ 6,220,000 bytes ¼ 6.22 MB
In this chapter we discussed the basics of digital images. Digital images are
composed of pixels where different color models, such as RGB and YUV, can be
used to represent color values.
Chapter 2
Creating User Interface
Every chapter in this book includes a demo program to explain the material, the
theory behind digital image topics, and provides code that the reader can run and
manipulate. Instead of writing command line demo programs with little user inter-
action, we opted to write programs with a User Interface (UI) that includes essential
UI elements such as buttons, sliders, and ability to display images on the screen.
Thus, in this chapter, we present the UI library we have chosen to use and how to use
it in the context of the digital image programming.
The UI library we selected for all the projects is ImGui, which is an open-source
library written in C++ with MIT license. ImGui is defined on its GitHub page as a
bloat-free graphical user interface library for C++. It outputs optimized vertex
buffers that you can render anytime in your 3D-pipeline enabled application and
can be found at http://github.com/ocornut/imgui.
ImGui is different than the traditional UI C++ libraries. The internals of ImGui
resembles a state-machine instead. There are no classes for each UI class objects
such as a button, a text box, a window, etc. There is no need to create separate files
for UI code or the main logic code. Each function resides in the ImGui namespace
and the order of objects to be rendered are dictated by the order of function calls
made. A bit more experience with graphics programing is needed, however, to be
able to use it. There exists no framework that renders the vertex buffers ImGui
creates, so the programmer needs to create a window context, initialize graphics
libraries (OpenGL in our case), and write the code for transferring user input such as
key strokes and mouse clicks over to ImGui for processing. For OpenGL initializa-
tion, we use the GLEW library.
For creating a window and processing user input, we make use of GLFW, another
useful wrapper library. To learn more about GLEW and GLFW, visit glew.
sourceforge.net and glfw.org. The maintainers of ImGui have already provided a
full implementation that uses GLEW and GLFW so we made use of that. To observe
how ImGui interacts with GFLW, read imgui_glfw.h and observe how user input is
processed and vertex buffers are rendered in the graphics pipeline.
All the code for UI is inside the main ‘forever’ loop featured in the code text box.
ImGui gives the ability to create multiple windows inside one OS windows. Win-
dows and groups are created by making begin and end calls. To create a new ImGui
window, a call to ImGui::Begin(. . .) is made. Next, any UI object is created by
calling the necessary function. A button with label ‘click me’ simply requires
ImGui::Button(“click me”) call. When a user click on that button, the function
returns true, so putting the ImGui::Button(. . .) call in an if statement lets the
programmer write the code for the button click event. Once all objects are put into
the rendering list by their respective ImGui calls, a final ImGui::End() call is made.
At the end of the main loop, ImGui::Render() is called, buffers are switched,
rendered, and put to the screen.
We present next a simple example program. With the help of glfw, glew, and
ImGui libraries, the program creates an UI window, which contains a single button
and a text area. Each time the user clicks the button, the number is incremented in the
text area; refer to Fig. 2.1.
The function calls between the start of main and the while loop initializes GLFW
and GLEW libraries and creates an OS window that we can use to render our UI. The
while-loop will run forever as long as the user does not close the window. If a
terminate message makes it way from the OS to the GLFW context, the
glfwWindowShouldClose(window) statement will return true, end the while loop,
initiate cleanup, and terminate the program.
At the start of the loop once user input is polled with glfwPollEvents()
and ImGui is informed that a new frame is being rendered with
ImGui_ImplGlfwGL3_NewFrame(), we can begin calling the necessary UI func-
tions for window display. In this example, we create a window that includes a button
and a text area that displays the current x value. The x value initially has a value of
zero, but with each click of the button, the value of x is incremented by one. To
render our UI components to the screen, we call a few more functions. After fetching
the OS window size, we tell OpenGL to clear the screen with the already defined
vector clear_color. Then, ImGui::Render() renders whatever UI component function
we previously called (ImGui window, button, text, etc.) and glfwSwapBuffers
(window) makes the changes on the screen. This pattern of library initialization,
loop, and cleanup is present throughout all the projects in the following chapters.
The program shown next includes library initializations, main loop, ImGui calls, and
rendering.
2 Creating User Interface 9
// UI example code
// ImGui headers
#include <image.h>
#include <imgui/local.h>
int main()
{
// Setup window
glfwSetErrorCallback(error_callback);
if (!glfwInit())
return 1;
// OpenGl version 3
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
// main loop
while (!glfwWindowShouldClose(window)) {
// UI components
ImGui::Begin("any window title");
if (ImGui::Button("CLICK ME"))
x++;
ImGui::Text("X: %d", x);
ImGui::End();
// window size
int display_w, display_h;
glfwGetFramebufferSize(window, &display_w, &display_h);
// finally render
ImGui::Render();
glfwSwapBuffers(window);
}
// Cleanup
ImGui_ImplGlfwGL3_Shutdown();
glfwTerminate();
}
10 2 Creating User Interface
For every chapter in this book, we have written one or two demo programs in C++ to
go along with the explanation of each topic. To successfully compile and run each
program, let us discuss the steps of acquiring a C++ compiler, libraries we used, and
the source code for the demo programs. The programs were compiled using Win-
dows 7, 9 and 10 so if you are running Linux or MacOS checkout the GitHub
repository of ImGui for instructions on how to compile on these platforms.
The source code for the demo programs can be found on GitHub by downloading
the repository (github.com/scarface382/multimedia-examples). You can unzip the
file in any location in your computer. Each folder corresponds to a chapter in this
book and contains the files for the source code and a makefile which contains
information of where libraries are located and what compiler flags needs to be
passed on to the compiler. Here is the content of the makefile for this chapter:
LIBDIR = C:/libraries/lib
LIB = -L $(LIBDIR) -lOpenGL32
DLL = $(LIBDIR)/libglew32.dll.a $(LIBDIR)/libglfw3dll.a
INC = C:/libraries/include
IMGUI = $(INC)/imgui/imgui.cpp $(INC)/imgui/imgui_draw.cpp
all:
g++ -std=c++11 main.cpp $(IMGUI) -I $(INC) $(DLL) $(LIB) -o demo
The library repository, which includes ImGui, GLEW, GLFW, and the utility
functions, are used in the demo programs and can be found at (https://github.com/
scarface382/libraries). Make sure to download and move the content of this repos-
itory to C:/libraries.
To make installing both g++ and make programs easier for you, we’ve also
included an installation application mingw-w64-install in the libraries repository.
When you run the installation, make sure that you select x_86 architecture if your
computer has a 64-bit architecture (almost all new computers do) under installation
settings. For the destination folder, install everything under C:/mingw. Once you are
done with installation, rename mingw32-make.exe to make.exe under C:/mingw/
mingw64/bin. This is so that we don’t have to keep typing mingw32-make every
time we want to run a makefile script to compile a program.
At this point, we have acquired our compiler, source code, and all the necessary
libraries but we are not ready to compile the code yet. We need to add the path of our
libraries folder and the location of our compiler and make program to the global
environment variables of Windows so that when we compile by running make in the
console, the make program along with g++ can be located. To add these paths,
simply run these two commands in your console ran as administrator:
2.1 Compiling the Program 11
Finally, we are ready to compile. Open a new console and change working
directory to the directory of the demo program for first chapter then run:
make
The code should be compiled by g++ and it should output a new executable with
the name ‘demo.exe’.
We have discussed the UI library that we used in demo programs and how to
acquire and compile the source code for all the chapters. In the next chapter we
discuss how images are decoded, loaded, and rendered.
Chapter 3
Image Loading and Rendering
JPEG and PNG are some of the most popular digital image file types. Pixel values
are compressed with some form of compression in these file, and as a result it is not
possible to open a digital image file and directly read the pixel values. The image
must be first be decoded, which returns the decompressed pixel values along with
other necessary information such as image resolution. For this task, we use
stb_image.h written by Sean Barrett which is an image loader library that can decode
images and extract pixel values from JPEG and PNG files (https://github.com/
nothings/stb).
To handle image files with ease in accordance with this library, we use the struct
definition below for all loaded image files:
struct Image
{
uint8* pixels = NULL; // 8-bit unsigned integer
GLuint texture;
int texture_loaded = 0;
int width;
int height;
int n; //number of color channels, can be 3 (RGB) or 4 (RGBA)
};
This definition contains all the information of an image that we need: the pixel
value, the texture, the width, the height, and the number of color channels. The struct
allows easy access to the images attributes which is especially convenient when
handling multiple images at the same time.
stb_image.h is a single header file that contains all the functions that we need.
Include this header file at the start of any program, with this macro definition:
#define STB_IMAGE_IMPLEMENTATION
#include <stb/stb_image.h>
The #define tells stb_image.h that we want access to the functions and not just
function definitions that is located at the top of the file. The function we use the most
from that library is stbi_load. See the following textbox for an example.
free(a.pixels); // cleanup
Notice that we increment i by 4 to skip GBA values and access R values. To clean
up the memory allocated by stbi_load, you can simply call free(a.pixels) or
stbi_image_free(a.pixels) to be fully compliant with stb.
3.3 Creating Texture from Images 15
Loading the image file to memory is necessary if we need to make changes to it, such
as making each R component 112 in the previous example. After manipulation, the
image may be saved to disk using another stb library: stb_image_write.h. Here is the
sample code:
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <stb/stb_image_write.h>
Images can be loaded from the disk to memory using a few lines of code. The next step
is to render them to screen. Since UI rendering is done directly with OpenGL under
ImGui, the loaded image needs to be converted to an OpenGL texture. We have
provided a function texture_image() in imgui/local.h file that generates an image
texture given an Image struct. Observe that in the Image struct, there are two texture
related members: texture and texture_loaded. These members are filled out with the
necessary texture information to pass onto ImGui for rendering. The following
example creates an ImGui window, loads, and displays an image the user has selected
from their computer by click “Select Image” button, as illustrated in Fig. 3.1.
while (!glfwWindowShouldClose(window))
{
glfwPollEvents();
ImGui_ImplGlfwGL3_NewFrame();
ImGui::Begin("Slider Window");
if (a.texture_loaded)
ImGui::Image((void*)a.texture, resize_ui(a.width, a.height, 300));
if (ImGui::Button("Select Image"))
ImGui::OpenPopup("select 0");
if (tmp != "") {
reset_image(&a);
a.pixels = stbi_load(tmp.c_str(), &a.width, &a.height, &a.n, RGBA);
texture_image(&a);
free_image(&a);
}
ImGui::End();
// Gl Rendering
int display_w, display_h;
glfwGetFramebufferSize(window, &display_w, &display_h);
glViewport(0, 0, display_w, display_h);
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
glClear(GL_COLOR_BUFFER_BIT);
ImGui::Render();
glfwSwapBuffers(window);
}
// cleanup...
Note that in the code section, we have skipped important steps such as including
header files, writing the main function, creating the window, polling input, writing
the rendering, and the cleanup code. Without the inclusion of those components the
program will not compile (see the previous UI chapter for examples and explana-
tions for those components). As always, you can examine the code in the source file
we have written for this chapter.
When the image selection button is clicked, image_select() function is called and
a pop up with a list of files in the directory of the executable file opens. The user can
navigate through the folders and go up one directory by clicking the “..” at the top of
the list. Once a file is selected, the name of the file is returned and is passed to
stbi_load() for image file loading.
3.4 Converting Color to Grayscale Images 17
Now that we’ve shown how to load and render an image, let’s discuss the details of
coding the simple image processing task of converting color images to grayscale. As
we discussed in Chap. 1, to convert a color pixel to a grayscale, we need to apply the
luminance value of the pixel to every component in RGB using this formula:
The program written for this section works the same as the previous ImGui but it
displays a second, grayscale image next to the original when the user selects an
image, as can be seen in Fig. 3.2.
while (!glfwWindowShouldClose(window))
{
glfwPollEvents();
ImGui_ImplGlfwGL3_NewFrame();
ImGui::Begin("Slider Window");
if (ImGui::Button("Select Image"))
ImGui::OpenPopup("select 0");
std::string tmp = image_select(0); //opens the file list and assigns to tmp
if (tmp != "") {
reset_image(&a);
reset_image(&b);
a.pixels = stbi_load(tmp.c_str(), &a.width, &a.height, &a.n, RGBA);
texture_image(&a);
// allocate new memory for grayscale image and convert image to grayscale
int length = a.width * a.height * RGBA;
b.pixels = (uint8*)malloc(length);
b.width = a.width;
b.height = a.height;
b.n = a.n;
float R = a.pixels[i];
float G = a.pixels[i+1];
float B = a.pixels[i+2];
float A = a.pixels[i+3];
b.pixels[i] = Y;
b.pixels[i+1] = Y;
b.pixels[i+2] = Y;
b.pixels[i+3] = A;
}
texture_image(&b);
}
3.4 Converting Color to Grayscale Images 19
ImGui::End();
// Gl Rendering
int display_w, display_h;
glfwGetFramebufferSize(window, &display_w, &display_h);
glViewport(0, 0, display_w, display_h);
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
glClear(GL_COLOR_BUFFER_BIT);
ImGui::Render();
glfwSwapBuffers(window);
}
The code for this program is an extension to the previous demo. Just as before,
when an image file is selected, the image is loaded and is given a new to texture
which is used to render the image. The next part is new and handles the allocation of
enough memory for the grayscale image and the conversion to grayscale of the
loaded image. The ‘for loop’ iterates over every color component of the original
image and access each RGBA component of every pixel. Next, the luminance Y
value is computed and assigned to each color component of the grayscale image. At
the end of the loop, a texture is created for the grayscale image which gets rendered
in the next iteration of the while loop under the very first if statement.
By knowing how to load and display image file in our UI programs, we are now
ready to discuss more topics and ideas on digital image processing and write
programs to put these ideas to the test.
Chapter 4
Creating Image Histograms
In this chapter, we discuss the basics on how to create color histograms for images. A
histogram is a graphical representation of the number of pixels in an image. As an
example, assume a 10 6 pixel image shown in Fig. 4.1. The pixels are one-byte
data, and their values are between 0 and 255. The histogram for this simple image is
shown in Fig. 4.2.
Color histogram is a representation of the distribution of colors in an image. To
calculate the frequency of each color component, we simply increment a counter for
every RGB component value between 0 and 255. All we need is three arrays of size
256 indexes. We iterate over each component in RGB and using the component
value as the index, we increment the counter in the array. You can observe how to do
this in code excerpt below:
25 32 29 29 36 34 36 27 33 26
28 35 28 36 26 38 26 38 34 31
35 25 26 32 38 29 35 26 36 29
28 32 34 25 32 27 38 30 33 26
26 35 29 27 25 32 35 29 35 37
34 28 32 36 31 29 37 35 25 29
Fig. 4.1 An example of an image 10 6 pixels. All values are between 0 and 255
6
FREQUENCY
0
0 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 255
PIXEL VALUE
In the demo program we wrote for this chapter, we perform the same calculation
shown above. When the program is opened, it displays a single button. Clicking the
button pops up a list of the files of the current working directory. When an image file
is selected, the program loads the image and computes the values of the histogram
for R, G, and B channels along with the grayscale values of each pixels. Figure 4.3
shows a screenshot of the demo program.
The x-axis of each plot is in the range of value between 0 and 255 as discussed
already. The y-axis is the number of occurrences of each of these values. As can be
observed, we have four histograms, one for each channel and one for the grayscale
version of the image. ImGui does not display the values of the x and y axes initially,
but hovering your mouse over the graph reveals the values in the form of a pop
up. Here’s a section of the code where the image is loaded and the histograms are
computed:
4.1 Program for Creating Histograms 23
reset_image(&a);
a.pixels = stbi_load(tmp.c_str(), &a.width, &a.height, &a.n, RGBA);
assert(a.pixels != NULL);
texture_image(&a);
// reset arrays
memset(red, 0, sizeof(float) * 256);
memset(green, 0, sizeof(float) * 256);
memset(blue, 0, sizeof(float) * 256);
memset(gray, 0, sizeof(float) * 256);
red[a.pixels[i]] += 1.0f;
green[a.pixels[i+1]] += 1.0f;
blue[a.pixels[i+2]] += 1.0f;
gray[grayscale] += + 1.0f;
}
}
Other documents randomly have
different content
of a stripling, or of some particular person, or institution—became a
feeble and trifling character, but, betaking himself to the vast ocean
of beauty, and contemplating it, may give birth to many fine and
stately discourses and sentiments on the boundless field of
philosophy.'
The confusion of Mr. Jowett's rendering here appears to us
extraordinary. 'Being not like a servant in love with the beauty of one
youth, or man, or institution, himself a slave, mean and calculating,
but looking at the abundance of beauty, and drawing towards the
sea of beauty, and creating and beholding(!) many fair and noble
thoughts and notions in boundless love of wisdom.'
We are compelled to ask, in all earnestness, Would such construing
as this be tolerated from a boy of the sixth form in any public school
in the kingdom? Our suspicions are aroused, that the Oxford Greek
Professor has admitted aid from less competent hands, and, in a too
generous confidence, has failed to look closely over the contributions
which he invited and received. Plato, we cannot doubt, in the above
passage, has been expounding his own aspirations for leaving
behind him what he elsewhere calls 'offspring of the mind,'—viz.,
immortal records of his own genius in the composition of his
Dialogues. He goes on to speak of the ultimate attainment of that
highest καλὸν, the knowledge of abstract science, or rather of
science, ἐπιστήμη, in the abstract; and in language evidently
borrowed from the economy of the Eleusinian mysteries, he
proceeds to ask what must be the happiness of those who, as the
result of a right discipline on earth, attain hereafter to the enjoyment
of the τὸ θεῖον μονοεῖδες, the Beatific Vision of God, or rather (if we
might say) of 'Godness,' unmixed with human frailties and
imperfections. The passage itself reads almost like one inspired; and
it is very remarkable how exalted and spiritual an idea of the Deity
Plato had realized. He seems to transcend the anthropomorphic
doings and sayings attributed to the Jehovah of the Old Testament.
In rendering such a passage, Mr. Jowett should have devoted
especial pains to attain the closest accuracy possible, for every word
is a jewel. Yet he wrongfully renders τὰ καλὰ έπιτηδεύματα, 'fair
actions,' and τὰ καλὰ μαθήματα, 'fair notions,' (p. 211, c.), whereas
'institutions' (laws, &c.), and 'lessons,' or 'instructions,' are really
meant; and the important words, ἐκεῖνο ᾦ δεῖ θεωμένου,
'contemplating that beauty by and with the proper faculty, i.e., νῷ,
with mind, not with mere eyes,' he omits, apparently because
ὁρῶντι ᾦ ὁρατὸν τὸ καλὸν occurs a little further on.
We have devoted some space to the examination of the Symposium,
because we have found in it, perhaps more than elsewhere,
indications of hasty and superficial rendering. Yet Mr. Jowett himself
says, in his introduction, 'Of all the works of Plato, the Symposium is
the most perfect in form,—more than any other Platonic dialogue, it
is Greek both in style and subject, having a beauty "as of a statue."'
Special care, therefore, should have been taken in presenting it
accurately to the English reader. Turn we now to the Phædo,—that
remarkable essay, which has exercised more influence than some
are willing to suppose on all subsequent theology, and which,
though of little weight as an argument in proof of the immortality of
the soul, is of such special interest as standing alone among the
writings of the age in advocating anything approaching to the
Christian idea of a good man's hopes and prospects of a happy
existence hereafter. For even Aristotle, it is well known, in a
professed treatise on the laws and ends that influence men's action
(the 'Ethics'), in no case appeals to moral responsibility, obedience to
Divine commands, or the hopes of a happy eternity. He does not
seem to rise above the conception of the half-conscious Homeric
ghost or εἴδωλον wandering disconsolate in the shades below. And
even of this state of existence he speaks doubtfully (Eth. i. ch. x.) In
this treatise, the Phædo, we may say at once, and with pleasure, Mr.
Jowett has given us a tolerably close, as well as a fairly accurate
rendering throughout. It is hard indeed to believe that the two
dialogues can have been translated by the same hand. Let us cite,
as a good example, the following extract (p. 66, b.):—
'And when they consider all this, must not true philosophers make a
reflection, of which they will speak to one another in such words as
these: We have found, they will say, a path of speculation which
seems to bring us and the argument to the conclusion, that while we
are in the body, and while the soul is mingled with this mass of evil,
our desire will not be satisfied, and our desire is of the truth? For the
body is a source of endless trouble to us by reason of the mere
requirement of food; and also is liable to diseases which overtake and
impede us in the search after truth, and by filling us as full of loves,
and lusts, and fears, and fancies, and idols, and every sort of folly,
prevents our ever having, as people say, so much as a thought. For
whence come wars, and fightings, and factions—whence, but from
the lusts of the body? For wars are occasioned by the love of money,
and money has to be acquired for the sake and in the service of the
body; and in consequence of all these things, the time which ought to
be given to philosophy is lost. Moreover, if there is time, and an
inclination towards philosophy, yet the body introduces a turmoil, and
confusion, and fears into the course of speculation, and hinders us
from seeing the truth; and all experience shows that if we would have
pure knowledge of anything, we must be quit of the body, and the
soul in herself must behold all things in themselves; then, I suppose,
that we shall attain that which we desire, and of which we say that
we are lovers, and that is wisdom: not while we live, but after death,
as the argument shows; for if, while in company with the body, the
soul cannot have pure knowledge, one of two things seems to follow
—either knowledge is not to be attained at all, or, if at all, after death.
For then, and not till then, the soul will be in herself alone and
without the body.'
Now this avowal on the part of Socrates, that in his earlier career he
was a follower of the physical philosophers, goes far to explain
several important points. In the first place, it explains to us the
propriety, and in some sense the justice, of Aristophanes' sketch of
Socrates, some twenty years earlier than we know of the
philosopher's mind from Plato, viz., as a speculator on meteorics
after the fashion of Anaxagoras himself, a star-gazer, a lecturer on
clouds and thunder and circling motions, rain and mist, and
phenomena celestial and subterranean. We know, indeed, from
Diogenes Laertius, ii. 4, that Socrates had been a hearer of
Archelaus, himself a pupil of Anaxagoras. And thus we understand
why Socrates was identified with the other sophists or schoolmen of
the day, who taught 'wisdom' generally, ethics not less than physics.
As subverters of the established traditions about the gods, and
exponents of truth to the best of their knowledge, they met with the
same opposition and the same obloquy, in their day, that the
Huxleys and the Darwins, and other conspicuous men of our own
times, are not wholly exempt from. Their teaching was thought to be
'latitudinarian,' and so they were credited with many views from
which they would have recoiled with horror. In the Nubes (902),
Socrates is charged with denying the existence of justice, and
defending the proposition by the example of the gods, who
themselves set it at nought, as when Zeus maltreated and
imprisoned his own father, Cronus; and in the same play (1415), the
lawfulness of a son beating his father is maintained as a part of the
new-fangled Socratic creed. Now in the second book of the Republic
(p. 377, fin.), this case of Cronus is expressly repudiated by Socrates
as monstrous and unnatural; as also the doctrine that a son may
lawfully beat his own father for wrong-doing. In a very curious
passage of the 'Wasps' (1037), Aristophanes bitterly blames the
Athenians for not having supported him in putting down the
nuisance of the philosophers, whom he calls ἠπίαλοι and πυρετοὶ,
'agues' and 'fevers,' teachers of parricide, and base informers. By
not giving the prize, he says, to his play of the 'Clouds,' only the
year before, they had frustrated all his hopes of crushing and
extinguishing the philosophers. Now, these philosophers are
represented as headed by Socrates, and Socrates was the very worst
of them. That he was at that period (about twenty years before his
death) essentially a sophist, and incurring with the rest of them the
odium of the popular opinion, seems undeniable. The precise views
that he held on ethics, and consequently the exact nature of his
teaching at that period, we have no other means of knowing. But it
seems inconceivable that Aristophanes should have so grossly
misrepresented his character with the slightest chance of success;
and we know that it was his ardent desire that his play of the
'Clouds' should succeed. On the whole, we should say, there is a
greater chance that Aristophanes truly represented the feeling of his
age about Socrates than Plato, who, at best, gives us the Socrates
as endeared to his private friends—the man of matured thought, and
possibly of much altered and more chastened views. Nor ought we
to forget that Plato is as severe against the Sophists generally as
Aristophanes is against Socrates in particular. All high teaching at
Athens—all that we include in the idea of a college education—was
done by the Sophists. The art of ῥητορικὴ was one of the most
important: we can see the effect of the training incidentally in the
style and the speeches of Euripides and Thucydides. Socrates saw
that the ethical principles of the Sophists were wrong, and he
engaged in the dangerous task of trying to reform them.
But secondly, the Platonic passage gives us a clue to that sympathy
which Socrates, or at least Plato, always shows for the Eleatic school
of philosophy as represented by Zeno and Parmenides. 'Of all the
pre-Socratic philosophers, Plato speaks of the Eleatic with the
greatest respect,' says Mr. Jowett (Preface to Philebus, p. 227). That
school was a reaction from the teaching of the Ionic physicists,
Thales, Anaximenes, and others, who were speculators on natural
phenomena without any true system of induction. Anaxagoras'
doctrine of Νοῦς, or pervading intelligence, though purely a
pantheistic one, stood half-way between the two schools.
Xenocrates, the founder of the Eleatics, taught that Creation
emanated from a One Being, and not from a fortuitous concurrence
of atoms, from water or air, or states of repose, or flux, or any other
mere physical reason. In the Philebus (p. 28, c., and p. 30, d.) we
find an express eulogy and sympathy with Anaxagoras, whose views
were in truth much more adapted to the doctrine of ἰδέαι and
abstractions than the materialistic views of the Ionic school. And in
the Parmenides, one of the most obscure of the Platonic dialogues,
the discussions on τὸ ἓν, The One, and the relations of the real to
the phenomenal, though a great advance over the Eleatic doctrines,
which, as Mr. Jowett says, 'had not gone beyond the contradictions
of matter, motion, space, and the like' (Introd. Parmen., p. 234), still
are based on the views of Zeno in the main. Parmenides, indeed,
was 'the founder of idealism, and also of dialectic, or, in modern
phraseology, of metaphysics and logic.' (Ibid.)
We proceed now to the Theætetus, one of the most important, as
well as difficult, of the Platonic dialogues. To this Mr. Jowett has
written a rather long but excellent Introduction, replete with large
views of the Platonic philosophy, and containing many original and
striking remarks, e.g. (p. 329): 'The Greeks, in the fourth century
before Christ, had no words for "subject" and "object," and no
distinct conception of them; yet they were always hovering about
the question involved in them.' (We should be inclined to say, that
the familiar distinction between τὰ νοητὰ and τὰ αἰσθητὰ, to a
considerable extent represented our terms 'subjective' and
'objective.') Again (p. 328): 'The writings of Plato belong to an age
in which the power of analysis had outrun the means of knowledge;
and through a spurious use of dialectic, the distinctions which had
been already "won from the void and formless infinite," seemed to
be rapidly returning to their original chaos.' And (p. 353), 'The
relativity of knowledge' (viz., to the individual mind) 'is a truism to
us, but was a great psychological discovery in the fifth century
before Christ.' In p. 360 the remark is a shrewd one: 'The ancient
philosophers in the age of Plato thought of science' (i.e., ἐπιστήμη,
exact knowledge) 'only as pure abstraction, and to this opinion
(δόξα) stood in no relation.' The subject of Theætetus, 'What is
knowledge?' involving, as it doubtless does, some satire on Sophists,
who professed to teach what they were themselves unable to
explain, has been well called 'A critical history of Greek psychology
as it existed down to the fourth century.' In this treatise, the views
of the earlier philosophers, that there is no test of existence or
reality except perception, αἴσθησις, are impugned. Plato did not,
perhaps, himself hold the opinion that objective truth existed,
independently of opinion; but his favourite theory of ἰδέαι, or
abstracts, implied the existence of some typical, eternal, absolute
standard of goodness and justice, as well as of the beautiful. If this
were not the case, then all moral as well as all physical οὐσίαι would
depend on our sense of them. There would be no φύσει δίκαιον, but
only νόμῳ δίκαιον. That would be right in every state which the laws
enacted; and thus in two neighbouring states one course of acting
(say, lying or stealing, or promiscuous intercourse) would be right,
because it is legalised; in another it would be wrong, because
punishable by the law. Nor is this difficulty wholly imaginary, as
Aristotle felt. (Eth. Nic. V. ch. 7.) The old law, for instance,
sanctioned polygamy, as modern usage does in some parts of the
East; while the law of Europe condemns it. So in the case of murder:
a Greek thought it a solemn and absolute duty to slay the slayer of
his father; while we should regard it as one murder added to
another. There was a good deal of sense therefore in what
Protagoras taught, that 'man is the measure,' μέτρον ἄνθρωπος. If I
feel it hot, it is hot to me; if cold, then it is cold: or if wine tastes
sour, or bitter, because my digestion is in an abnormal state, then to
me it is sour or bitter; and it is no use to argue with me that it is
not, but you must set right my disordered stomach, and then the
wine will taste as it should. Apply this doctrine to the diversities of
religious belief; the Christian says the Buddhist and the
Mahommedan are wrong; and each of these retort the same on the
Christian and on each other. A thing cannot be absolutely true
merely because this or that party asserts it, which is but a 'petitio
principii.' Protagoras would have said, had he lived much later, and
not altogether absurdly, 'If this form of religion is one that you
embrace from conviction, and with entire faith in it, then to you it is
true.' And after saying this to the Christian, he would have turned to
the Buddhist and the Mahommedan, and have repeated the same
formula to each.
Now Plato, to make the victory over Protagoras more complete, first
shows, in the Theætetus, that he, Protagoras, by his doctrine of
μέτρον ἄνθρωπος, virtually holds the same opinion as those (1) who
make αἴσθησις the sole test of truth; (2) who, like Heraclitus, allow
of no fixed existence, but hold that πάντα γίγνεται, states of things
are always coming into being, because everything is in a state of
perpetual flux. For it is evident that each of these views denies any
permanent, stable, or objective existence of anything. Even a
momentary perception is a fleeting sensation, not a true and real
sense. While I say this paper is 'white,' some discoloration of it
occurred while the monosyllable was being pronounced, and
therefore it was not true that the paper was absolutely white. It
appears to us that the question which Mr. Jowett moots as a
difficulty in his Introduction (p. 326) is not really very important:
'Would Protagoras have identified his own thesis, "Man is the
measure of all things," with the other, "All knowledge is sensible
perception?" Secondly, would he have based the relativity of
knowledge on the Heraclitean flux?' The latter, we think, Protagoras
clearly does, when he says (p. 168, b.) ἥιλεῳ τῇ διανοίᾳ ξυγκαθεὶς
ὡς ἀληθῶς σκέψει, τί ποτε λέγομεν κινεῖσθαί τε ἀποφαινόμενοι τὰ
πάντα τό τε δοκοῦν ἑκάστῳ τοῦτο καὶ εἶναι ἰδιώτῃ τε καὶ πόλει. To us
it appears that Plato classed them together, simply because they are
logically coherent and inseparable. He insists that all sensations
imply a patient and an agent. Fire does not burn if there is nothing
for it to consume. Colour is non-existent (being a mere effect of
light), unless there is an eye to behold it. That indeed is true, and
Epicurus and Lucretius also perceived (Lucr., ii. 795) that three
conditions are wanted to produce colour—viz., light, an object to be
seen, and an eye to see it. It is quite true, that a person sees a red
or a blue cloth on a table while he looks at it, but that when he turns
his back upon it, it has no colour, because one of the three
conditions, the sight, has been withdrawn. Mr. Jowett seems,
however (with the disciples of a modern school), to press this
doctrine of relativity too far in asserting (Introd., p. 332), 'There
would be no world, if there neither were, nor never had been, any
one to perceive the world.' For we cannot escape from the
conclusion that the world must have existed (in the sense in which
we know of existence) prior to life, i.e., any perceptive faculty, being
placed upon it.
What appears to have struck Plato most strongly in considering the
doctrine of Protagoras was this—that if everybody is right, or as right
as any other, all reasoning, argument, persuasion, in fine, the whole
science of dialectics, becomes ipso facto useless and absurd (p. 161,
e.) There are no such characters as wise and foolish. Protagoras
himself felt the difficulty, but evaded it thus: the wise man is not one
who tries to argue a person out of his convictions, e.g., that justice
is only tyranny, or that sweet is bitter, but who so trains and
educates the mind or appetite that the sounder and better view will
spontaneously present itself. Thus a good sophist or a wise legislator
will endeavour so to educate and so to govern, that right and
reasonable views will approve themselves to the people. Again, in
judging of what will be good or useful in the end, sagacity is needed,
which clearly is not the property of everyone alike. A thing is right or
wrong only as individual conviction or the law of a State makes it so
for the time being; but in advising a certain course of action, where
result, and therefore, forethought are involved, one counsellor may
be greatly superior to another (p. 172). Hence, as legislation is
prospective, it is not true that one man's opinion as to the wisdom or
expediency of a measure is as good as another's; but there are
some things at least in which one man's must be better than
another's judgment.
It was thus that Protagoras endeavoured to reconcile the obvious
fact that some men were more clever than others, with the theory
that all morality is based on mere human opinion. And those persons
would take a very shallow view who think that all this is merely an
ingenious quibbling. The difficulties which Protagoras attempted to
solve are real ones, and only thinkers know to what extent all
questions, both of religion and casuistry, are bound up with them.
We proceed to perform, somewhat in brief, the less agreeable task
of showing that Mr. Jowett's version of the Theætetus, though
always fluent and pleasant to read, is not always as accurate as
might have been desired.
In p. 149, a., Socrates playfully asks Theætetus if he has never
heard that he, Socrates, is the son of a midwife, by name,
Phænaretè, μάλα γενναίας τε καὶ βλοσυρᾶς, 'a sour-faced old lady,'
we should say. Mr. Jowett somewhat oddly renders this phrase, a
'midwife, brave and burly.' The epithets mean something very
different. The first is an ironical allusion to the humble station of the
professional midwife, the latter to the alarm which her presence
might inspire in the timid.... For βλοσυρὸν is something that shocks
and causes terror, as in Æschylus, Suppl. 813; Eumen. 161. To this
real or supposed parentage of the philosopher, a joke is directed by
Aristophanes in the Nubes, 137—
καὶ φροντίδ' ἐξήμβλωκας έξευρημένην.
We see no reason whatever why the above should have been diluted
down to such a version as this:—
'I see, Theodorus, that you perfectly apprehend the nature of my
complaint; but I am even more pugnacious than the giants of old, for
I have met with no end of heroes. Many a Hercules, many a Theseus,
mighty in words, have broken my head; nevertheless, I am always at
this rough game, which inspires me like a passion. Please, then, to
indulge me with a trial, for your own edification as well as mine.'
With regard to the first speech of Socrates on Love (p. 237, c., to
241, d.) it appears to us that it is not so much 'an example of the
false rhetoric,' as a proof how much better and more logically even a
paradoxical subject can be treated by a dialectician than by a mere
rhetorician. The hit at Phædrus for having given no definition
whatever of his subject (p. 237, c.) is one of the points of contrast
which is very significant; and there is this subtle irony underlying the
whole speech, that whereas Socrates undertook to prove that
χαρίζεσθαι μὴ ἐρῶντι was better than χαρίζεσθαι ἐρῶντι, his essay is
made to turn, in fact, simply on the latter point, μὴ χαρίζεσθαι
ἐρῶντι, so as to be a diatribe against vicious παιδεραστία; only a
word or two at the end being added in apparent sanction of the
other, and by way of verbally fulfilling the engagement he had made:
λέγω οὖν ἑνι λόγῳ, ὅτι ὅσα τὸν ἕτερον λελοιδορήκαμεν, τῷ ἑτέρῳ
τἀναντία τούτων ἀγαθὰ πρόσεστι (p. 341, fin.) And the palinodia, or
pretended recantation (p. 244, seq.), cleverly pursues the same
theme, by showing that love, in its philosophical and nonsensual
phase, is a divine emotion, and the source of every blessing to man.
The famous allegory that follows, which means that Reason should
control Passion, gives a sketch of the orderly and well-trained man,
gradually recovering, even as the depraved mind gradually loses, the
impressions and memories of the god-like existence men enjoyed in
a previous state. The latter part of the dialogue hangs on to the
allegory, not indeed very directly; rather, we should say, it reverts to
the former part, and is intended to show, by a critique of the two
essays, that no essayist or speech-maker can hope to succeed, who
derives all his art from rules and treatises and the pedantic
phraseology of the teachers. He must trust to dialectic, i.e., the
science of hard and close reasoning, if he would rise above mere
δημηγορία, or clap-trap; and psychology itself must form the basis of
dialectic.
Mr. Jowett's version of this dialogue is fully as lax as that of the
Symposium. Still it reads pleasantly, and if one could forget the
incomparable and often so much more expressive Greek, one would
be fairly content with the general correctness of the paraphrase.
Almost at the outset, he renders εἴ σοι σχολὴ προϊόντι ἀκούειν, 'if
you have leisure to stay and listen,' instead of 'to walk on and listen,'
where a slight satire is intended on the 'constitutional' and
prescribed exercise of the effeminate youth. And γέγραφε γὰρ δὴ ὁ
Λυσίας πειρώμενόν τινα τῶν καλῶν, οὐχ ὑπ' ἐραστοῦ δὲ, ἀλλ' αὐτὸ
τοῦτο καὶ κεκόμψευται means, 'Lysias, you must know, has written
about one of the handsome youths having proposals made to him,
not, however, by a lover; but this is the very point he has put in a
new and quaint light.' (Of course, κεκόμψευται, to which we have
given a medial sense, may also be taken as a passive.) Mr. Jowett
gives us nothing nearer to the above than 'Lysias imagined a fair
youth who was being tempted, but not by a lover; and this was the
point; he ingeniously proved that,' &c. In p. 229, a., κατὰ τὸν
Ἰλισσὸν ἵωμεν should be rendered, 'let us go along or down the
Ilissus,' i.e., in the bed or channel, or even along the bank; certainly
not, 'let us go to the Ilissus.' Nor is ἀγροίκῳ τινὶ σοφίᾳ (p. 329, fin.),
this sort of 'crude philosophy,' but 'an uncourteous (or uncivil) kind
of philosophy,' viz., that which employs itself in giving the lie to
received traditions.
The charming and justly celebrated passage in p. 230, b.—one of the
few in Greek literature that indicate intense feeling for the beauties
of nature—we propose to render as follows, nearly every word being
a close representative of the equivalent Greek:—
'Upon my word, the retreat is a charming one; for not only is this
plane-tree of ample size and height, but the dense shade of this tall
agnus is quite beautiful to behold; in full flower too, so as to make the
place most fragrant! Yon spring, also, is most grateful, that flows from
under the plane-tree with a stream of very cold water, as one may
judge by the feeling to the foot. Moreover, there appears, from the
images and ornaments, to be a shrine here to certain Nymphs and to
the Achelöus. Pray notice, also, the balmy air of the place, how
delightful and exceeding sweet, and how it rings with the shrill
summer chirp of the chorus of cicadas! But the quaintest thing of all is
the growth of the grass, which on this gentle slope springs up in just
enough abundance for one to recline one's head and be quite
comfortable. So that you have proved a most excellent guide for a
strange visitor, my dear Phædrus.'
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com