Home > Net >  Algorithm: a camera rotation Angle, zoom multiples, relations with screen coordinates
Algorithm: a camera rotation Angle, zoom multiples, relations with screen coordinates

Time:10-04

Screen resolution 2 k (1920 x1080)
Level of camera Angle 0-360 (closed loop)
Vertical Angle camera - 20.5 to 84.5

Suppose I on the camera image of an object, add a tag
Algorithm whether a camera rotation, zooming,
Make the label always hovering on the object,

CodePudding user response:

To capture the image set label directly by the ah, why to set camera movements from the new coordinates, that if the camera did not move, moving object? Then you according to the camera movement algorithm is useless ah, don't know your program specific application scenarios, program implementation to which step ~

CodePudding user response:

You should be able to get to the two angles of cameras (level perspective) and Angle (vertical), can according to the latitude and longitude coordinates calculation,

1. Calculate the first label of latitude and longitude (according to the aperture, the camera Angle to calculate the current image start longitude border (left) end longitude (right even the world), start latitude (border) under the end latitude (border), according to the above data divide this bitmap, the latitude and longitude of the tag,

2. Calculate the current scope of the latitude and longitude of cameras

3. The labels are within the scope of the

4. A label

CodePudding user response:

refer to the second floor jx315425246 response:
you should be able to get to the two angles of cameras (level perspective) and Angle (vertical), can according to the latitude and longitude coordinates calculation,

1. Calculate the first label of latitude and longitude (according to the aperture, the camera Angle to calculate the current image start longitude border (left) end longitude (right even the world), start latitude (border) under the end latitude (border), according to the above data divide this bitmap, the latitude and longitude of the tag,

2. Calculate the current scope of the latitude and longitude of cameras

3. The labels are within the scope of the

4. Place the tag

Now label is no problem, the lens in a zoom level mobile TAB can be fixed on a point, is mainly to resize and zoom label after moving

CodePudding user response:

reference 1/f, 711 glaciers response:
Settings TAB to capture image directly by the ah, why to set camera movements from the new coordinates, that if the camera did not move, moving object? You according to the camera movement algorithm is useless ah, don't know your program specific application scenarios, and the programs to realize which step ~

Picture of an object is static, now has the lens in a zoom level mobile tags can be fixed at one point, is mainly to resize and zoom label after moving

CodePudding user response:

reference pumpkin mulberry reply: 3/f
Quote: refer to the second floor jx315425246 response:

You should be able to get to the two angles of cameras (level perspective) and Angle (vertical), can according to the latitude and longitude coordinates calculation,

1. Calculate the first label of latitude and longitude (according to the aperture, the camera Angle to calculate the current image start longitude border (left) end longitude (right even the world), start latitude (border) under the end latitude (border), according to the above data divide this bitmap, the latitude and longitude of the tag,

2. Calculate the current scope of the latitude and longitude of cameras

3. The labels are within the scope of the

4. Place the tag

Now label is no problem, the lens in a zoom level mobile TAB can be fixed on a point, is mainly to resize and zoom label mobile cannot be achieved after


After you zoom in and zoom to see the code

CodePudding user response:

reference 5 floor jx315425246 reply:
Quote: refer to the third floor pumpkin mulberry response:

Quote: refer to the second floor jx315425246 response:

You should be able to get to the two angles of cameras (level perspective) and Angle (vertical), can according to the latitude and longitude coordinates calculation,

1. Calculate the first label of latitude and longitude (according to the aperture, the camera Angle to calculate the current image start longitude border (left) end longitude (right even the world), start latitude (border) under the end latitude (border), according to the above data divide this bitmap, the latitude and longitude of the tag,

2. Calculate the current scope of the latitude and longitude of cameras

3. The labels are within the scope of the

4. Place the tag

Now label is no problem, the lens in a zoom level mobile TAB can be fixed on a point, is mainly to resize and zoom label mobile cannot be achieved after


After you zoom in and zoom to see the code

Code after the zoom in and zoom, because haven't do it, zoom multiples can take to normal

CodePudding user response:

refer to 6th floor pumpkin mulberry response:
Quote: refer to the fifth floor jx315425246 reply:

Quote: refer to the third floor pumpkin mulberry response:

Quote: refer to the second floor jx315425246 response:

You should be able to get to the two angles of cameras (level perspective) and Angle (vertical), can according to the latitude and longitude coordinates calculation,

1. Calculate the first label of latitude and longitude (according to the aperture, the camera Angle to calculate the current image start longitude border (left) end longitude (right even the world), start latitude (border) under the end latitude (border), according to the above data divide this bitmap, the latitude and longitude of the tag,

2. Calculate the current scope of the latitude and longitude of cameras

3. The labels are within the scope of the

4. Place the tag

Now label is no problem, the lens in a zoom level mobile TAB can be fixed on a point, is mainly to resize and zoom label mobile cannot be achieved after


After you zoom in and zoom to see the code

Code after the zoom in and zoom, because haven't do it, zoom multiples can be normal to

Zoom in and zoom, due to the changes of the lens latitude and longitude, bitmap also corresponding change, resulting in the change of the label position, to calculate the zoom ratio and the proportion of the longitude and latitude, on the basis of multiple 1, with the original direct multiplication can be concluded that the current latitude and longitude latitude and longitude

CodePudding user response:

Center of first and center coordinates, then the object with xy distance, zoom and center coordinates is constant, according to zoom multiples, with center distance, to calculate the corresponding mobile label can,

CodePudding user response:

refer to the eighth floor tanta response:
first center coordinates, then the object with the center distance of x, y, zoom and center coordinates is constant, according to the zoom multiples, with center distance, to calculate the corresponding mobile tag,

I was thinking, it's a pity that mathematics is too bad, the label distance is not to come out

CodePudding user response:

reference, pumpkin, 9/f, mulberry response:
Quote: refer to the eighth floor tanta response:

Center of first and center coordinates, then the object with xy distance, zoom and center coordinates is constant, according to zoom multiples, with center distance, to calculate the corresponding mobile label can,

I was thinking, it's a pity that math is too bad, the label distance is not to come out


Simple scaling with plane rectangular coordinate, rotating, suggested under polar coordinates, will be more simple, of course, also can use matrix,

CodePudding user response:

If the camera position is fixed, the focal length set, the label is image coordinate graticule pitch values of the current position and target position offset, deposit the variables displayed into the field of view is good
If the focal length, the current levels for camera field of view Angle \ vertical field of view Angle, and calculate the unit pixel corresponds to how many degrees, according to the above method processing
  •  Tags:  
  • C#
  • Related