Ask Your Question
0

Validate if object is completely in the image frame

asked 2020-03-18 11:33:52 -0600

stepovr gravatar image

Is there a way to check if any object of interest lies completely inside the frame of an image/video. The object should not be partially present in the frame but it should be 100% visible.

edit retag flag offensive close merge delete

Comments

just curious -- what's the context ? what do you need it for ?

berak gravatar imageberak ( 2020-03-18 13:24:21 -0600 )edit

I plan on using it to detect whether a plate of food is entirely in the frame or not. In a way to assist clicking pictures of food.

stepovr gravatar imagestepovr ( 2020-03-18 13:36:51 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-03-19 02:48:13 -0600

mvuori gravatar image

When you detect an object, you shoud get a contour or a rectangle or something that has a retrievable bounding box (perhaps with boundingRec()). Just check that all its points' coordinates are > 0 and less than height - 1 and width - 1.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-03-18 11:33:52 -0600

Seen: 1,758 times

Last updated: Mar 19 '20