image
3 次查看(过去 30 天)
显示 更早的评论
how would i find certain colored pixel within a image? this is not a RGB file. I'm trying to remove certain pixels and also watermark from the image. This is a visible watermark
0 个评论
回答(2 个)
Image Analyst
2011-11-21
Do you mean "intensity" because it's a gray scale image, not an RGB image? Anyway, what kind of watermark is it? Is it visible? The more sophisticated watermarks are embedded in the image with sophisticated algorithms and aren't even visible. They are also robust to image modification such as cropping, rotation, addition of noise, etc. They are difficult to detect and difficult to remove. Of course, because they were designed with that purpose in mind. Visible watermarks that can easily be removed with the clone tool or bandaid tool in Photoshop aren't very effective for obvious reasons. I wouldn't be surprised if some content owners used both visible and invisible. Unless you know the specific algorithm you may be out of luck.
Jan
2011-11-21
It depends on how the pixel is specified and the type of the image. Assuming you have an RGB image of the size [width, height, 3]:
- If you look for the pixel as index [x, y]: Img(x,y,:)
- If you look for the first pixel with the color [0,1,0.5]:
index = find(Img(:,:,1)==0 && Img(:,:,2)==1 && Img(:,:,3)==0.5, 1)
For real application there can be rounding effects and it would be smarter to check e.g. for "abs(Img(:,:,1)-Value) < 1/1000" instead of the exact comparison by ==.
A more specific answer is possible, if you add the necessary details to your question - by editing it.
2 个评论
Walter Roberson
2011-11-21
JPEG color images are always RGB. JPEG has no way of storing pseudocolor images.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!