coordinates

Extract Images and Words with coordinates and sizes from PDF

回眸只為那壹抹淺笑 提交于 2019-11-30 13:39:29
I've read much about PDF extractions and libraries (as iText) but i just haven't found a solution to extract images and text (with coordinates) from a PDF. The task is to scan PDF with catalog of products and extract each image. There is an image code printed next to each image and also a list of product codes for products that are shown on the image. I know that there is no way to extract structured info from a PDF like this but with coordinates of all image and text objects I could write code to identify linked text by its distance from the image. Then I could split text using a RegExp and

Get screen coordinates of DOM element

ε祈祈猫儿з 提交于 2019-11-30 13:07:47
Can I somehow get precise screen coordinates (relative to top left corner of the screen) of a DOM object. Through NPAPI\FireBreath or JavaScript. (Need this for plugin, that I'm writing with FireBreath) you move cursor to somewhere of the page ,and make a click event.(find the window,then GetWindowRect ,caculate a sutable position) then you can catch the event,record clientX and clientY. By this ,you build a bridge between two different coordinate system. Max Yari P.S.: I know I made this question long ago, but I want to summarize what I got at the end. element.offsetLeft\Top doesn't work

How can I calculate a trend line in PHP?

こ雲淡風輕ζ 提交于 2019-11-30 11:37:28
问题 So I've read the two related questions for calculating a trend line for a graph, but I'm still lost. I have an array of xy coordinates, and I want to come up with another array of xy coordinates (can be fewer coordinates) that represent a logarithmic trend line using PHP. I'm passing these arrays to javascript to plot graphs on the client side. 回答1: Logarithmic Least Squares Since we can convert a logarithmic function into a line by taking the log of the x values, we can perform a linear

Convert lat/long to pixel X&Y co-ordinates

China☆狼群 提交于 2019-11-30 10:48:02
This type of question seems to have been asked numerous times but none of the solutions posted get me anywhere near the answer I need. I have this map of Northland, New Zealand and I'd like to map Lat/Long values to x/y (pixel) values on this image (http://i.stack.imgur.com/3ok4O.gif - which is 400px square) Right now I do not know the precise lat/long boundaries of this image, but I do have some example data which should be useful to someone who knows what they are doing. LAT LONG X Y -35.3989854471 173.504676819 192.92777494 196.760481649 -35.2647882735 174.121499062 271.426291418 176

Kinect - Map (x, y) pixel coordinates to “real world” coordinates using depth

橙三吉。 提交于 2019-11-30 10:23:59
I'm working on a project that uses the Kinect and OpenCV to export fintertip coordinates to Flash for use in games and other programs. Currently, our setup works based on color and exports fingertip points to Flash in (x, y, z) format where x and y are in Pixels and z is in Millimeters. But, we want map those (x, y) coordinates to "real world" values, like Millimeters, using that z depth value from within Flash. As I understand, the Kinect 3D depth is obtained via projecting the X-axis along the camera's horizontal, it's Y-axis along the camera's vertical, and it's Z-axis directly forward out

The X angle between two 3D vectors?

帅比萌擦擦* 提交于 2019-11-30 10:03:48
I have two 3D vectors called A and B that both only have a 3D position. I know how to find the angle along the unit circle ranging from 0-360 degrees with the atan2 function by doing: EDIT: (my atan2 function made no sense, now it should find the "y-angle" between 2 vectors): toDegrees(atan2(A.x-B.x,A.z-B.z))+180 But that gives me the Y angle between the 2 vectors. I need to find the X angle between them. It has to do with using the x, y and z position values. Not the x and z only, because that gives the Y angle between the two vectors. I need the X angle, I know it sounds vague but I don't

Convert longitude/latitude to x/y on iPhone

末鹿安然 提交于 2019-11-30 09:50:56
I am showing an image in an UIImageView and i'd like to convert coordinates to x/y values so i can show cities on this image. This is what i tried based on my research: CGFloat height = mapView.frame.size.height; CGFloat width = mapView.frame.size.width; int x = (int) ((width/360.0) * (180 + 8.242493)); // Mainz lon int y = (int) ((height/180.0) * (90 - 49.993615)); // Mainz lat NSLog(@"x: %i y: %i", x, y); PinView *pinView = [[PinView alloc]initPinViewWithPoint:x andY:y]; [self.view addSubview:pinView]; which gives me 167 as x and y=104 but this example should have the values x=73 and y=294.

Python - Batch convert GPS positions to Lat Lon decimals

南笙酒味 提交于 2019-11-30 09:12:48
问题 Hi I have a legacy db with some positional data. The fields are just text fields with strings like this 0°25'30"S, 91°7'W . Is there some way I can convert these to two floating point numbers for Decimal Latitude and Decimal Longitude ? EDIT: So an example would be: 0°25'30"S, 91°7'W -> 0.425 , 91.116667 where the original single field position yields two floats. Any help much appreciated. 回答1: This approach can deal with seconds and minutes being absent, and I think handles the compass

Creating 2D coordinates map in Python

故事扮演 提交于 2019-11-30 09:01:10
I'm not looking for solution, I'm looking for a better solution or just a different way to do this by using some other kind of list comprehension or something else. I need to generate a list of tuples of 2 integers to get map coordinates like [(1, 1), (1, 2), ..., (x, y)] So I have the following: width, height = 10, 5 Solution 1 coordinates = [(x, y) for x in xrange(width) for y in xrange(height)] Solution 2 coordinates = [] for x in xrange(width): for y in xrange(height): coordinates.append((x, y)) Solution 3 coordinates = [] x, y = 0, 0 while x < width: while y < height: coordinates.append(

C# Foreach XML Node

馋奶兔 提交于 2019-11-30 08:50:00
I'm saving 2-dimensional coordinates on an XML file with a structure similar to: <?xml version="1.0" encoding="utf-8" ?> <grid> <coordinate time="78"> <initial>540:672</initial> <final>540:672</final> </coordinate> </grid> I can open the XML file and read it via the XmlTextReader, but how do I loop through the coordinates specifically to retrieve both the time attribute and data between the initial and final nodes in some format similar to: string initial = "540:672"; string final = "540:672"; int time = 78; New Code: My New Code: //Read the XML file. XDocument xmlDoc = XDocument.Load("C:\