Opened 15 years ago
Closed 14 years ago
#24594 closed defect (wontfix)
OpenCV 2.0 - HoughLinesP memory allocation
Reported by: | nicola.conci@… | Owned by: | stante@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.2 |
Keywords: | Cc: | raphael-st (Raphael Straub) | |
Port: | OpenCV |
Description (last modified by jmroot (Joshua Root))
hi, I tried running the HoughLinesP function on a video, to check consistency of lines over successive frames. I guess there is something wrong with the allocation/deallocation though, since running it several times you notice the memory increases until the computer slows down.
if I comment the HoughLinesP function, everything runs smoothly.
That's a sample of the code (myFrame and edges are 320x240):
int blockSize=8; for (int c=1;c<300;c++) { cap >> myFrame; cvtColor(myFrame, edges, CV_RGB2GRAY, 0); Canny(edges, edges, 80, 120, 3, false); for (int k=0;k<(edges.rows-blockSize);k+=blockSize-1) { for (int l=0;l<(edges.cols-blockSize);l+=blockSize-1) { vector<Vec4i> lines; Mat blockEdge(edges,Rect(l,k,blockSize,blockSize)); Mat blockOrig(myFrame,Rect(l,k,blockSize,blockSize)); //APPLY HOUGH HoughLinesP(blockEdge, lines, 1, CV_PI/90, 5, 4, 10 ); blockEdge.release(); blockOrig.release(); } } waitKey(10); printf("Frame n: %d", c); }
Thanks, Nicola
Change History (4)
comment:1 Changed 15 years ago by jmroot (Joshua Root)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to stante@… |
Port: | OpenCV added |
comment:2 Changed 14 years ago by raphael-st (Raphael Straub)
OpenCV has been updated to version 2.1.0 in r70430. Does the new version solve your problem?
comment:4 Changed 14 years ago by mf2k (Frank Schima)
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We are up to version 2.2 now. Please re-open ticket if this is still a problem.
Note: See
TracTickets for help on using
tickets.
Please remember to fill in the Port field and cc the maintainer.