About Digital Image Processing
In the field of computer science, digital image processing is the use of computer algorithms to perform image processing to manipulate digital images. The most conventional way of changing the features or characteristics of an image is to convert the image into its pixel matrix form and pass a spatial filter over it using the mathematical operation of convolution.
About Python and Open-CV libraries
Python is an interperted high-level programming language for general purpose programming. It supports multiple programming paradigms including object oriented and procedural, and has a large and comprehensive standard library.
OpenCV-Python is a library of Python bindings designed to solve computer vision problems. The library is cross-platform and free for use under the open-source license. All the OpenCV array structures are converted to and from Numpy arrays. This also makes it easier to integrate with other libraries that use Numpy such as SciPy and Matplotlib. Numpy is a library which adds support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. Matplotlib is a plotting library for Python programming language which provides embedded plots into various applications.
Download Python from https://www.python.org/
For virtual Python environments, do download additional libraries and packages; download /upgrade the pip installation: To install pip, securely download get-pip.py. [1]
To test for successful installation of pip, run it on the Command Prompt
To install/uninstall a library using pip; run a command on Command Prompt:
pip install (name of the library)/ pip uninstall (name of the library)
About High Pass Filters
High pass filtering in image processing has a plain objective that is pretty self-explanatory; taking a transform function into account, it attenuates all low frequency components without disturbing higher frequency information. By maintaining the same, it is observed that while the high pass filter is implemented upon an image as a masking factor, image sharpening can be obtained in the frequency domain as opposed to low pass filters which causes blurring on the image since it attenuates low frequencies. (The intended function of the filters here is to perform precisely perform the reverse operation of low pass filters). With a strong characteristic of image sharpening which is implemented using HPF, it can be using in applications of boundary or edge detections in an image. In other terms, abrupt changes in frequencies are associated with high frequency components and hence the same can be highlighted. An ideal high pass filter can be defined as
H(u,v)=0 if D(u,v)<Do
H(u,v)=1 if D(u,v)>D0
Where D0 is the cut-off distance measured from the origin of the frequency. It sets zero to all frequency to the area bounded with the circle of radius D0, while passing without attenuation, all frequencies outside the circle. Results of ideal high pass filters may be associated with problems related to ringing effects. In order to look into highlighting edges and boundaries, if the cut-off distance of the filter is selected with a low pixel order, the edges produced may be thicker and distorted. Selecting a filter of higher order can enable filtering of smaller objects in the image and the edges will look cleaner and less distorted.
A high pass filter when defined in matrix form in very general terms, the sum of all values in the filter matrix should add up to zero. Since high pass filters looks for quick abrupt changes in frequencies and attenuates lower frequencies, it has a response of zero in DC. An edge/boundary detection filter gets rid of all DC offsets.
(Reference: Raquel Gonzalez for Digital Image Processing)
Input Image:
Output using various high pass filters:
Output to display a general high pass filtered image in pixel matrix form:
Program Code: Run and Execute
For the complete program code and incase of furthur queries, do drop in a message via the contact forms of our blog or care to drop a comment! ^_^
November 27, 2018 at 4:19 pm
Awesome technical blog post!!!!
LikeLiked by 1 person
November 27, 2018 at 5:17 pm
Thank you bookwormPreethi ^_^
LikeLike
November 27, 2018 at 7:27 pm
Very informative 👍🏼
LikeLiked by 2 people
November 27, 2018 at 8:06 pm
Thank you so much SumedhTheNoble😘😘
LikeLike
August 22, 2019 at 2:17 am
I do not know any of this but you have provided lots of technical information to please any techie !
LikeLiked by 1 person
August 22, 2019 at 7:18 am
As a techie, that means a lot to me! Thank you Mr. James! 🙂
LikeLiked by 1 person
October 30, 2019 at 11:06 pm
Very useful article! Thank you so much!
LikeLiked by 1 person
November 17, 2019 at 10:30 am
Thank you Lazar Jović! ^_^
LikeLike
April 12, 2020 at 7:04 am
Reblogged this on My Journey through the lens of my camera.
LikeLiked by 1 person
September 2, 2020 at 4:22 pm
I also conceive thence, perfectly composed post! .
LikeLiked by 1 person
October 31, 2020 at 7:54 pm
Thank you Frankie Munoz! 🙂
LikeLike
September 5, 2020 at 3:48 pm
Thank you Frankie Munoz!
LikeLike
October 31, 2020 at 12:38 am
hello, can you help me with code of laplacian high pass filter
LikeLiked by 1 person
October 31, 2020 at 2:47 pm
Hi Bhavika.. you can check my github profile link: https://github.com/1jyotsna1/Python-Programs-Basic-to-Advanced-/blob/master/Digital%20Image%20Processing.zip it has the problem statements and py files code!
LikeLike
August 30, 2021 at 11:44 pm
Do you mind if I quote a few of your posts as long as I provide credit and sources back to your blog? My blog is in the exact same area of interest as yours and my visitors would genuinely benefit from a lot of the information you present here. Please let me know if this alright with you. Thanks!
LikeLiked by 1 person
September 2, 2021 at 7:09 pm
Hi Ms. Bethanie Wickham, sure please feel free to do so! Thanks 🙂
LikeLike
October 7, 2021 at 5:10 am
Hello, I think your website might be having browser compatibility issues. When I look at your blog site in Firefox, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, great blog!
LikeLiked by 1 person
October 10, 2021 at 8:31 pm
Thank you so much Tyisha! I have noticed compatibility issues before.. I don’t identity the reason behind the issue, but I am fine with it if it atleast works in Firefox! Thanks for the heads up!😃
LikeLike
October 9, 2021 at 9:16 pm
Oh my goodness! Impressive article dude! Many thanks, However I am having troubles with your RSS. I don’t understand why I can’t join it. Is there anybody having identical RSS problems? Anyone that knows the answer will you kindly respond? Thanx!!
LikeLiked by 1 person
October 10, 2021 at 8:29 pm
Hi Cruz, I did not follow the issue you have identified.. other than that, thanks a lot for visiting this space and thanks for the blog compliments!😊
LikeLike
December 10, 2021 at 8:36 am
Very informative article. Awesome.
LikeLiked by 1 person
December 11, 2021 at 12:29 pm
Thank you @Judi Slot!😊
LikeLike
December 31, 2021 at 10:32 pm
Thank you @ Judi Slot
LikeLiked by 1 person
March 28, 2022 at 3:15 am
Thank you very much!
LikeLiked by 1 person