I need your knowledge to make my application, thanks in advance. Well, I'm using Android Studio - Java - Using the Google maps API, I generated several polylines on the map, I also added my current position, what I need is to generate a route that will take me to the nearest polyline and referring to the first image, I have a polyline with a certain number of coordinates represented by the red dots. The light blue dot would be my current position. What I need is to find the closest path to the polyline without needing it to be one of the coordinates
(PS: I don't speak English if you can explain me in the simplest way possible)
enter image description here
Aqui otros ejemplos
enter image description here
enter image description here
I found some examples but they all seek to
find the closest coordinate of the red points but the truth is that I
want the closest point to the polyline
, it is a challenge for me so I am looking for help.
enter image description here
Related
My requirement is to find the coordinates of skeleton of an image using JAVA. This is the actual image contour from which i ahve to find the skeleton
Below are my questions.
I could do that by using OpenCV Java but it has gaps and also it is not 1 pixel width. Can we get the skeleton(of 1 pixel width) with out gaps using Java's openCV?This is the skeleton got from openCV JAVA
I can also find the skeleton by using imageJ library of Java but the returned skeleton is in ByteProcessor with which I can not process further to get the coordinates of skeleton. Is there a way to convert ByteProcessor back to image(matrix) so that I can find the coordinates by using openCV findcontours()?
Apart from these two, are there any other way of finding skeleton of an image using Java.
Attached the images for reference. Please advice.
maybe you should use other words to describe your problem, if it describes better, you should better say you need an array with coordinates of the skeleton. I can propose you to make two pixel sliding window for each line and extract contour when pixels are different (blakc/white) then, just link extracting points in an array to get all coordinates
Here is an ImageJ-macro that gives you the coordinates:
orig=getTitle();
nme=split(orig, ".");
path=getDir("image")+nme[0]+".csv";
run("Duplicate...", "title=cpy");
run("Skeletonize");
run("Create Selection");
run("Save XY Coordinates...", "save="+path);
selectWindow(orig);
run("Restore Selection");
close("cpy");
open(path);
It should be easy to convert it to Java (just use the Recorder).
I have an array of Marker (google maps markers) with longitude and latitude.
I want to create some sort of radar like view that'll display these markers as points where I'm looking toward their directions with an angle of 45°.
Do you guys have any idea how I can say "This marker is behind me, this marker is in front of me".
I guess I should apply cos and sin considering my orientation, but that's too blurry atm.
Hope you'll help :)
Thanks
I assume you already know your location and orientation. You can then calculate the directions of the array of markers using computeHeading() method of Google maps Geometry Library on your current location and the points. Then you can adjust those values based on your current orientation.
I'am new in android development my problem is.
I have to find nearby coordinates from a data in a given radius in android.
For example when i click a button. It will search nearby coordinates listed in an array or in a database.
Example: My current coordinates is 1.1
Nearby coordinates will show : 1.2,1.3,1.4,1.5 which is stored or from my database/array.
Is this possible? Can someone help me. Any answer is really appreciated.
Thanks!
One approach is to simply use a geographical distance function.
Have a look at: http://www.movable-type.co.uk/scripts/latlong.html
This will give you some background information on what you are trying to do. I've used this website many times during work with UAVs. Also, keep in mind that you might need to convert to/from Deg/Min/Sec Lat & Longitude <-> decimal Latitude/Longitude.
Find the method for calculating distance - and there are many coded examples already out there - and then run each of your target points through it to find out how far each is from you.
Good luck!
I'm working on an OCR Project which reads an image and finds the words
in the image and slices them into small pieces where each piece will have a word.
Problem :
I want an OCR API ( Java , Open source recommended ) which find out word
edges for me. Is there anything available ?
I have already gone through Tesseract ( Tess4j) , JavaOCR.. But i couldnt find in
these anything about finding exact word locations.
Please share your ideas & knowledge...
What do you exactly mean by finding the edges? For example you want to find the coordinates of the rectangle which a word will fit in that and output these coordinates?
As far as I remember from the javaOCR code, you can see the part that draws rectangles over your image file and find out where the coordinates of the rectangles are come from!
I want to combine two images by overlapping them at some fixed x-axis displacement. Suppose There are two images and both are the left and right snaps of the same panoramic view ,
Now the problem is to find the X -axis displacement of the right
image overlapping the left one so that both pixels match and they
form the panoramic view.
The next issue is how they can be merged so that they feel like a single image without any defect.
I have to do this using android , but please tell me using java /android how this can be done.
The problem is complex. Note that each picture is a projection of word on plane. For each photo you can assume that point of projection is same but plane of projection is different. This means that common parts on each photo are distorted (bended) in different way.
This means that transition between photos is not linear and simple transition is not enough!
here you can find better description of the problem.