Apply adaptive histogram equalization at the bottom part of the image
1 view (last 30 days)
Hi. I have a set of 2000 tif images of size 1024 X 1024 pixels in a folder and I want to apply histogram equalization only at the bottom part of the image. Say from y = 800 px to y = 1024 px, and make the rest (top part) of the image black. How can I incorporate this in the below code?
% Location of the original files
d = 'D:\Raw_Images\';
% Location of the new files
DGM on 21 Apr 2021
Something like this.
tophalf=zeros([799 size(inpict,2) size(inpict,3)],class(inpict));
This assumes the images may be color. If you can be assured that they are all single-channel images, the loop would be unnecessary.