2020-08-30 11:40:47 -0600 | received badge | ● Nice Question (source) |
2016-09-12 04:46:03 -0600 | received badge | ● Famous Question (source) |
2016-09-12 04:46:03 -0600 | received badge | ● Popular Question (source) |
2016-09-12 04:46:03 -0600 | received badge | ● Notable Question (source) |
2016-02-14 10:51:42 -0600 | commented question | Detach blobs with a contact point Here's the code for the axes and the curve: Basically i draw 2 arrowed lines of certain length stasrting from barycenter, then i properly draw a portion of ellipse (circle) to draw the angle. |
2016-02-14 08:52:22 -0600 | commented answer | Detach blobs with a contact point I implemented a very naive selection, iterating on every couple of defect points (excluding the couple (x,x) of course) and thresholding the L2 distance between the points of the couple. I tuned the threshold until in worked, but i know this is not a very robust implementation. I could improve it connecting one defect point to the nearest one, as Tetragramm suggested below. Anyway, i added the code to the original post. |
2016-02-14 08:33:48 -0600 | received badge | ● Student (source) |
2016-02-14 08:29:02 -0600 | received badge | ● Editor (source) |
2016-02-14 08:25:58 -0600 | commented answer | Detach blobs with a contact point Thank you very very much, that worked like a charm! I adapted your code to draw a line through the defect points and wrote an algorithm to fix some imperfections (in the second image case, the line go through the little blob head, resulting into opening the hole, so my algorithm does a sort of reconstruction of the image border). I edited the original post with the results. |
2016-02-14 05:54:31 -0600 | received badge | ● Scholar (source) |
2016-02-14 05:54:29 -0600 | received badge | ● Supporter (source) |
2016-02-13 10:53:24 -0600 | asked a question | Detach blobs with a contact point Hello. I'm working with blob analysis and i'm having problems on detaching 2 blobs which have a contact point. The images i'm working on are of this type:
These are the same images binarized:
My problem is morphological operators like erosion, dilation and opening don't work since the dimensions of the contact points are the same or even greater than some important points of the image (like the heads of the objects with 2 holes) and so when I set my operator (opening in this case) in order to delete contact points I end up deleting also parts of the image which I need to do other calculations (like number of holes per object). I thought of applying a certain number of opening operators using a rectangle oriented as each of the objects as structuring element (as suggested here http://answers.opencv.org/question/56...), but this solution doesn't work well, since it is not assured that the contact points are oriented as one of the objects involved (as it happens, for example, for the contact point in the inferior part of the second image). Anyone of you have ideas of how I could solve this problem? Edit: Here are the results thanks to sturkmen
|
2016-02-08 12:52:14 -0600 | commented question | Exception while drawing oriented MBB with minAreaRect Well, i'm very ashamed to say my mistake was as stupid as that... Sorry, i was doing a lot of editing on the code and i lost the line of developing. |
2016-02-08 12:43:41 -0600 | asked a question | Exception while drawing oriented MBB with minAreaRect As stated in the title, i'm trying to draw the oriented minimum bounding box of a blob through the use of findContours() and minAreaRect(). The problem is the following exception is thrown at runtime: My code is as follows: The exception is thrown by the minAreaRect() function. The image on which i'm working is well initialized, since I saved it to file just before the code above, getting this result: Anyone has an idea of what the problem could be? Ps: I'm using openCV 2.4.11 on Visual Studio 2012, Windows 10 machine |