Skip to content

Commit

Permalink
Merge pull request #1 from minyongyoon/master
Browse files Browse the repository at this point in the history
Fixed some missing initialization and iplimage release
  • Loading branch information
aperrault committed Oct 9, 2012
2 parents 1eb944b + 2e6b479 commit 8dc49ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions TextDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ void normalizeImage (IplImage * input, IplImage * output) {
}

void renderComponents (IplImage * SWTImage, std::vector<std::vector<Point2d> > & components, IplImage * output) {
for (std::vector<std::vector<Point2d> >::iterator it = components.begin(); it != components.end();it++) {
cvZero(output);
for (std::vector<std::vector<Point2d> >::iterator it = components.begin(); it != components.end();it++) {
for (std::vector<Point2d>::iterator pit = it->begin(); pit != it->end(); pit++) {
CV_IMAGE_ELEM(output, float, pit->y, pit->x) = CV_IMAGE_ELEM(SWTImage, float, pit->y, pit->x);
}
Expand Down Expand Up @@ -278,7 +279,7 @@ void renderChains (IplImage * SWTImage,
cvCreateImage ( cvGetSize ( output ), IPL_DEPTH_32F, 1 );
renderComponents(SWTImage,componentsRed,outTemp);
cvConvertScale(outTemp, output, 255, 0);

cvReleaseImage(&outTemp);
}

IplImage * textDetection (IplImage * input, bool dark_on_light)
Expand Down

0 comments on commit 8dc49ff

Please sign in to comment.