How to calculate x,y coordinates from bounding box values

Senthil :

I want to crop an image using its x,y coordiates using BufferedImage.getSubimage(x,y,width,height) function in java. But i only have bounding box of an image to crop some part of it.

How can i get x,y coordinates from bounding box using java? Is there any calculation available?

I am giving bounding box values (xMin,yMin,xMax,yMax)(0.46476197,0.46967554,0.8502463,0.67080903 )enter image description here

Senthil :
I am multiplying bounding box values with image width and height respectively to get its pixel values. 

int y1 = yMin * ImageHeight;
int x1 = xMin * ImageWidth;
int y2 = yMax * ImageHeight;
int x2 = xMax * ImageWidth;

And applied the values to below given formula

BufferedImage.getSubimage((int)x1, (int)y1, (x2-x1), (y2-y1));

Thanks gilbert for giving solution to get pixel values.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Calculate bounding box width and height from given coordinates(x,y)

From Dev

How to get the bounding box x y coordinates of the detected faces

From Dev

Given coordinates on a globe, calculate a rectangular bounding box

From Dev

How to get coordinates of a bounding box at a certain distance from a point in postGIS?

From Dev

How to calculate bounding box area?

From Dev

Wrong y,x coordinates for XObject Form Bounding Box - PDFBOX

From Dev

How to get the coordinates of a bounding box in YOLO?

From Dev

How to convert bounding box coordinates to radius?

From Dev

How to convert Bounding Box coordinates to COCO format?

From Dev

Calculate rotated rectangle transform using bounding box coordinates

From Dev

coordinates of bounding box in tensorflow

From Dev

How to convert Bounding Box coordinates to Yolo Coordinates with Python?

From Dev

Python - Creating a shape file from a bounding box coordinates list

From Dev

Get coordinates to generate bounding box from OpenCV output image

From Dev

How to crop regions of interest in an image using bounding box coordinates?

From Dev

How to get the coordinates of the bounding box in YOLO object detection?

From Dev

How to convert Yolo format bounding box coordinates into OpenCV format

From Dev

After cropping a image, how to find new bounding box coordinates?

From Dev

How to find paragraph bounding box coordinates in a scanned document?

From Dev

opencv-python: how to crop image with bounding box coordinates

From Dev

Determine if coordinates is within bounding box

From Dev

How to calculate centroid of x,y coordinates in python

From Dev

How to calculate coordinates X and Y of a ellipse with angle

From Dev

How to calculate a triangular interpolation from values in coordinates in Matlab?

From Dev

How to calculate bounding box of text object on dynamic canvas

From Dev

How to calculate a bounding box for a rectangle rotated around its center?

From Dev

How to calculate a bounding box for a rectangle rotated around its corner?

From Dev

Calculate bounding box of line with thickness

From Dev

How to calculate lattitude and longitude from x-y coordinates for geotagged images

Related Related

  1. 1

    Calculate bounding box width and height from given coordinates(x,y)

  2. 2

    How to get the bounding box x y coordinates of the detected faces

  3. 3

    Given coordinates on a globe, calculate a rectangular bounding box

  4. 4

    How to get coordinates of a bounding box at a certain distance from a point in postGIS?

  5. 5

    How to calculate bounding box area?

  6. 6

    Wrong y,x coordinates for XObject Form Bounding Box - PDFBOX

  7. 7

    How to get the coordinates of a bounding box in YOLO?

  8. 8

    How to convert bounding box coordinates to radius?

  9. 9

    How to convert Bounding Box coordinates to COCO format?

  10. 10

    Calculate rotated rectangle transform using bounding box coordinates

  11. 11

    coordinates of bounding box in tensorflow

  12. 12

    How to convert Bounding Box coordinates to Yolo Coordinates with Python?

  13. 13

    Python - Creating a shape file from a bounding box coordinates list

  14. 14

    Get coordinates to generate bounding box from OpenCV output image

  15. 15

    How to crop regions of interest in an image using bounding box coordinates?

  16. 16

    How to get the coordinates of the bounding box in YOLO object detection?

  17. 17

    How to convert Yolo format bounding box coordinates into OpenCV format

  18. 18

    After cropping a image, how to find new bounding box coordinates?

  19. 19

    How to find paragraph bounding box coordinates in a scanned document?

  20. 20

    opencv-python: how to crop image with bounding box coordinates

  21. 21

    Determine if coordinates is within bounding box

  22. 22

    How to calculate centroid of x,y coordinates in python

  23. 23

    How to calculate coordinates X and Y of a ellipse with angle

  24. 24

    How to calculate a triangular interpolation from values in coordinates in Matlab?

  25. 25

    How to calculate bounding box of text object on dynamic canvas

  26. 26

    How to calculate a bounding box for a rectangle rotated around its center?

  27. 27

    How to calculate a bounding box for a rectangle rotated around its corner?

  28. 28

    Calculate bounding box of line with thickness

  29. 29

    How to calculate lattitude and longitude from x-y coordinates for geotagged images

HotTag

Archive