MATLAB: How to convert form [xmin ymin xmax ymax] to [x y width height] in image

bboxoverlapratio

I have a detected box in [xmin ymin xmax ymax] but i need it in the format [x y width height] to use it in
overlapRatio = bboxOverlapRatio(bboxA,bboxB) How can i do this
thanks in advance

Best Answer

[xmin, ymin, xmax-xmin+1, ymax-ymin+1]