Ask Your Question

hayden's profile - activity

2017-05-15 02:09:03 -0500 received badge  Famous Question (source)
2016-06-21 03:49:40 -0500 received badge  Famous Question (source)
2016-04-27 21:09:24 -0500 received badge  Famous Question (source)
2016-02-17 09:01:50 -0500 received badge  Notable Question (source)
2015-10-28 03:24:57 -0500 received badge  Famous Question (source)
2015-08-31 05:25:25 -0500 received badge  Notable Question (source)
2015-07-06 08:33:46 -0500 received badge  Notable Question (source)
2015-05-14 01:41:48 -0500 received badge  Notable Question (source)
2015-04-16 18:20:56 -0500 received badge  Popular Question (source)
2015-02-08 11:07:47 -0500 received badge  Popular Question (source)
2014-12-24 15:20:54 -0500 received badge  Popular Question (source)
2014-11-14 05:13:53 -0500 received badge  Popular Question (source)
2014-06-01 05:36:03 -0500 received badge  Notable Question (source)
2014-03-10 21:19:05 -0500 asked a question X, Y, Z coordinate in opencv

Hello, I am capturing picture using video cam and displaying with opencv. Now in the screen what's the x,y, z coordinate of the image. I tried to muliply the rotation matrix of head pose estimation by the following matrix:

[ 1, 0, 0, 0, -1, 0, 0, 0, -1]

But z coordinate gives negative direction. I don't understand why. Could any one explain a bit?

Thanks in advance.

2014-03-05 20:19:40 -0500 asked a question OpenCV rotation Matrix: no xy movement, only z movement needs to consider

Hello, I have a 3X3 rotation matrix. I don't need to consider xy rotation of a particular set of points in the image. I need to consider the Z rotation only, How can I do that? Please provide me some suggestions, i am a bit new in OpenCV. Thanks in advance.

2014-02-12 09:11:28 -0500 received badge  Popular Question (source)
2013-06-03 09:55:18 -0500 commented question Accessing pixel and coordinate of an image using OpenCV

Thanks for the clarification. That means point coordinates of pixels follows (i,j) of Matrix. Actually i was just displaying the image pixel in C language where I centred the image at (0,0) and with point coordinates ranging from (-127, -127) to (127, 127). I think I need to convert the center to (0,0) to get the correct result.

2013-06-02 11:50:28 -0500 commented question Accessing pixel and coordinate of an image using OpenCV

Actually I was asking about the center coordinate, isn't is (0,0)?

2013-06-02 11:48:32 -0500 commented answer Accessing pixel and coordinate of an image using OpenCV

Thank you very much, those links are very helpful.

2013-06-01 22:24:13 -0500 asked a question Accessing pixel and coordinate of an image using OpenCV

Hello everybody,an image is defined by a number of pixels in row and column direction. Is the center of the image is always (0,0) is OpenCV? Suppose for an image of size 256X256, what is the difference between each pixel in row and column direction. How can I find the difference of a particular pixel from the center of the image? I need to clarify these basic things. Thanks in advance.

2013-05-31 15:57:35 -0500 asked a question How to find the radial intensity gradient

Hello, I need to find the radial intensity difference for different radii intervals. Is there any suitable function in opencv which helps to find it? Thanks.

2013-05-24 14:36:26 -0500 commented answer How to find the convex hull using opencv

Thanks for the answer. How can I get the coordinate values at [i][j] pixel of an image using opencv? I would also like to display the portion of the image in the convex hull. How can that be done?

2013-05-24 12:00:32 -0500 asked a question How to find the convex hull using opencv

Hello, I know that I can access pixels using "image.at<char>(i,j)" where i, j are columns and rows of an image. Now I have a set of pixels i.e. a set of (i,j) values of an image. I would like to extract the convex hull of the image using those (i, j) values. Could any one give me some tips how that can be done using opencv?

Thanks in advance.

2013-05-24 10:39:48 -0500 commented answer Some problem about displaying a raw image file

Thank you very much. It works perfectly alright.

2013-05-23 19:13:25 -0500 asked a question Some problem about displaying a raw image file

hello every body, last time I posted this question. I have a raw image of 256 by 256 with 8 bits per pixels. The image is a gray scale image. As per answer, I wrote the following code:

/*******************************************/



#include <opencv\cv.h>
#include <opencv\highgui.h>
#include <math.h>

using namespace cv;

int main(int argc, char** argv){

    Mat img = Mat(256, 256, CV_8UC1);
    img = imread("1.IMG", 1); 
    namedWindow( "RawImage", 1 );
    imshow( "RawImage", img );
    cvWaitKey();

    return 0;
}


/**********************************************/

But I can't display the image. abort is called. Could anyone help me figure out the problem?

Thanks in advance.

2013-05-14 09:15:17 -0500 asked a question How to display a raw image using Opencv

Hello everybody, I have a raw image of 256 X 256 with 8 bits per pixel. I need to work on this raw image. My first question is how to display a raw image with opencv? Thanks in advance.

