The union of 2 images
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
John Snow
am 28 Okt. 2013
Kommentiert: John Snow
am 28 Okt. 2013
Let's say I have an image called A and another constant image of the same size how do I get the set union of those 2 images : the union should be of the same size as image A
Note: when I use union function it gives me an error (A and B must be vectors or 'rows' must be specified.)
0 Kommentare
Akzeptierte Antwort
Matt J
am 28 Okt. 2013
Bearbeitet: Matt J
am 28 Okt. 2013
the union should be of the same size as image A
Then you have an unconventional definition of a "union". There's no reason they should be the same size. Possibly you want to do a pixel-wise or() operation?
Union = A|B
Otherwise please clarify.
5 Kommentare
Weitere Antworten (1)
Image Analyst
am 28 Okt. 2013
Maybe you mean something like this:
% Find dark pixels.
binaryImage = skeletonImage < 50; % Or whatever intensity you want.
% Replace dark pixels with pixels from image B.
C_Image = skeletonImage; % Initialize
C_Image(binaryImage) = B_Image(binaryImage); % Replace.
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!