why we you mask for image ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
i read many codes and i found them getting mask for image or part of it and i find they get mask ?
what is mask and when i use it?
what dose this code means
bsxfun(@times, rgbImage, cast(mask,class(rgbImage)));
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 19 Jan. 2013
Bearbeitet: Image Analyst
am 19 Jan. 2013
Masking is when you want to exclude part of the image from processing or analysis. Usually this means that you set the part of the image not in the mask to zero, but can have other meanings depending on what you want to do.
The code you are referring to makes the mask the same class as the image because if the image is uint8, uint16 or some other integer, you can't multiply it by 1 or 0 unless the 1s and 0s are the same class. Then the rest of the function just multiplies the mask by each color channel in the image. If the mask = 1 the original pixel remains, if the mask = 0 the pixel is set to black.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox 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!