| Dick Laughlin 2006-09-30, 7:07 pm |
| I am inserting a logo in an avi file that is already written.
I have a RGB logo file 'logo' that is the same size as a Binary mask
file.
When I insert them into an array the two images come out a different
size. I do not understand. WHY?
The program:
xbegin =w-size(logo,2) +1-5;
xend = w -5 ;
ybegin = h-size(logo,1)-5 + 1 ;
yend = h - 5; %h-size(maskmag,1) + size(maskmag,1);
maskbw3=cat(3,maskbw,maskbw,maskbw)
overlaly=uint8(zeros(h,w,3));
overlaymask=uint8(zeros(h,w,3));
overlay(ybegin:yend, xbegin:xend, :) =logo ;
overlaymask(ybegin:yend, xbegin:xend,:) =maskbw3 ;
I have checked the following:[color=darkred]
ans =
40 43 3 40 43 3[color=darkred]
ans =
475 715 3 480 720 3
[color=darkred]
ans =
436 475 673 715
It appears the only difference is one is RGB and the other is logic.
Why would this produce different results?
|