0

I have a picture of a truck from the side.Also, using the background removal, I have a binary image of the truck.

background image

foreground image

Binary image

I've also been able to locate wheels in the truck.Then remove the top of the wheels in the image.Like what you see in the picture below.

Tire Detection

Truck load peace

I want to do two things now. 1- Find the "Place of Load" in the truck. 2. Find the truck. Like what you see in the picture below.

enter image description here

please help.Does anyone have an idea for this?

kasra
  • 55
  • 7
  • You have your solution with the wheels! That portion of contour above **more** than one wheel is the position of the load! The other contour would definitely be the truck. This would work even if the truck is flipped – Jeru Luke May 31 '18 at 17:19

1 Answers1

0

If after cropping the top part of truck, you are getting two independent contours, then try to use findContours function from OpenCV and based on the contours' area and pixel locations with respect to each other, you can label them. If you are not getting independent two contours, try to use morphological operations like Erosion to separate them.

Jazz
  • 916
  • 1
  • 8
  • 22
  • This might not work in all cases. Why? Because in some cases the trucks might have a huge load making that portion of the contour appear huge. In the case of the provided image the load appears to be smaller – Jeru Luke May 31 '18 at 17:00