2013-04-27 13:19:25 -0500 received badge  Student (source)
2013-04-26 17:08:42 -0500 asked a question modifying pixel value

Hello every body, after loading picture, i would like to modify the pixel values and write it back i.e. the modified image. Could any one give me some hint how can that be done. Thanks.

2013-04-25 15:23:28 -0500 commented answer Need help about opencv installation

I am looking for the source version, in the download section I can only find the executable. In my installation I have opencv directory under include , no opencv2 directory.

2013-04-25 12:04:11 -0500 asked a question Need help about opencv installation

Hello, I am new in OpenCV. A few days ago I installed openCV using the following link:

http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010_CMake

I can compile and run some examples. But I don;t have any opencv2 directory in my installation under which there should ne a core.hpp file. Please let me know which version I should use if I want to build opencv from source.

Thanks in advance.

2013-04-25 11:53:16 -0500 commented question A basic question on OpenCV on "#include <opencv2/core/core.hpp>",

I would like to build opencv from source, please tell me which version I should use.

2013-04-24 15:57:00 -0500 asked a question A basic question on OpenCV on "#include <opencv2/core/core.hpp>",

Hello every body, last time I wrote about getting error in printing a matrix in OpenCV. Iwas suggested to include: #include <opencv2/core/core.hpp> But I have installed OpenCV2.1.0 and I have compiled with visual studio 2010 and there is no opencv2 directory and no core.hpp file. In that case how to compile the following program as if I include

#include <opencv2/core/core.hpp>

it does not work.

/****************************************************/

#include <iostream>

#include <opencv2/core/core.hpp>

using namespace cv;

using namespace std;

int main(){  

    Mat M(2,2, CV_8UC3, Scalar(0,0,255));

    cout << "M = " << endl << " " << M << endl << endl;

    return 0;
}

/*******************************************************/

it shows  the following error:
fatal error C1083: Cannot open include file: 'opencv2/core/core.hpp': No such file or directory
But using  #include <cv.h>, #include <cxcore.h>, #include <highgui.h>, I can compile the follwong program:
/*********************************************************/

/*********************************************************/
`/*********************************************************/

#include <cv.h>

#include <highgui.h>

#include <math.h>

using namespace cv;

int main(int argc, char** argv)

{

    Mat img, gray;

    img=imread("2.jpg", CV_LOAD_IMAGE_GRAYSCALE);

    // smooth it, otherwise a lot of false circles may be detected

    GaussianBlur( img, img, Size(9, 9), 2, 2 );

    vector<Vec3f> circles;

    HoughCircles(img, circles, CV_HOUGH_GRADIENT, 2, img.rows/4, 200, 100 );

    for( size_t i = 0; i < circles.size(); i++ ){

         Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));

         int radius = cvRound(circles[i][2]);

         circle( img, center, 3, Scalar(0,255,0), -1, 8, 0 );

         circle( img, center, radius, Scalar(0,0,255), 3, 8, 0 );
    }

    namedWindow( "circles", 1 );

    imshow( "circles", img );

    cvWaitKey();

    return 0;
}

/******************/ Please provide me some suggestion. enter code here`

2013-04-24 10:23:59 -0500 received badge  Editor (source)
2013-04-24 10:21:20 -0500 asked a question Problem with including "#include <opencv2/core/core.hpp>"

Hello every body, last time I wrote about getting error in printing a matrix in OpenCV. Iwas suggested to include: #include <opencv2 core="" core.hpp=""> But I have installed OpenCV2.1.0 and I have compiled with visual studio 2010 and there is no opencv2 directory and no core.hpp file. In that case how to compile the following program as if I include "#include <opencv2 core="" core.hpp="">", it does not work. /****************/

include <iostream>

include <opencv2 core="" core.hpp="">

using namespace cv; using namespace std;

int main(){
Mat M(2,2, CV_8UC3, Scalar(0,0,255));

cout << "M = " << endl << " " << M << endl << endl;

return 0;

} /*****************/ it shows the following error:

fatal error C1083: Cannot open include file: 'opencv2/core/core.hpp': No such file or directory But using #include <cv.h>, #include <cxcore.h>, #include <highgui.h>, I can compile the follwong program:

/*******************/

include <cv.h>

include <highgui.h>

include <math.h>

using namespace cv;

int main(int argc, char** argv) { Mat img, gray;

img=imread("2.jpg", CV_LOAD_IMAGE_GRAYSCALE);

GaussianBlur( img, img, Size(9, 9), 2, 2 );

vector<Vec3f> circles;

HoughCircles(img, circles, CV_HOUGH_GRADIENT, 2, img.rows/4, 200, 100 );

for( size_t i = 0; i < circles.size(); i++ )

{
     Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));

     int radius = cvRound(circles[i][2]);

     circle( img, center, 3, Scalar(0,255,0), -1, 8, 0 );

     circle( img, center, radius, Scalar(0,0,255), 3, 8, 0 );
}

