Highlight points that are not placed in a plane - arcore

Is it possible to highlight all tracked points that are not placed on planes using Sceneform, just like the hello_ar sample?

Related

How can I determine co-ordinates of the lane?

I am using opencv to determine coordinates the lane between two red lines like this:
Lane-detection:
It is not rectangle so I can't use cv2.rectangle to cover on it.
Does everyone have some ideas?

Detecting contours of predefined shape with OpenCV

I'm working on a project which locates the Machine Readable Zone on ID cards.
For this I need to do some pre processing to extract the ID card from a scanned image which typically are randomly disposed on a white page. I'm able to locate the majority of the cards by using a Histogram equalization with CLAHE before a contour detection. But in some cases the border around the MRZ is totally invisible (white on white) as shown on the attached image.
I'd like to detect rectangle of a predefined shape as I know the shape of the ID card will be always the same but so far I wasn't able to find a way do do something like this with OpenCV.
Basically what I need is to find two rectangle of a fixed ratio that best match the 2 cards on the scan.
I'm wondering if I need to try OpenCV matchers or if there is a simpler way to accomplish this kind of detection.
The solution to you problem is likely going to be matrix transformations. The concept is to pinpoint 4 coordinates on the card that can be easily detected using opencv, such as the the rectangle colored in blue & cyan.
Have coordinates of the card with the predefined shape stored in an array, where a corner of the card is at the 0, 0. Also store the coordinates of the blue * cyan rectangle in an array. With the two arrays you can find the perspective transform of the two arrays using the cv2.getPerspectiveTransform method.
Using the perspective transform found, you can detect the coordinates of the whole card every time you detect the coordinates of the blue & cyan rectangle.

Calculate the distances between points of different colours in FIJI/ImageJ

I'm trying to calculate the distances between points of different colours, as shown in this image:
The goal is to use a macro to print the distances from the red dot to the yellow dot and then the yellow dot to the purple dot. I believe the best way to do this is to either:
1) Use a macro to print the coordinates of the red dots, and then a macro to print the coordinates of the closest yellow dots. Then a second macro to print the coordinates of the purple dots closest to a given yellow dot. I would also like to calculate the angle of the line relative to the center point, but I believe I can do this in Excel if I'm given the XY coordinates of each point as well.
2) Drawing lines between the red and yellow points and the yellow and purple points, printing the length and angle of those lines.
Ideally being able to do both would be good, but either would work for my purposes (calculating the distance and angle of the lines between the points from red to yellow and yellow to purple).
What is the best way to do this via macro? There are some examples (like this) but I don't believe it 1) selects for points based on colour or 2) picks the next closest point automatically.
Try using the Threshold Color function, I should think it would allow you to select your colors individually. You can then get the coordinates for your different points by selecting "centroid" from the Analyze menu. The calculations for the angles and distances can be done then in Excel if you use the closest coordinates for the relevant colors.

Crop the region of interest with few points available

I have used convex hull and convexity defects and found the points in the hand as shown below.
With the above points information available, how can I crop the region marked in red (Knuckle) as shown in the below image.
My intention is to detect the Knuckles in the hand.
Note: The green region drawn is using "Draw contours". Is it possible to use this region to crop the red marked area ( Knuckle ). How to crop these regions.
Update ( 26/2/2014 ):
I have found contour points as below. With the below information in hand is it possible to find the knuckle region. Is there any ways to find using the points.
Since you already know the red position, all you want is to crop this region?
It's very easy, you just need to set a ROI (Region of interest) and to copy this region to another image. Like this (in pseudo-code since I don't have an open CV project up and running)
img1.ROI = varRedRectangle
img1.copyTo(img2)
img1.ROI = null;
If your question is how to detect the red section, I think you need to do like anyone in image recognition and work a lot because there is tons of way to do it nobody here will find them for you.
Hope it helps!
If your idea is to detect those red areas you can use the following simple idea.
Get edge image and remove the edges outside the green boundary.
Apply Horizontal histogram to get separate the strips.
In each take vertical histogram and locate the bins with values within a neighbourhood of the peak. (Lets call these as Peak Bins)
The longest contiguous sequence of peak bins should give the answer.

Drawing a outline around card edges by using OpenCV

Currently i am trying to read a square card by using an OCR engine. But before processing image, i want during capturing card image, user should only capture card not other surrounding noise. So for that i looked for overlay & able to create a overlay on camera screen but it is not that useful. So right now i am looking forward some help, how to draw a contour / a outline around a square card when user see it in camera eye as this example.
for ex.
Any body has done this before ?
At first use cvCanny to detect all contours on your image.
Then you can use Standard Hough Line Transform for detection of all lines on the image.
Then you can calculate their intersections and find 4 points: the leftmost and the rightmost of the top and the bottom of the image.
You can ignore small lines which are on the the left and right borders of the image by changing the property of threshold.

Resources