FAQ Database Discussion Community


Creating stereoParameters class in Matlab: what coordinate system should be used for relative camera rotation parameter?

matlab,computer-vision,coordinate-systems,camera-calibration,matlab-cvst
stereoParameters takes two extrinsic parameters: RotationOfCamera2 and TranslationOfCamera2. The problem is that the documentation is a not very detailed about what RotationOfCamera2 really means, it only says: Rotation of camera 2 relative to camera 1, specified as a 3-by-3 matrix. What is the coordinate system in this case ? A...

gluUnProject gives flippped y position

opengl,3d,coordinate-systems
I have set up openGL, so that the origin is at the top left corner. However, using gluUnProject to convert mouse coordinates to OpenGL coordinates, still gives me coordinates where the origin is at the bottom left corner and I am not sure why that is. So, OpenGL is setup...

Determine if coordinate is inside region (MKMapView, solve in PHP)

php,mkmapview,latitude-longitude,coordinate-systems
I'm using MKMapView and I send my php program the visible region (center lat, center lon, span lat, span lon). I need to determine if a coordinate is inside that region using php. I'm hoping there's a standard formula somewhere, but I haven't found one. I'll keep trying to come...

Best way to avoid divide by zero while doing math on geometric shapes

geometry,coordinate-systems,divide-by-zero
I'm coding on a specialized motion controller hardware which uses a subset of Visual Basic language as its programming language. I need to make some calculations on given points, like getting center coordinates of an arc that is passing through 3 distinct points; shifting lines, getting intersection coordinates of 2...

Error in using gdal java binding

java,transformation,gdal,coordinate-systems
I am using the java binding of gdal to project a set of coordinate points from UTM to lat/log using the CoordinateTransformation Class of gdal. I have written the code as follows: SpatialReference oUTM = new SpatialReference(); SpatialReference oLatLog = new SpatialReference(); oUTM.SetProjCS("UTM 44/ WGS84"); oUTM.SetWellKnownGeogCS("WGS84"); oUTM.SetUTM(44, 1); oLatLog =...

iOS: convert CGPoint in screen coordinates to CATransform3D in iCarousel?

ios,coordinate-systems,cgpoint,icarousel,coordinate-transformation
I wanted to add a possibility to drag elements inside the carousel and I have some troubles with positioning and transformations of a draggable element. As I understand it is better to temporarily hide/delete the draggable element and create its proxy outside the carousel item array which represents the position...

How to convert coordinates between different coordinate systems with JMapProjLib, Proj4j or Proj4js?

java,javascript,coordinate-systems,wgs84,proj4js
I'm creating an Android app (with Java) which is going to read SWEREF99 TM coordinates from a file, and convert them to WGS84 (long-lat) coordinates, and in the oposite direction. To do this, I'm going to use either JMapProjLib, Proj4j or Proj4js (JavaScript library which I'm going to access using...

Convert PictureBox Selection Rectangle according to SizeMode

c#,selection,picturebox,coordinate-systems
I have two PictureBoxes pbOriginal and pbFace. After Selecting a "face" from an image in pbOriginal I clone the rectangle selection and place it into pbFace. However, Because pbOriginal is using SelectionMode=Stretch the actual area being copied is not the same as the area being selected. How do I convert...

Can I use Proj4 to project points onto a flat plane?

java,coordinate-systems,proj
I am working on a batch process for generalizing data (Using a combination of algorithms including Douglas Peucker). Since both the source data (from ESRI shape files) and the required output format data can be in a variety of coordinate reference systems, I am using Proj4j to convert the data...

C# How to Position a Parent Form using Client Coordinates?

c#,forms,winapi,properties,coordinate-systems
I have a main form (application's parent form) which is set to the back using p/Invoke SetWindowPos. SetWindowPos asks for the X,Y coordinates of the window which are to be in Client Coordinates. When I start the program the window is displayed center of screen. I then move the window...

Reprojecting coordinates using GDAL library

c++,gdal,coordinate-systems,mingw-w64
I'm trying to reproject a lat/lon coordinate in the WGS84 system to an UTM one in the SIRGAS 2000 coord system. Using GDAL, I started with changing a known utm coordinate to the lat/lon counterpart in the same coordinate system (29 N), just to check that I wrote the right...

What is this algorithm mapping coordinates to numbers called?

algorithm,coordinates,coordinate-systems,coordinate
I'm writing a program for visualizing crystals. As a part of the program, I have to generate all different basic points in a lattice structure. For those that aren't familiar with crystallography, you can find the most general cases of these structures here: https://en.wikipedia.org/wiki/Hermann%E2%80%93Mauguin_notation#Lattice_types The problem was that I wanted...

Find an angle representing the direction of travel from origin coordinates

java,canvas,javafx,coordinates,coordinate-systems
I'm working on an animation where a number of triangular objects move across the screen. In order to ensure each faces the direction in which it is travelling, I need to rotate the image by the appropriate angle. My problem is that the angle my code returns does not accurately...

opengl: Change the origin to upper left corner

opengl,3d,coordinate-systems
I am having trouble setting the openGL origin to the upper left corner of the view. So, in my window resize handler, I do something as; // ox and oy are some offsets and width and height are the // required viewport width and height glViewport(ox, oy, width, height); glMatrixMode(GL_PROJECTION);...

OpenGL fixed coordinate transformations

opengl,coordinate-systems,rotational-matrices
Was just trying to do some rendering with OpenGL and I happened to think about that: how would you run transformations in a fixed coordinate system. In other words, if you rotate an object around one axis you will see that the others are going to rotate too? Therefore, following...

How to convert a point in image imrotated with loose option to a point in image imrotated with crop option in Matlab?

image,matlab,image-processing,matlab-figure,coordinate-systems
How to find the relation between image imrotated with loose option Image 1 and image imrotated with crop option Image 2 ? the angle of rotation is not necessary -45° ... I = imread('cameraman.tif'); Im1 = imrotate(I,-45); % bbox option sets to 'loose' by default Im2 = imrotate(I,-45,'nearest','crop'); % bbox...