namedWindow( "circles", 1 );

imshow( "circles", img );

cvWaitKey();

return 0;

} /******************/ Please provide me some suggestion.

2013-04-23 17:12:22 -0500 commented answer What is problem with the following Opencv code?

Sorry, I forgot to paste "#include < iostream> in the posting. It was already included in my coding. Next time I shall include the error too.

But I have installed OpenCV2.1.0 and there is no opencv2 directory and no core,hpp file. I can run some other opencv programs. But this one I can't. Please help me identify my problem. This is a very simple code.

2013-04-23 16:08:12 -0500 asked a question What is problem with the following Opencv code?

Hello Every body, i am trying to compile the following code which tries to print a 2 X2 Matrix M but I find error while compiling. Could anyone tell me what include file i am missing. Thanks.

/*********************/

#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
#include <math.h>

using namespace cv;
using namespace std;

int main()
{  
    Mat M(2,2, CV_8UC3, Scalar(0,0,255));
    cout << "M = " << endl << " " << M << endl << endl;

    return 0;
}

/****************************************************/
2013-04-23 15:17:34 -0500 asked a question What filter is recommended before applying HoughCircles

Hello, as I applied HoughCircles and failed to detect the circles, does any one recommend to apply any filter before HoughCircles? Thanks.

2013-04-23 14:40:42 -0500 commented answer HoughCircle fail to detect the circular part.

I have tried with other similar images, but the result is same. Do i need to use some filtering for this? Would you recommend any filter?

2013-04-22 15:36:01 -0500 asked a question A simple question on cvtColor

Hello Every body, I have a simple question. If the image is already grey scale image, do I still need to use cvtColor(img, gray, CV_BGR2GRAY) for further processing?

Thanks in advance.

2013-04-22 15:31:38 -0500 commented answer Why the image just disappears in the following code

Thanks for fixing the problem.

2013-04-22 15:14:28 -0500 asked a question HoughCircle fail to detect the circular part.

Hello every body, I have placed an image to the following link:

http://i35.tinypic.com/16kozua.png

I used the following code to detect the interior circle, but it does not show any circular region. Could any one explain?

include <cv.h>

include <highgui.h>

include <math.h>

using namespace cv; int main(int argc, char** argv) { Mat img, gray; if( argc != 2 && !(img=imread(argv[1], 1)).data) return -1;

img=imread(argv[1], 1);

cvtColor(img, gray, CV_BGR2GRAY);

// smooth it, otherwise a lot of false circles may be detected

GaussianBlur( gray, gray, Size(9, 9), 2, 2 );
vector<Vec3f> circles;

HoughCircles(gray, circles, CV_HOUGH_GRADIENT, 2, gray.rows/4, 200, 100 );
for( size_t i = 0; i < circles.size(); i++ )
{
     Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));
     int radius = cvRound(circles[i][2]);
     // draw the circle center
     circle( img, center, 3, Scalar(0,255,0), -1, 8, 0 );
     // draw the circle outline
     circle( img, center, radius, Scalar(0,0,255), 3, 8, 0 );
}
namedWindow( "circles", 1 );
imshow( "circles", img );
 cvWaitKey();
return 0;

}

2013-04-22 11:44:11 -0500 asked a question Why the image just disappears in the following code

I have copied the following code and compiled and tried to run with MSVC 2010. The image appears and the next minute disappers. i am newbie in OpenCV. Could anybody tell me what is the problem with the following code:

#include <cv.h>
#include <highgui.h>
#include <math.h>

using namespace cv;
int main(int argc, char** argv)
{
    Mat img, gray;
    if( argc != 2 && !(img=imread(argv[1], 1)).data)
       return -1;

    cvtColor(img, gray, CV_BGR2GRAY);

    // smooth it, otherwise a lot of false circles may be detected

    GaussianBlur( gray, gray, Size(9, 9), 2, 2 );
    vector<Vec3f> circles;

    HoughCircles(gray, circles, CV_HOUGH_GRADIENT, 2, gray.rows/4, 200, 100 );
    for( size_t i = 0; i < circles.size(); i++ )
    {
         Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));
         int radius = cvRound(circles[i][2]);
         // draw the circle center
         circle( img, center, 3, Scalar(0,255,0), -1, 8, 0 );
         // draw the circle outline
         circle( img, center, radius, Scalar(0,0,255), 3, 8, 0 );
    }
    namedWindow( "circles", 1 );
    imshow( "circles", img );
    return 0;
}
2013-04-20 14:14:58 -0500 commented answer Need help about extracting a circular portion from image

I have uploaded the original image to the following link: http://i35.tinypic.com/16kozua.png

I would like to extract the portion marked by red arrow.

2013-04-20 10:19:48 -0500 asked a question Need help about extracting a circular portion from image

Hello, I am quite new in OpenCV. I have an image with a faint white border marked with a red arrow as shown in the following linkimage description. I would like to find the circle. How to find it in OpenCV?