c++ - OpenCV double free or corruption (out): Aborted (core dumped) -
Airee is working on the algorithm to find and fill areas on a binarized image, code expected for some work , But I do not know why, after the fourth image, I always get this error:
* '/' error in hale: double free or corruption (outside): 0x0000000001ccb610 * < / Strong> aborted (core dipped)
This is my code:
zero fill regeneration (matte src, met and dist, p Point origin, vb 3b color) {int size = 0; & Lt; Point & gt; Cadena; Cadena.push_back (original); While (! Cadena.empty ()) {point current = cadena.front (); Cadena.pop_front (); Point top, boat, right, left; Top = bot = right = left = current; Top.y - = 1; Bot.y + = 1; Right.x + = 1; Left.x - = 1; VAC3bSirro = VAC3B (0,0,0); If (top.y> = 0 & amp; dst.at (top)! = 0 } {Dst.at (bot) == siro and amp; srcite & lt; uchar & gt; (bot)! = 0) {Dst.at & lt; Vec3b & gt; (Bot) = color; Cadena.push_back (bot); } If (right x. (right) == Sero & amp; src.at (right) ! = 0) {dst.at & lt; Vec3b & gt; (Right) = color; Cadena.push_back (right); } If (left.y> = 0 & amp; dst.at (left) == Sero & amp; amp; src.at & lt; uchar & gt; (left) ! = 0) {dst.at & lt; Vec3b & gt; (Left) = color; Cadena.push_back (left); }}} For zero segments (MAT SORTI, MATE & DST) {for (int x = 0; x & lt; src.cols; x ++) {for (int y = 0; y and lt; srcr ; Y ++) {Point P = point (X, Y); If (SRCET; uchar & gt; (P)! = 0 & amp; amp; dst.at
I call the "segment" method, which is called the "fillRegion" method for each area later, I know that the error is on the "fill region" method, because If I comment with this "segment", then the error has ended, but I do not know / do not know what the error is in it.
If you have gdb (and you should), do the following:
GDB Run
This will tell you that your code has crashed.
Comments
Post a Comment