How to obtain union of two RGB Images of same size ?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have two rgb images. How to obtain union of this two images ? I'm getting error if i use union command as it is operable to vectors.
채택된 답변
Image Analyst
2014년 9월 26일
For each spectral band, it finds a binary image that says whether an image is considered shadow or non shadow. It then processes the shadow regions to brighten them, and also does some adjustment of the non-shadow/bright regions to normalize their intensity. Then it combines them so that the pixels in the new, improved image are either the improved shadow pixel, or the improved bright pixel, depending on what they started out as. In essence
binaryImage = output of their Otsu-based algorithm
improvedShadowRegion = algorithm applied to pixels defined by binaryImage
improvedBrightRegion = algorithm applied to pixels defined by inverse of binaryImage
improvedImage = improvedShadowRegion(binaryImage) + improvedBrightRegion(binaryImage);
That makes each pixel either the improved bright or shadow value, depending on what class (bright or shadow) it started out as. It doesn't look like they do any feathering/blending of the borderlines between the bright and shadow regions.
댓글 수: 3
Image Analyst
2014년 10월 1일
No, sorry. I just don't have the time to dig into it. Did you ask the authors of the paper for help?
추가 답변 (1개)
Thorsten
2014년 9월 26일
편집: Thorsten
2014년 9월 26일
The symbol '∪' is used in the paper to denote that the original image is the union of two images, one with shadows, the other without shadows. Once you have the binary mask M that divides the image into these two parts, you can use something like
shadow_index = find(M == 0);
nonshadow_index = find(M == 1);
R(shadow_index) = ... % some computations for the shadow regions
R(nonshadow_index) = ... % other computations for the non-shadow regions
% same for G and B
In the context of the paper it does not make any sense to compute some union between images.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!