morphological-analysis

English lemmatizer databases?

二次信任 提交于 2020-01-31 18:07:10
问题 Do you know any big enough lemmatizer database that returns correct result for following sample words: geese: goose plantes: //not found Wordnet's morphological analyzer is not sufficient, since it gives the following incorrect results: geese: //not found plantes: plant 回答1: MorphAdorner seems to be better at this, but it still finds the incorrect result for "plantes" plantes: plante geese: goose Maybe you'd like to use MorphAdorner to do the lemmatization, and then check its results against

Morphological Reconstruction in OpenCV

我是研究僧i 提交于 2020-01-21 12:16:48
问题 I'm having some problems during image processing in OpenCV. I have text on my image, and during using opening operation, I'm getting not proper output. The issue is quite similar to that provided in this article: http://www.cpe.eng.cmu.ac.th/wp-content/uploads/CPE752_06part2.pdf. What I can see, people suggest to use reconstruction operations in that cases. My question is if there is any build-in mechanism in OpenCV or some known library/code that implement this? Thank you for help. 回答1: This

OpenCV Watershed : 4 point connectivity

。_饼干妹妹 提交于 2019-12-23 04:45:38
问题 I am writing a code for watershed in OpenCV. But i want the watershed boundaries to be 4 point connected and not 8 point. Currently this is the interface: void watershed(InputArray image, InputOutputArray markers) Does anybody have any solution for this? Also, is there any simple way to perform morphological watershed in opencv for automatic over-segmentation, the current one takes user input? 回答1: OpenCV help for watershed does not explicitly explain the connectivity used in the function. It

Flood filling for number plate recognition

梦想与她 提交于 2019-12-18 08:58:23
问题 I have a number plate which is a binary image. I performed dilation to the image to thicken the edges then "flood filling", lastly erosion for thinning: But i want my output to be like this: Can anyone help me, please? And show me how to get the desired output. ab=imread('test1.png'); level=graythresh(ab); ab=im2bw(ab,level); se=strel('disk',1); ab=imdilate(ab,se); ab=imfill(ab,'holes'); ab=bwmorph(ab,'thin',1); ab=imerode(ab,strel('line',3,90)); figure();imshow(ab,[]); title('floodFilling');

opencv morphological dilation filter as maximum filter

眉间皱痕 提交于 2019-12-08 05:30:17
问题 Like the definition of median filter, I can define "maximum filter" as for a local window e.g. dst(x,y) = max(3x3 local window pixels) But I cannot find such a filter in opencv, the closest one is "dilate" function Then I use the default configuration of "dilate" function, but the result is incorrect compare to my brute force implementation of the maximum filter. I found that for 3x3 case, the equivalent dilate configuration is to use a 1x1 rectangular structure element, that is dilate(src,

relabeling pixels based on distance between object's centerline and boundary

怎甘沉沦 提交于 2019-12-08 02:53:56
问题 I've a binary image containing an object as illustrated in the figure below. The centerline of the object is depicted in red . For each pixel belonging to the object, I would like to relabel it with a color. For instance, pixels whose orthogonal distance to the centerline are half of the distance to the object boundary from the centerline, should be labeled blue , otherwise green . An illustration is given below. Any ideas? Also, how could I fit a 1D gaussian centered in the object centerline

relabeling pixels based on distance between object's centerline and boundary

旧街凉风 提交于 2019-12-06 11:51:23
I've a binary image containing an object as illustrated in the figure below. The centerline of the object is depicted in red . For each pixel belonging to the object, I would like to relabel it with a color. For instance, pixels whose orthogonal distance to the centerline are half of the distance to the object boundary from the centerline, should be labeled blue , otherwise green . An illustration is given below. Any ideas? Also, how could I fit a 1D gaussian centered in the object centerline and orthogonal to it? The image in full resolution can be found under: http://imgur.com/AUK9Hs9 Here

Given a contour outlining the edges of an 'S' shape in OpenCV/Python, what methods can be used to trace a curve along the center of the shape?

时间秒杀一切 提交于 2019-12-03 14:05:05
问题 Given a contour outlining the edge of the letter S (in comic sans for example), how can I get a series of points along the spine of this letter in order to later represent this shape using lines, cubic spline or other curve-representing technique? I want to process and represent the shape using 30-40 points in Python/OpenCV. Morphological skeletonization could help with this but the operation always seems to produce erroneous branches. Is there a better way to collapse the contour into just

Given a contour outlining the edges of an 'S' shape in OpenCV/Python, what methods can be used to trace a curve along the center of the shape?

↘锁芯ラ 提交于 2019-12-03 05:02:05
Given a contour outlining the edge of the letter S (in comic sans for example), how can I get a series of points along the spine of this letter in order to later represent this shape using lines, cubic spline or other curve-representing technique? I want to process and represent the shape using 30-40 points in Python/OpenCV. Morphological skeletonization could help with this but the operation always seems to produce erroneous branches. Is there a better way to collapse the contour into just the 'S' shape of the letter? In the example below you can see the erroneous 'serpent's tongue' like

Morphological Reconstruction in OpenCV

家住魔仙堡 提交于 2019-12-02 02:37:43
I'm having some problems during image processing in OpenCV. I have text on my image, and during using opening operation, I'm getting not proper output. The issue is quite similar to that provided in this article: http://www.cpe.eng.cmu.ac.th/wp-content/uploads/CPE752_06part2.pdf . What I can see, people suggest to use reconstruction operations in that cases. My question is if there is any build-in mechanism in OpenCV or some known library/code that implement this? Thank you for help. This answer arrives late, but here is the basic algorithm for under-reconstruction: Inputs are two images: