Ask Your Question
1

String text is garbage on cv::imshow title bar and in cv::putText display

asked 2012-11-04 08:51:26 -0600

Ross Rogers gravatar image

updated 2012-11-04 09:15:49 -0600

image description

The code that is generating this is:

cv::Mat img_combo(a.img->rows+2,a.img->cols+b.img->cols+2,a.img->type());
[...];
//                        Somehow this text is getting display in the picture as "???"
//                           VVVVVVVVVVV
cv::putText(img_combo, string("abcdefg"), cv::Point(30,30), CV_FONT_HERSHEY_SIMPLEX, 0.8, cvScalar(200,200,250), 1, CV_AA);
cv::namedWindow("Image2:",1); //<<-- The label that is getting dislayed as a weird "DE>>"
cv::imshow("Image2:",img_combo);
cvWaitKey();
cvDestroyWindow("Image2:");

Is there some sort of unicode local that I need to configure? Why is my ASCII text getting displayed this way?

When I look at the *.obj generated by MSVS 2010 in cygwin's less, I'm seeing Image2: in the binary.

edit retag flag offensive close merge delete

Comments

I am having the same issue. Did you ever get the issue resolved? Thanks!

anopencvdummy gravatar imageanopencvdummy ( 2014-05-05 06:21:41 -0600 )edit

I'm having the exact same problem.

diskFragmenter gravatar imagediskFragmenter ( 2015-05-01 14:50:17 -0600 )edit

2 answers

Sort by » oldest newest most voted
1

answered 2015-12-03 13:03:40 -0600

comp_ gravatar image

This solved my garbage problems.

Properties: c\c++ -> preprocessor: ‘Preprocessor Definitions’ edit and add. _ITERATOR_DEBUG_LEVEL=0

Source: http://www.ridgesolutions.ie/index.ph...

edit flag offensive delete link more
0

answered 2014-05-05 21:37:42 -0600

OK I struggled with the same problem and finally got it resolved for OpenCV library version 2.4.9.0 rev 1. I first added "OPENCV_LIB_TYPE:=STATIC" in Android.mk to try linking the library statically. The linker gave a bunch of error about - what else - std::string. Then I happened to notice that there was this line "APP_STL := stlport_static" in Application.mk. I don't know how it got there but I changed it to "APP_STL := gnustl_static" and everything worked. I hope this helps someone else having the same issue.

edit flag offensive delete link more

Comments

I assume you were coding for android? I've no Android.mk imported anywhere in any way as far as I know.

diskFragmenter gravatar imagediskFragmenter ( 2015-05-01 14:52:31 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2012-11-04 08:51:26 -0600

Seen: 2,182 times

Last updated: May 05 '14