Want to remove white patches of a image
Mostra commenti meno recenti
Guys, I have a problem this is a jewelry photo that i have uploaded what i need to do is remove the white bright spot that is often appearing on the gold surfaces as well as the gemstones, these are the reflection of the lighting setup. What i am planning to do is find out the region of high white intensity that is with RGB values over 220 and then replace them by the average shade of the pixels around them, thus removing those white patches. Is this possible? Thanks a lot guys.
Risposta accettata
Più risposte (1)
Abhishek
il 23 Set 2024
0 voti

I have this image with me, I want to remove the background blurred white spots and create a outline for the forground bubbles, can you please help me for this?
6 Commenti
DGM
il 23 Set 2024
Define "foreground" and "background" in the context of this image. What apparent, measurable properties separate the two?
Abhishek
il 23 Set 2024
Thing is that, it is the issue first I tried to separate pixel value 200 to separate the background , it successfully worked, but there are some pixels of value 255 in the image ( lets say the maked one and there are more of this), they are blurred and located in the background and of different sizes. I have used 'bwareaopen' and selected a suitable area threshold value, but as they are of different sizes it did not worked, I have also used imregionfill but as majority of infocus bubble surfaces have pixel value of 255, it did not worked as well, I tried to adjust the lights and recapture the images but there are always these whit spots which are coming from reflection from the bubble surfaces which stays outside the focus regions. Depth map could be an option ,but is not possible to have the depth map with the camera that I am using. regading the property I can say the white spots are blurred as compared to infocus white areas.

Image Analyst
il 25 Set 2024
I'm pretty sure I saw this image in a different place and said to try stdfilt to find smooth/blurred and rough/variable places. Rather than hijack @arjun's question, why don't you post your own question, in a new thread, and attach the original image and code where you're trying stdfilt() to find the blurred regions.
DGM
il 25 Set 2024
Yeah. It might be nice to have depth information, but I can understand why that's not an option for high speed setups. Otherwise, we're pretty much left trying to infer depth from sharpness, so something like @Image Analyst's suggestion would probably be a start.
Abhishek
il 25 Set 2024
Hello Sir (@Image Analyst) , thanks for your valuable advice, I tried this stdfilt() with different settings, but it did not worked.Regarding posting this image posting here, actually I was trying to reach you ( @Image Analyst) , but not able to find where I can find , so I thought lets comment in a portion where you have commented or adviced something . Later on I saw your profile where you mentioned 'ask me anything'. But sorry for the trouble, please guide me in this regard, if this is possible for you. I will share the possible way and the result , at your place so that it will be helpful for you.
Regarding your reply sir (@DGM) , and also thanking you for understanding the problem Regarding depth map and sharpness.
Image Analyst
il 25 Set 2024
Categorie
Scopri di più su Lighting, Transparency, and Shading in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


