How to find 0 is present in any bounding box?

조회 수: 1 (최근 30일)
Jyosh Matlab
Jyosh Matlab 2021년 12월 4일
댓글: Jyosh Matlab 2021년 12월 6일
I am having a problem...bbox in matlab are like [w,x,y,z] so is there any code which help me to check if any of one out these 4 variables are 0.
And also if I am having more than one bbox in single image...so is that valid or invalid?
Thanks in advance.

채택된 답변

Walter Roberson
Walter Roberson 2021년 12월 4일
It is common to have more than one bounding box in an image. For example if you are tracking faces, then you would expect more than one bounding box if there were more than one face.
If you have a vector bbox that consists of [w,x,y,z] then to test if any of them are zero or negative,
any(bbox <= 0)
  댓글 수: 10
Walter Roberson
Walter Roberson 2021년 12월 5일
What results did you get?
The above is not intended as steps to fix the problem, the above is intended for you to tell us what the actual datatype is that is stored, so that we can give more correct code than we had above.
Jyosh Matlab
Jyosh Matlab 2021년 12월 6일
I'll let you know soon...right now I have not tested it yet.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by