Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DenoiseLUT

Noise removal tool for Binary (Monotone) raster images

This tool is part of the following grant/project:
Project Title: Feature extraction from engineering drawing images for the purpose of segmentation
Project Number: 01-01-05-SF0147
Grant Provider: Ministry of Science, Technology, and Innovation (MOSTI), Malaysia
Project Leader & PhD Supervisor: Dr. Abdullah Zawawi Talib, azht [at] cs.usm.my
Researcher Officer & Programmer: Hasan S.M. Al-Khaffaf, hasan.alkhaffaf [at] uod.ac

The above tool is part of my PhD work with thesis titled 'Vectorization of Engineering Drawing'.

DISCLAIMER

This tool is provided as EXE file and as-is with no warranty and no guarantee to work. It was written in Visual C++ and compiled using Visual Studio 6.0 under Windows XP. It will crash/freeze if you load image file that is not 1 bit/pixel. And although it is believed (by Microsoft Defender) to be clean of viruses. However, you still accept full responsibility for running this tool.

'Denoise LUT Ver 1.0.exe'

This is version 1.0 of the application/tool.

'Denoise LUT Ver 1.02.exe'

Application version 1.02 supports manual setting for methods' number of iteration(s) hence giving the researchers control over noise removal process. Might be helpful when comparing between methods! image

image

The number of iterations (#iter) can be used to control the noise removal operation. However, if the algorithm/method cannot remove any more noise then the tool will stop before reaching the specified #iter.

The tool disables the 'Open' button after each use to force user to re-execute again. It was a precaution (at the time of programming) taken to prevent any possible crash due to memory leak, for example. But I believe the tool has no errors/bugs in it and can function as anticipated when used as recommended. For users who have many images to be cleaned, they can consult the Batch Processing section below for method of automating the cleaning operation using Windows batch files.

Citing the Noise Removal Methods

Opening-Closing:
R.C. Gonzalez and R.E. Woods, Digital Image Processing, 2nd Ed., Prentice Hall, New Jersey, 2002.

kFill:
(1) L. O’Gorman, “Image and document processing techniques for the rightpages electronic library system,” Proc. 11th IAPR International Conference on Pattern Recognition. Conference B: Pattern Recognition Methodology and Systems, pp.260–263, The Hague, 1992.
(2) G.A. Story, L. O’Gorman, D. Fox, L.L. Schaper, and H.V. Jagadish, “The rightpages image-based electronic library for alerting and browsing,” Computer, vol.25, no.9, pp.17–26, 1992.

Enhanced kFill:
K. Chinnasarn, Y. Rangsanseri, and P. Thitimajshima, “Removing salt-and-pepper noise in text/graphics images,” 1998 IEEE Asia-Pacific Conference on Circuits and Systems, pp.459–462, Chiangmai, 1998.

Activity Detector:
P.Y. Simard and H.S. Malvar, “An efficient binary image activity detector based on connected components,” Proc. IEEE International Conference on Acoustics, Speech, and Signal Processing, pp.229–232, 2004.

Algorithm A:
Hasan S. M. Al-Khaffaf, Abdullah Zawawi Talib, Rosalina Abdul Salam, Removing Salt-and-Pepper Noise from Binary Images of Engineering Drawings. The 19th IAPR International Conference on Pattern Recognition (ICPR 2008), Vols 1-6, pp. 1271–1274, Tampa, Florida, USA, December 8-11, 2008

Algorithm B:
Hasan S. M. Al-Khaffaf, Abdullah Zawawi Talib, Rosalina Abdul Salam, Enhancing salt-and-pepper noise removal in binary images of engineering drawing. IEICE TRANS. INF. & SYST., Vol.E92-D, No.4, pp.689-704, Apr. 2009.

Algorithm C:
Hasan S. M. Al-Khaffaf, Abdullah Zawawi Talib, Rosalina Abdul Salam, Salt and Pepper Noise Removal from Document Images. Lecture Notes in Computer Science, Visual Informatics: Bridging Research and Practice, LNCS 5857, H. Badioze Zaman et al. (Eds.): Springer Berlin / Heidelberg, IVIC 2009, pp. 607–618, 2009

Median, Center Weighted Median:
S.J. Ko and Y.H. Lee, “Center weighted median filters and their applications to image enhancement,” IEEE Trans. Circuits Syst., vol.38, no.9, pp.984–993, 1991.

DRD:
(1) L. Haiping, W. Jian, A.C. Kot, and Y.Q. Shi, “An objective distortion measure for binary document images based on human visual perception,” Proc. 16th International Conference on Pattern Recognition, vol.4, pp.239–242, 2002.
(2) L. Haiping, A.C. Kot, and Y.Q. Shi, “Distance-reciprocal distortion measure for binary document images,” IEEE Signal Process. Lett., vol.11, no.2, pp.228–231, 2004.

Dependencies

(1) Microsoft Foundation Class (MFC) Library
(2) FreeImage, https://freeimage.sourceforge.io/

Batch Processing

Yes, the tool can also work in batch mode i.e. run from command line without showing the GUI. Run the 'denoise.bat' while you are inside the 'Batch' folder to apply all 9 algorithms on '4.bmp' sample image. If the noise image file, i.e. the one with .noise.bmp extension exists, then you will get many useful calculated statistics that may shed some light on the cleaning operation.
The calculated statistics is then stored in the text file named '4 SP15.txt'. Content similar to the following will be shown in the file. Actually, all numbers except the timing should be the same. Time unit in seconds.

Method Time Iter TotNoisyPix #CleandPix #CorupPix Tlen DRD(OC) DRD(ON) PSNR MSE
OpenClos 0.046 4 97845 93310 10775 0 2.8195 32.4947 19.31 0.0117
kFill 0.043 1 97845 86528 1130 0 3.5777 32.4947 20.21 0.0095
Alg A 0.051 1 97845 92650 1240 6 1.5151 32.4947 23.07 0.0049
Enh kFill 0.035 1 97845 86910 1541 0 3.5579 32.4947 20.20 0.0096
Alg B 0.040 1 97845 93063 1664 6 1.4899 32.4947 23.06 0.0049
ActDetec 0.981 1 97845 2240 79 0 31.9623 32.4947 11.35 0.0733
Alg C 0.933 1 97845 40039 272 6 19.1255 32.4947 13.52 0.0445
Median 0.021 1 97845 96006 5205 0 1.2334 32.4947 22.68 0.0054
CWM 5 0.018 1 97845 81992 93 0 4.7314 32.4947 19.13 0.0122

About

a GUI-based Noise removal tool for Binary (Monotone) raster images. The tool provides many noise remocal methods such as Median, CWM, k-Fil, and others. The program can also work from command line in batch mode or from inside Windows batch files.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages