HDR blending not working with 16 bit images
조회 수: 9 (최근 30일)
이전 댓글 표시
I'm using the camresponse function and the makehdr function to blend few images and create a radiance map. I have no problem using 8 bits images, everything works fine. But if I use the same images but encoded with 16 bits, I get really bad results, as you can see in the following images. Using that crf with mkhdr results in a really bad quality hdr image.
The images are converted to 8 bit and 16 bit png from the original RAW file.
Any help? Is this function supposed to work with images with more than 8 bits? I guess so looking at camresponse.m but still I have these problems.
![untitled.bmp](https://www.mathworks.com/matlabcentral/answers/uploaded_files/243995/untitled.bmp)
![22.bmp](https://www.mathworks.com/matlabcentral/answers/uploaded_files/243996/22.bmp)
댓글 수: 3
답변 (1개)
Vinai Datta Thatiparthi
2019년 11월 11일
Hey!
I believe that this is expected behavior of the commands makehdr and camresponse. 8 bit images generally produce smoother camresponse curves since the intensity range is narrower as compared to 16 bit images.
As a workaround to obtaining a more accurate looking curve, considering using a higher sampling interval to narrow down the “crf” result.
% Increasing sampling interval
crfNew = crf(1:200:65536,:);
range = 0:length(crfNew)-1;
% Response function plots for every channel
figure(2); hold on;
if(size(crf,2) == 3)
% RGB Image
plot(crfNew(:,1),range,'r','LineWidth',2);
plot(crfNew(:,2),range,'g','LineWidth',2);
plot(crfNew(:,3),range,'b','LineWidth',2);
legend('R-component','G-component','B-component','Location','southeast');
else
% Grayscale Image
plot(crf(:,1),range,'-k','LineWidth',2);
end
Hope this helps!
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!