how separate overlapping objects?

1 vue (au cours des 30 derniers jours)
Rob
Rob le 22 Oct 2012
Hello, I have an image with two overlapping squared objects of the same size and colour. They are on a uniform backround and one object exceeds the other from the left with with a 10 degrees tilt. I need to extract the object on the top. How can I proceed?. Thanking you in advance for your help.
  1 commentaire
Rob
Rob le 22 Oct 2012
sorry, I said same colour but in fact they have different shades of blue but small variation.

Connectez-vous pour commenter.

Réponses (1)

Vidhi Agarwal
Vidhi Agarwal le 12 Juin 2025
Hi @Rob,
I understand you are trying to extract the top overlapping object in an image with two similar blue squares (small color variation, ~10° tilt, and on a uniform background). Below are the rough steps that can help you in getting started:
  • Read the image in MATLAB.
  • Convert it to greyscale or HSV: Since the color difference is small but consistent, using hue or intensity helps.
  • Segment the Top Object by Thresholding: Use adaptive or manual thresholding on hue or intensity.
  • Clean and Rotate-Aware Processing: Use morphological operations to isolate connected tilted regions.
  • Find Tilted Top Region Using Region Properties: Use "regionprops" to get orientation and bounding box.
  • Extract the Object from Original Image.
For better understanding of "regionprops" refer to: https://www.mathworks.com/help/images/ref/regionprops.html
Hope this helps!

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by