cpp implementation for algorithms in the book "数字图像处理与机器视觉-Visual C++与Matlab实现"
To compile CH3_pixel_operation.cpp:
./compile.sh -DCH3 CH3_pixel_operation.cpp utility.cppIn which -DCH3 activates the main function in the source file, otherwise main function is ignored. And this source file includes utility.h, so we need to compile CH3_pixel_operation.cpp with utility.h's implementation, which is utility.cpp.
Similar method for CH 4,5,6,7,8 to compile.
To compile CH9_image_segmentation.cpp:
./compile.sh -DCH9 CH9_image_segmentation.cpp CH3_pixel_operation.cpp CH5_spatial_domain_image_enhancement.cpp CH8_morphology_image_processing.cpp utility.cppBecause it includes the corresponding headers.
Set threshold as 100:
Set dFa as 2.0, set dFb as -55:
Set gamma as 1.8, set comp as 0:
Set dC as 10:
Set x1, x2, y1, y2 as 20, 50, 100, 200:
Move 20 right and 50 down:
Rotate 30 degrees counterclockwise:
Kernel size 3:
Kernel size 5:
Kernel size 7:
Positive 45 degrees v.s. Negative 45 degrees v.s. Positive+Negative 45 degrees:
Vertical v.s. Horizontal v.s. Vertical+Horizontal:
90 degrees rotation isotropy v.s. 45 degrees rotation isotropy v.s. Weighted
Roberts positive 45 degrees:
Sobel vertical:
Laplacian weighted:
Image and noised image in frequency domain:

Filter and filterd image in frequency domain:































































