Ask Your Question

open_ranger's profile - activity

2020-08-13 18:35:54 -0500 received badge  Notable Question (source)
2020-07-13 03:49:34 -0500 received badge  Popular Question (source)
2020-06-24 20:37:50 -0500 asked a question How to make findChessboardCorners run faster?

How to make findChessboardCorners run faster? I have a chessboard image of size 3264x2448 when running on my Android 1.2

2020-02-22 06:20:23 -0500 received badge  Notable Question (source)
2019-10-08 02:36:11 -0500 received badge  Popular Question (source)
2019-07-24 04:10:16 -0500 commented answer How to put rotated text in OpenCV ?

this way the text will be written as watermark,if the background happen to be white you wont be able to see anything.Als

2019-07-20 21:34:08 -0500 received badge  Nice Answer (source)
2019-07-17 19:55:04 -0500 edited answer How to put rotated text in OpenCV ?

Here is my version of putRotateText() void putRotateText(InputOutputArray img, const String& text, Point org,double

2019-07-17 19:53:52 -0500 commented answer How to put rotated text in OpenCV ?

Dont know any text rendering engine yet so have to deal with openCV for now.

2019-07-17 19:52:32 -0500 edited answer How to put rotated text in OpenCV ?

Here is my version of putRotateText() void putRotateText(InputOutputArray img, const String& text, Point org,double

2019-07-17 19:51:56 -0500 answered a question How to put rotated text in OpenCV ?

Here is my version of putRotateText() void putRotateText(InputOutputArray img, const String& text, Point org,double

2019-07-15 21:52:23 -0500 asked a question How to put rotated text in OpenCV ?

How to put rotated text in OpenCV ? OpenCV accepts void putText( InputOutputArray img, const String& text, Point o

2019-07-15 15:15:36 -0500 received badge  Self-Learner (source)
2019-07-15 14:29:36 -0500 answered a question Is there a way to display cv::Mat using __android_log_print()[SOLVED]

Here Mat mat=(Mat_<uchar>(5,5)<<0,0,1,0,0, 0,2,2,2,0, 3,3,3,3,3, 0,4,4,4,0, 0,0,5,0,0); ostringstream m

2019-07-13 06:34:29 -0500 asked a question Is there a way to display cv::Mat using __android_log_print()[SOLVED]

Is there a way to display cv::Mat using __android_log_print() I know you can display a cv::Mat using cout << Mat &

2019-07-13 06:20:02 -0500 received badge  Critic (source)
2019-03-29 22:38:18 -0500 asked a question What is the data structure looks like in Mat::data

What is the data structure looks like in Mat::data I am trying these code: Mat test1,test2; test1=Mat_<Vec3i>

2018-04-24 01:36:47 -0500 marked best answer contour look strange

I try to convert contour into Pixel and the output look funny.

void extractContour(Mat input){
    Mat temp=Mat::zeros(input.rows,input.cols,CV_8U);
    vector<vector<Point>> contour;
    findContours(input,contour,RETR_EXTERNAL,CHAIN_APPROX_NONE);
    for(int i=0;i<contour[0].size();i++){
    temp.at<Vec3b>(contour[0][i])=255;
    cout<<contour[0][i]<<"\t";
    }
    cout<<endl;
    imwrite("/home/wxh/Desktop/Photo/1.bmp",temp);
}

image description

Any idea why is it deformed and in the wrong position?

2018-04-24 01:36:26 -0500 commented answer contour look strange

☆⌒(*^-゜)v THX!!

2018-04-24 01:10:46 -0500 asked a question contour look strange

contour look strange I try to convert contour into Pixel and the output look funny. void extractContour(Mat input){

2018-04-24 01:10:32 -0500 asked a question contour look strange

contour look strange I try to convert contour into Pixel and the output look funny. void extractContour(Mat input){

2018-04-18 09:07:53 -0500 commented answer How to join broken edges from Canny

that thin circle is just the mouse cursor from the photo viewing software

2018-04-18 08:19:06 -0500 commented answer How to join broken edges from Canny

I only made to look 3 steps ahead anything far away still left unconnected

2018-04-18 03:45:15 -0500 received badge  Teacher (source)
2018-04-18 03:27:26 -0500 marked best answer How to join broken edges from Canny

Canny edge detection tends to leave small unconnected section between edges (usually just 1 pixel wide) is the any developed method in openCV to join those broken pieces? open and close method doesnt work very good if the kernel is too small it wont join all the section if too large it leave small truncks instead to skiny lines. Any ideas? image description

2018-04-18 03:27:12 -0500 received badge  Self-Learner (source)
2018-04-18 00:31:41 -0500 asked a question /usr/include/qt5: linker input file unused because linking not done

/usr/include/qt5: linker input file unused because linking not done My Qt Creator always give this warning I dont unders

2018-04-18 00:22:46 -0500 answered a question phaseCorrelate fails with Rectangle ROI type of arguments due to their incorrect .type()

Looks like you should use grayRefRoi = grayReference(refRectangle);

2018-04-17 23:22:11 -0500 answered a question How to join broken edges from Canny

void joinEdges(Mat input){ int width=input.cols; int height=input.rows; const int dx[] = { 1, 1, 0, -1, -1, -1, 0, +1,

2018-04-17 08:04:12 -0500 commented answer Can't get correct parameter format for cv::calcHist

there is a extra space behind ".bmp"(+﹏+)~

2018-04-17 07:58:33 -0500 marked best answer Can't get correct parameter format for cv::calcHist

I'm trying to utilising calcHist with the fowllowing code.

int channels[]={0,1,2};
int histSize[]={25,25,25};
float range[]={0,256};
const float* ranges[]={range,range,range};
printf("Ranges: %4.1d\t Type name: %s\t\n",0,typeid(ranges).name());
reference=imread("/home/wxh/Desktop/Photo/reference.bmp ",IMREAD_UNCHANGED);
calcHist(&reference,1,channels,noArray(),hist,3,histSize,ranges,true,false)

and the complier gives me the error message

OpenCV Error: Assertion failed (j < nimages) in histPrepareImages, file /home/wxh/opencv-3.2.0/modules/imgproc/src/histogram.cpp, line 148
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/wxh/opencv-3.2.0/modules/imgproc/src/histogram.cpp:148: error: (-215) j < nimages in function histPrepareImages

Which part gone wrong?

2018-04-17 00:54:38 -0500 asked a question Can't get correct parameter format for cv::calcHist

Can't get correct parameter format for cv::calcHist I'm trying to utilising calcHist with the fowllowing code. int chan

2018-04-16 18:19:58 -0500 asked a question Why increase threshold in HoughLinesP sometime yeild some lines?

Why increase threshold in HoughLinesP sometime yeild some lines? void onTrackbarSlide_1(int pos,void*){ threshold_1=

2018-04-13 14:55:36 -0500 asked a question How to join broken edges from Canny

How to join broken edges from Canny Canny edge detection tends to leave small unconnected section between edges (usually

2018-04-13 11:00:36 -0500 commented answer Assertion failed roi out of range

sometimes the error just right in front of me but I just cant see.

2018-04-13 10:59:09 -0500 marked best answer Assertion failed roi out of range

I'm trying to make a mask with black margin around edges so I type the follwoing code:

image=imread("/home/wxh/Desktop/Photo/1.jpg",IMREAD_UNCHANGED);
width=image.cols;
height=image.rows;
edge_left=image.cols*0.05;edge_top=image.rows*0.05;
mask=Mat::zeros(width,height,CV_8UC1);

printf("Mask rows:   %d\t cols: %d\t type:  %d\t channels: %d\t\n",mask.rows,mask.cols,mask.type(),mask.channels());
printf("Rectangle x: %d\t    y: %d\t width: %d\t height:   %d\t\n",edge_left,edge_top,width-2*edge_left,height-2*edge_top);

mask2=mask(Rect(edge_left,edge_top,width-2*edge_left,height-2*edge_top));

The console output give me this

Mask rows:   3264    cols: 2448  type:  0    channels: 1    
Rectangle x: 163        y: 122   width: 2938     height:   2204 
OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, file /home/wxh/opencv-3.2.0/modules/core/src/matrix.cpp, line 522
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/wxh/opencv-3.2.0/modules/core/src/matrix.cpp:522: error: (-215) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function Mat

Basiclly it says the rectangle roi is out of image range but I dont see how. Anyboady can point out the error for me?

2018-04-13 10:59:09 -0500 received badge  Scholar (source)
2018-04-13 10:51:32 -0500 received badge  Student (source)
2018-04-13 10:44:00 -0500 asked a question Assertion failed roi out of range

Assertion failed roi out of range I'm trying to make a mask with black margin around edges so I type the follwoing code:

2018-04-08 02:59:52 -0500 commented question weired compiler error warning "Can't compare structures"

already declared namespace cv