shape-context

Matching shapes of road marking from OpenData

女生的网名这么多〃 提交于 2019-12-13 03:50:46
问题 for now I work on the generation of road marking from OpenData. Because I'm a Newbie in programming I use Python. I process orthophotos and transform them to binary-photos (only black and white pixels). After that I get such a photo like this: The next step is to recognize various road marking on the given example picture. I think this should be possible by "shape context matching". So I wrote this code ( a is the original turn arrow and b is a extracted turn arrow from the example picture)

Shape Context Error by calculating distance of two different shapes

▼魔方 西西 提交于 2019-12-02 11:58:43
问题 In short form, I want to compare different road markings by "shape context" matching. My first question you can see under: Matching shapes of road marking from OpenData I solved my first problem, but now it appears a new error. Here is my code: import cv2 import numpy as np # read data datapath = "/Users/output/test/"; a = cv2.imread(datapath+"template_orig.png"); b = cv2.imread(datapath+"template.png"); imgray_a = cv2.cvtColor(a,cv2.COLOR_BGR2GRAY) ret_a,thresh_a = cv2.threshold(imgray_a,127

Shape Context Error by calculating distance of two different shapes

混江龙づ霸主 提交于 2019-12-02 05:39:30
In short form, I want to compare different road markings by "shape context" matching. My first question you can see under: Matching shapes of road marking from OpenData I solved my first problem, but now it appears a new error. Here is my code: import cv2 import numpy as np # read data datapath = "/Users/output/test/"; a = cv2.imread(datapath+"template_orig.png"); b = cv2.imread(datapath+"template.png"); imgray_a = cv2.cvtColor(a,cv2.COLOR_BGR2GRAY) ret_a,thresh_a = cv2.threshold(imgray_a,127,255,0) imgray_b = cv2.cvtColor(b,cv2.COLOR_BGR2GRAY) ret_b,thresh_b = cv2.threshold(imgray_b,127,255,0

Drawing shape context logpolar bins in MATLAB

时光怂恿深爱的人放手 提交于 2019-11-30 09:59:16
I am using shape context histograms as a feature descriptor to encode silhouette images. To assist with debugging, I would like to view the shape context logpolar bins overlaid on a silhouette image (the sample points taken from the edge image). An example of what it should look like for one of the points is as follows: I know how to display the circles (radial bins), but I am having difficulty in producing the angular bins (lines). Given a set of angles, how can I draw line segments similar to those shown in the example image? Doing this: >> figure >> axes >> hold on >> radius = 1; >> theta =

Drawing shape context logpolar bins in MATLAB

為{幸葍}努か 提交于 2019-11-29 14:41:02
问题 I am using shape context histograms as a feature descriptor to encode silhouette images. To assist with debugging, I would like to view the shape context logpolar bins overlaid on a silhouette image (the sample points taken from the edge image). An example of what it should look like for one of the points is as follows: I know how to display the circles (radial bins), but I am having difficulty in producing the angular bins (lines). Given a set of angles, how can I draw line segments similar