Custom-shaped histogram

버전 1.1.0.0 (1.65 MB) 작성자: Image Analyst
Transform an image to have any histogram you want.
다운로드 수: 8.6K
업데이트 날짜: 2010/10/11

라이선스 보기

This script transforms an image such that the object in the "foreground" of the image now becomes the histogram of the transformed image.
I provide three examples with 3 demo images:
I change the image of a city skyline so that the histogram of the new image looks like the skyline.
I change the image of a car so that the histogram of the new image looks like the car shape.
I change the image of a woman so that the histogram of the new image looks like the shape of the woman. (See screenshot)
The script can also produce a perfectly flat histogram - the ultimate histogram equalization, far better than any standard histogram equalization method because the final histogram is TRULY FLAT.

In addition I give some examples for how to segment multi-colored objects (car, skyline, woman) out of the foreground of the image, thus demonstrating some standard image processing techniques such as color classification and thresholding.

As an extra bonus, I provide a thresholding GUI application where you can interactively threshold your image with scrollbars and see the results (original, binary, and masked) immediately. You can use this with any integer or floating point image. Here, if you uncomment it in the code, you can use it to select threshold values for the hue, saturation, and value channels of the "beach_woman" image. But it can be used in general for any image - it's not specific for this shaped histogram script, it's just bundled in.

인용 양식

Image Analyst (2024). Custom-shaped histogram (https://www.mathworks.com/matlabcentral/fileexchange/28972-custom-shaped-histogram), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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

Made bar chart have the same aspect ratio as binary image. Included missing threshold m-file.

1.0.0.0