Detecting a rectangular reference panel in the image
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mohammad Gohardoust
el 10 de Mayo de 2022
Comentada: Mohammad Gohardoust
el 12 de Mayo de 2022
I am trying to calibrate some hyperspectral images of a farm field. As part of the process, I need to detect the reference reflectance panel in the RGB image that I construct from three hyperspectral bands:

I need to extract the rectangular panel (which is composed of four smaller rectangles). I am wondering what would be the best way to achieve this? I tried the color thresholding technique but since the thresholds might vary from one image to another, I couldn't get a universal answer.
0 comentarios
Respuesta aceptada
Image Analyst
el 10 de Mayo de 2022
Why would the threshold change? Do you have gray background? If all your backgrounds are colored, I'd just convert to HSV, then threshold the S channel at about 0.25 to get the gray stuff. Take the largest blob, or the blob at the center (if that is where it always is). Then get the histogram of the rectangle to find the 4 intensity levels if you need them. Shouldn't be hard at all. Show me the code from the Color Thresholder app that you exported.
3 comentarios
Image Analyst
el 10 de Mayo de 2022
I didn't try it but if you just want to get the largest blob, use bwareafilt(). If it's not the largest, then maybe it has the highest solidity so ask regionprops for Solidity, which will be 1 for convex objects, like a rectangle, and less than 1 for irregularly-shaped regions.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!