Grayscale image lighting enhancement

버전 1.0.0 (3.22 KB) 작성자: Santiago Benito
This function performs lighting enhancement on grayscale images using simple filters.
다운로드 수: 244
업데이트 날짜: 2018/8/15

라이선스 보기

The functions works by substracting a filtered image called the background image from the original image to obtain a corrected version of the latter. The background image contains the illumination gradient and therefore allows the correction of the original picture. The function only works on grayscale images and the user must manually input if the foreground is brighter or darker than the background.

The filters employed are the most simple out there: the minimum and maximum filters. Maximum and minimum filters attribute to each pixel in an image a new value equal to the maximum or minimum value in a neighborhood around that pixel, respectively. Therefore by selecting a neighborhood, or structuring element in this case, which best fits each applycation very good results are obtained.

Here are the lines present in the example in the code. To see the code in action, just download it and then execute the following lines in the path where the function is present:
I = imread('printedtext.png');
SE = strel('rectangle',[150,15]);
I_leveled = imgrayenhance(I,'dark',0.8,SE,true);
BW = imbinarize(I_leveled,0.75);
subplot(2,2,4)
imshow(BW)
title('Binarized image')

More information about each of these lines is present in under EXAMPLE in the given code.

Contact: santiago.benito@rub.de

인용 양식

Santiago Benito (2024). Grayscale image lighting enhancement (https://www.mathworks.com/matlabcentral/fileexchange/68495-grayscale-image-lighting-enhancement), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2016a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0