Identifying bright spots in RGB image
古いコメントを表示
I have hundreds of RGB images (one of the image is attached). For reference these are interference images and the RGB color values correspond to certain film thickness between a semi reflective glass surface and a steel surface. I apply electric potential across the surface and observed electric discharges which show as bright spots on the image (highlighted in red circle in attached image).
I want to write a script in MATLAB (2023a) that goes through the images, identify these bright spots stores there location in the XY cordinate system. The end goal is to show spatial distribution of the electric discharges.
3 件のコメント
Walter Roberson
2026 年 4 月 15 日
Question: Is there always exactly zero or one bright spots to be detected, or do some images have multiple bright spots?
dpb
2026 年 4 月 15 日
Second Q: Are these spots guranteed to be in the general background color area of the example? The difficulty in discerning differences is going to be very tough or completely impossible in some areas of the image.
I'd guess adding a few more "typical" images might be beneficial.
Ammad Yousuf
2026 年 4 月 15 日
回答 (1 件)
Image Analyst
2026 年 4 月 15 日
1 投票
If the spots are always about the same size and white, then you can just segment out white regions and then filter out things that are not small and round.
Convert to HSI color space
- Threshold the S channel to find bright, neutral colored regions.
- Call bwareafilt() to extract out things in the desired size range.
- Call regionprops to get the Centroid and Bounding Box or roundness.
- Compute aspect ratio and get rid of things that are not round.
Let me know if you need help figuring it out. Attach more images also.
6 件のコメント
Ammad Yousuf
2026 年 4 月 15 日
Image Analyst
2026 年 4 月 15 日
It depends on if the white spots are all about the same intensity. If they are you can do it in RGB space just thresholding each color channel independently and ANDing the binary images together. If they have varying brightnesses, then convert to HSI space because that will let you find all neutral colored regions regardless of what intensity they are.
Ammad Yousuf
2026 年 4 月 16 日
編集済み: Ammad Yousuf
2026 年 4 月 16 日
dpb
2026 年 4 月 16 日
Those are the sort of thing I was envisioning that are going to be extremely difficult to pick out, I suspect. I doubt edge detection is going to be of much help there, there really isn't any edge to detect.
It's probably too late, but I'd think taking the images through a filter initially might have helped....or a thermal instead of visual image, maybe?
I suggest you try a tophat filter. It's meant for this kind of object. Get SE with strel using a disc of radius 1, 2, or 3 or whatever is best.
help imtophat
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
