- Read the watermarked image using the imread function and convert it to grayscale if necessary.
How can i display the peak point of histogram of the watermarked image?
조회 수: 1 (최근 30일)
이전 댓글 표시
How can i display the peak point of histogram of the watermarked image?
댓글 수: 0
답변 (1개)
Shubham
2023년 10월 19일
To display the peak point of a histogram of a watermarked image in MATLAB, you can follow these steps:
watermarkedImage = imread('watermarked_image.jpg');
grayImage = rgb2gray(watermarkedImage); % Convert to grayscale if needed
2. Calculate the histogram of the image using the imhist function.
[counts, bins] = imhist(grayImage);
3. Find the bin index with the maximum count using the max function
[peakCount, peakIndex] = max(counts);
4. Get the corresponding intensity value of the peak using the bin index.
peakIntensity = bins(peakIndex);
5. Plot the histogram and mark the peak point using the plot and hold on functions.
figure;
plot(bins, counts);
hold on;
plot(peakIntensity, peakCount, 'ro', 'MarkerSize', 8);
hold off;
Hope this helps.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!