Map data points onto an image in google sheets? - google-sheets

I'd like to be able to plot points onto this image automatically based on a data set in google sheets. Is this possible? If so, how do you do it?
Edit: For example, if I have the data
#1 - 7,8
#2 - 8,7
I'd like to plot those on the map like so:
First, I think I could have a stored table of the center pixel coordinates of each hex, then vlookup the coordinates (e.g. 8,7) on that table to pull the pixel coordinates. Then I have pixel coordinates to plot on the image, I am just unsure of how to plot them.

I ended up making a scatterplot on top of it using vlookup to convert the hex coordinates above to x and y pixel coordinates on the image.

Related

find rectangle coordinates in a given image

I'm trying to blindly detect signals in a spectra.
one way that came to my mind is to detect rectangles in the waterfall (a 2D matrix that can be interpret as an image) .
Is there any fast way (in the order of 0.1 second) to find center and width of all of the horizontal rectangles in an image? (heights of rectangles are not considered for me).
an example image will be uploaded (Note I know that all rectangles are horizontal.
I would appreciate it if you give me any other suggestion for this purpose.
e.g. I want the algorithm to give me 9 center and 9 coordinates for the above image.
Since the rectangle are aligned, you can do that quite easily and efficiently (this is not the case with unaligned rectangles since they are not clearly separated). The idea is first to compute the average color of each line and for each column. You should get something like that:
Then, you can subtract the background color (blue), compute the luminance and then compute a threshold. You can remove some artefact using a median/blur before.
Then, you can just scan the resulting 1D array filled with binary values so to locate where each rectangle start/stop. The center of each rectangle is ((x_start+x_end)/2, (y_start+y_end)/2).

How find the peek value of a image plot? (Plot Digitizer)

I want to extract the peek value from a plot automatically.
I searched web plot digitizer and other programs and packages, however none of them gives points on the plot automatically. Is there any way to achieve this by using image processing such as CNN ?
I am thinking to make custom filters to find peek point.
Thanks in advance.
Sample plot
Algorithm
convert to gray-scale and binarize
find coorditates of a white pixel (x,y) where y is minimal nonzero values
add to y the blob radius y=y+r
make the scale transformation from range [0,image_height] to your range [0,25]
calculate new value of y under the transformation

Display 2-D GIS polygon in 3-D street-level view

I would like to drape some 2-D GIS polygon into a ā€˜3-Dā€™ street level?
As a a picture is worth a thousand words, please check this:
So I have the azimuth angle, the view angle and the position where the image was taken along with the field limit in 2D and I would like to have the field plotted on my street-level image (as on the top image).

Disparity Map vs Left Image(reference image)

I'm really having a hard time matching every pixel of the image with its corresponding disparity value, as the disparity map is way more shifted to the right than the original image. And it looks more stretched than the original.
As you can see, the object in the original image is way thinner than its disparity. How can I fix this?
Since I cannot figure out how to retrieve the original (x,y) of points from the original image using when using reprojectImageTo3D

Calculate fill percentage in polygon/shape/UIBezierPath

I have a polygon drawn as an UIBezierPath with 5 coordinates. It is correctly shown and the area is calculated, now I want a button that starts filling the shape until the button is released and calculate the percentage of the filled area. How can I do this efficiently?
On the left image there's the current implementation, the right one is what should look like after the logic is implemented.
Thank you in advance!
The polygon being filled has five vertices. Assuming it to be convex, the polygon describing the filled area has either five or six vertices, truncating the original with a horizontal line.
Collect the vertices for these to polygons as two arrays of #[x,y] pairs, and apply this formula to each to compute the areas.
The polygon being filled is constant, so its area need only be computed once. For the filled polygon, as soon as the fill line y is greater than any vertex y, the x*y term for that vertex becomes constant, so you could save a little computational effort there. But, just to get it working, I'd start by recalculating the whole fill area each time the fill line changes. Five or six vertices is peanuts, FPU-wise.

Resources