Change bounding box dimension in Meshlab - bounding-box

Please, does anyone know how to change the dimension of the bounding box in MeshLab? enter image description here

That bounding box should enclose only the vertices that are in your mesh. In this case it looks like you must have some vertices in the top left where it appears empty. Use the Select Faces Tool and select that region and press Shift-Delete which will delete faces and vertices. The bounding box should reduce.

Related

Given a bounding box defined by 8 points, test whether a point is within the bounds of this box

Given a bounding box made up of 8 points in a 3D space, not aligned with any axis (example).
How can I test whether a point p is within the bounds of the box?
All questions I could find are either only about 2D, or axis-aligned bounding boxes, or creating a bounding box from points.

How can i estimate the pixel coordinates?

I have a project that I need to follow the points like in the picture. I made a picture like this as a representation. I get the coordinates of the red dots as pixel coordinates once per second. Is there a way I can predict the green dots when I don’t take measurements afterwards? When I use the 2d-kalman filter (x,y,x’,y’ states) it keeps guessing in the direction of the blue arrow. I want to make correct predictions on the green dots, not this way. How can I do that.!
Thanks.
Image

Coordinates of bounding box in an image

I am doing object detection in order to count penguins on a UAV georeferenced dataset, so for practical reasons let's say they appear as dots on the images. After running the object detection model, it returns inferred images with the corresponding bounding boxes for each penguin detected.
I need to extract the coordinate of the center of the bounding box (something like x,y), so, as the image is georeferenced, I would be able to convert image b.box center coordinates into GPS coordinates.
This picture is a good example. Here, the authors are counting banana plants, and after detecting the plants of the same regions in 3 differently-treated pictures of the same area, they see that up to three boxes appear around some of the plants (left). So in order to count each plant as one, despite having some of them up to 3 bboxes, this is what they do (quoted from the original article):
Collect bounding boxes of detection from each ROI tiles.
Calculate centroid of each bounding box.
Add the tile number information on x and y-value of centroids to overlay them on original ROI image.
And this is exactly what I am looking for, the step number 3, how to calculate the centroid of each bbox and how to obtain the x,y coords, so then I would be able to transform those coords into real ones, as the image is georeferenced, and then display each real coord on a mosaic.
Thank you very much in advance.
You could use the Intersection over Union algorithm to select one of the boxes and then use the coordinates of the selected box to plot the output circle or box over detected objects.

Locate words in binary image

I'd like to figure out a method for finding bounding boxes of words or a pair of words in binary image. The image itself looks like this: (bounding boxes I need are marked by blue rectangles).
Image is free of any other objects. I'm thinking about some form of connected component analysis, like detecting single letters first, then "drawing" their bounding boxes on another Mat object in such a way that neighbouring letters connect. There is a useful information I'd like to utilize - word or a pair of words forms a horizontal line, which is an information that could be used to separate "Hello there" and "abcdf" - I just don't know how to do it.
Contour the image.
Pick contours with a suitable area and width/height to be letters - get coords of centers.
From list of centers decide how far apart 2 centers can be to be adjacent letters
rather than a gap.
Group these contours into a word and take their
bounding box
Opencv has clustering, contour area and bounding box funcs if you don't want to do it yourself
Do OX-dilation using window size N, where N is approximate 1..2 size of letter width, then you will have black filled "boxes".
Find contours ( see http://docs.opencv.org/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html ).
Find rectangles and correct its with (minus approx 1 size of letter width) due to dilation width enlargement.

rotated crop in opencv

I am trying to crop a picture on right on along the contour. The object is detected using surf features and than i want to crop the image of extactly as detected.
When using crop some outside boundaries of other object is includes. I want to crop along the green line below. OpenCV has RotatedRect but i am unsure if its good for cropping.
Is there way to perfectly crop along the green line
I assume you get you get your example from http://docs.opencv.org/doc/tutorials/features2d/feature_homography/feature_homography.html, so what you can do is to find the minimum axis aligned bounding box around the green bounding box, crop it from the image, use the inverted homography (H.inv()) matrix to transform that sub image into a new image (call cv::warpPerspective), and then crop your green bounding box (it should be axis aligned in your new image).
You can get the equations of the lines from the end points for each. Use these equations to check whether any given pixel lies within the green box or not i.e. does it lie between the left and right lines and between the top and bottom lines. Run this over the entire image and reset anything that doesn't lie within the box to black.
Not sure about in-built functionality to do this, but this simple methodology is guaranteed to work. For higher accuracy, you may want to consider sub-pixel checks.

Resources