Ask Your Question

galbert's profile - activity

2014-02-11 09:25:24 -0600 received badge  Editor (source)
2014-02-11 08:53:31 -0600 asked a question How to find the x,y coordinates, and center of a line using hough line transform using a live video feed

Hello, anyone got any ideas or tips on how to find the detected hough line transform coordinates and center if possible. I am at a lost here, is only moments/finding contours are the only solution or I don't understand much since I'm only following tutorials, stackoverflow, and other references.

here is my sample code

include "opencv2\highgui\highgui.hpp"

include "opencv2\imgproc\imgproc.hpp"

include <iostream>

include <stdio.h>


using namespace cv;

using namespace std;

Mat frame, frame_gray, edges, Dedges;


int main()
{
    VideoCapture stream(0);

if(!stream.isOpened())
{
    cout<<"ERROR: cannot open camera";
    return -1;
}

while(true)
{
    stream >> frame;                                                                    
    cvtColor(frame, frame_gray, CV_RGB2GRAY);                                           
    Canny(frame_gray, edges, 50, 200, 3);                                               

    vector<Vec4i> hline;                                            
    HoughLinesP(edges, hline, 1, CV_PI/180, 150, 50, 10);
    cvtColor(edges, Dedges, CV_GRAY2RGB);                               

    for(size_t i = 0; i < hline.size(); i++)
    {
        Vec4i D = hline[i];
        line(Dedges, Point(D[0],D[1]), Point(D[2],D[3]), Scalar(0,0,255), 3, CV_AA);
        cout<<"object detected"<<endl;
    }


    imshow("Camera View", Dedges);
    if(waitKey(30) >= 0)
    {
        break;
    }

}

return 0;
}

reference to this link

http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/hough_lines/hough_lines.html#hough-lines

Thanks in advance.

2013-09-12 04:59:04 -0600 answered a question opencv test.cpp program not enough parameters on vs2010

sorry been busy with school and stuff, forgot to update. Anyways I found my error.... a noobish mistake, i did not place my command argument within where my working directory is. It's now working thanks for the help

2013-09-01 12:11:10 -0600 commented question opencv test.cpp program not enough parameters on vs2010

I don't even know myself why I am having these kinds of error or what is going, I am at a loss... and thanks for helping me berak and I appreciate your help even though I am really a beginner, I will continue it tomorrow or later on as I have to go to school I will comment later what would be the outcome.

2013-09-01 11:32:05 -0600 commented question opencv test.cpp program not enough parameters on vs2010

e of the following: The browsing database in this directory is open by another instance of Visual Studio and cannot be reopened. User Gary on GARY2-PC has it open.

The 'Fallback Location' is configurable under C++ Advanced Options.

Press OK to continue without C++ browsing information and IntelliSense.

and what you mean by debugging section in the property sheet you mean by the linker part?

2013-09-01 11:31:07 -0600 commented question opencv test.cpp program not enough parameters on vs2010

I do as you told in opening a cmd window but it is saying that

no suitable location found for browsing database and intellisense files

Visual C++ did not find a suitable location to store its browsing database and IntelliSense files for the solution "E:\C++ programs\test\test.sln."

Visual C++ examined the folder "E:\C++ programs\test." This folder is not suitable because of the following: The browsing database in this directory is open by another instance of Visual Studio and cannot be reopened. User Gary on GARY2-PC has it open.

Because a 'Fallback Location' was not specified in the C++ Advanced Options, Visual C++ is attempting to use your temporary directory.

Visual C++ examined the folder "C:\Users\Gary\AppData\Local\Temp\VC++\test-cde080b2." This folder is not suitable becaus

2013-09-01 11:09:01 -0600 commented question opencv test.cpp program not enough parameters on vs2010

oh,,, i am running it by pressing ctrl+f5 i am in debug mode and using 32bit vs2010... will it help?

2013-09-01 10:58:13 -0600 commented question opencv test.cpp program not enough parameters on vs2010

you mean by renaming the executable file??

2013-09-01 10:15:16 -0600 asked a question opencv test.cpp program not enough parameters on vs2010

Hi, I am new to opencv and I've followed http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windows-installation and http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to

the problem is that whenever i build the test program it's says in the console not enough parameters have I done something wrong or did I miss important details I don't know which is which and I am using version 2.4.6 and don't know due to the fact I am still a beginner in opencv