How to remove the camera printed name by manufacturer in images using matlab?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ezhil K
am 19 Dez. 2018
Kommentiert: Walter Roberson
am 2 Jan. 2019
Can anyone help me in getting to know the code for removing the camera printed name from manufacturer in any images?
3 Kommentare
Akzeptierte Antwort
KSSV
am 20 Dez. 2018
This is one of the naive suggestion (may be). Off course Image Analyst's would be the best.
I = imread('1502388520041.jpg') ;
txt = ocr(I) ;
R = txt.WordBoundingBoxes ;
imshow(I)
for i = 1:size(R,1)-1
C = [9 118 183]/255 ;
rectangle('position',R(i+1,:),'Facecolor',C,'EdgeColor','none')
end
YOu need to play around with R, to mkae it more perfect.
0 Kommentare
Weitere Antworten (1)
Image Analyst
am 19 Dez. 2018
The watermark will always be in exactly the same place. So you simply have to make a mask, like I did below:
and use it together with regionfill() to fill in the mask area with the surrounding color. Easy, but let us know if you have any problems you cannot solve.
3 Kommentare
Walter Roberson
am 20 Dez. 2018
The mask that Image Analyst created shows the places that need to be replaced. You can create a mask from the camera_mask image file that Image Analyst provides, and then you can use that mask with regionfill() on one of your existing color images so that MATLAB fills those locations only.
Image Analyst
am 20 Dez. 2018
I'm sure you've looked up the regionfill() documentation to see the one-liner MATLAB code (maybe not though, since you're asking about it), but looks like you've accepted KSSV's answer and so it looks like you've found a solution that's good enough. Keep in mind though that it fills in the whole bounding box with a constant color so you are going to have edge effects with varying background, and it only works for that particular blue color. If the color is anything else, you'll have to determine a new C but you'll still have basically a uniform box on the image. But anyway, glad he was able to provide a solution that works for you. Though I would have done
newImage = regionfill(originalImage, mask);
instead. For a color image, you'll have to regionfill each color channel individually and recombine into the final RGB image.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!