Ask Your Question

dab's profile - activity

2017-07-18 12:33:26 -0600 commented question Before openning the image using OpenCV, I'm trying to create a region groing algorithm using OpenCL. The problem is to find how i can fix the starting point pixel (germ) in this image and transform these steps in OpenCL. Thanks in advance

StevenPuttemans sorry for the question

2017-07-17 15:31:43 -0600 commented question Before openning the image using OpenCV, I'm trying to create a region groing algorithm using OpenCL. The problem is to find how i can fix the starting point pixel (germ) in this image and transform these steps in OpenCL. Thanks in advance

Hi berak, i'm trying to make a region growing segmentation for my project in OpenCL, the algorithm is as follows: 1. seed the first pixel(seed) manually 2. get the value of the seed 3. compare it with its 4-neighbors or 8-neighbors(i dont know which is better) 4. if the neighbors have the same value then they are in region 5. compare these neighbors with there other neighbors and so on until it finds a boundary, then stop

2017-07-17 13:52:29 -0600 commented question Integration OpenCV in Visual Studio 2010

please berak what do you mean by "the path to an image is expected"

2017-07-17 13:17:18 -0600 commented question Integration OpenCV in Visual Studio 2010

also i put opencvfirst.exe( the program name) but the same result , please help

2017-07-17 13:02:44 -0600 commented question Integration OpenCV in Visual Studio 2010

Hi berak, would you explane to me what i put in Command line arguments the path of an image or the name of input image? because i put them and it show me opencv.exe Is not recognized as an internal or external command, an executable program, or a command file. Thanx

2017-07-17 09:30:39 -0600 asked a question Integration OpenCV in Visual Studio 2010

I have tried this sample. It show red image

Mat img(400,400,CV_8UC3, Scalar(0,0,255));

imshow("lalala", img);

waitKey();

And this code for opennig webcam it's work:

include <opencv\cv.h>

include <opencv\highgui.h>

using namespace cv;

int main(){

Mat image;

VideoCapture cap;

cap.set(CV_CAP_PROP_FRAME_WIDTH, 640);

cap.set(CV_CAP_PROP_FRAME_HEIGHT, 480); cap.open(0);

namedWindow("window",1);

while(1)

{

try

{

cap>>image;

imshow("window",image); } catch (Exception& e) { const char* err_msg = e.what();

std::cout << "exception caught: imshow:\n" << err_msg << std::endl;

}

waitKey(33);

}

}

But this code, it shows : Usage: display_image ImageToLoadAndDisplay:

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

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

include <iostream>

using namespace cv;

using namespace std;

int main( int argc, char** argv )

{

if( argc != 2)

{

cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;

return -1;

}

Mat image;

image = imread(argv[1], IMREAD_COLOR); // Read the file

if(! image.data ) // Check for invalid input

{ cout << "Could not open or find the image" << std::endl ;

return -1;

}

namedWindow( "Display window", WINDOW_AUTOSIZE ); // Create a window for display.

imshow( "Display window", image ); // Show our image inside it.

waitKey(0); // Wait for a keystroke in the window

return 0;

}

would someone help me to find the error where become, i'm really blocked. I think the integration of mine opencv 2.4.9 in visual studio 2010 in windows 8.1 is correct because i follow the steps in official web of opencv, also the path of image is correct too, but i think there is a problem in the code because if the problem is in the installation, any program will work (openig webcam or red image).

I thank everyone in advance for your help!

2017-07-17 09:12:39 -0600 asked a question Before openning the image using OpenCV, I'm trying to create a region groing algorithm using OpenCL. The problem is to find how i can fix the starting point pixel (germ) in this image and transform these steps in OpenCL. Thanks in advance

For each pixel I (i, j) do

If I (i, j) has not already been processed

Then Save (i, j), Growth (i, j),

Increment Region

end for

Growth (i, j)

For any Pixel (k, l) adjacent to I (i, j)

% For all 8-pixels If (Pixel (k, l) not already processed)

AND (Criterion (Pixel (k, l)) = Criterion (I (i, j))

Then Growth (k, l)

end for

2017-06-28 22:19:05 -0600 commented answer 'm trying to implement an image processing algorithm using OpenCL,for that i I read one image using OpenCV. The problem is how transform the data into OpenCL

I have opencv2.4 version. Would you please explain a little bit more how it works with opencl

2017-06-28 22:12:07 -0600 received badge  Editor (source)
2017-06-28 21:16:25 -0600 asked a question region growing with opencl

After openning the image using OpenCV, I'm trying to create a region groing algorithm using OpenCL. The problem is to find how i can fix the starting point pixel (germ) in this image and transform these steps in OpenCL. Thanks in advance

PSEUDO CODE:

For each pixel I (i, j) do

If I (i, j) has not already been processed

Then Save (i, j), Growth (i, j),

Increment Region

end for

Growth (i, j)

For any Pixel (k, l) adjacent to I (i, j)

% For all 8-pixels If (Pixel (k, l) not already processed)      

AND (Criterion (Pixel (k, l)) = Criterion (I (i, j))

Then Growth (k, l)

end for
2017-06-27 11:51:43 -0600 received badge  Enthusiast
2017-06-18 07:34:18 -0600 commented question 'm trying to implement an image processing algorithm using OpenCL,for that i I read one image using OpenCV. The problem is how transform the data into OpenCL

I d'ont know the version of OpenCV installed on my computer. I just installed 2.4.9, would you tell me how can i find out

2017-06-16 21:55:03 -0600 asked a question 'm trying to implement an image processing algorithm using OpenCL,for that i I read one image using OpenCV. The problem is how transform the data into OpenCL

The code should read one image using OpenCV, then transform the data into OpenCL image, then i use a buffer to read data. Finally i copied it to the host again

can someone explain to me how opencv works with opencl

2017-06-16 20:52:44 -0600 commented answer I am trying to run this simple OpenCV program, but i got this error:

what about this code:

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

using namespace cv;

int main()
{
    Mat image;// new blank image
    image = cv::imread("C://Users//elala mobile//Documents//Visual Studio 2010//Projects//opencv//opencv//mypic.png", 0);// read the file
    namedWindow( "Display window", WINDOW_NORMAL );// create a window for display.
    imshow( "Display window", image );// show our image inside it.
    waitKey(0);// wait for a keystroke in the window
    return 0;
}

I have tried many codes but the result was the same(gray image).

2017-06-16 19:50:59 -0600 asked a question I am trying to run this simple OpenCV program, but i got this error:

OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file .../opencv/modules/highgui/src/window.cpp, line 276

and the image shown was gray.

The code is:

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

using namespace cv;

int main(int argc, char** argv)
{
    IplImage* img = cvLoadImage( "C:\\Users\\elala mobile\\Documents\\Visual Studio 2010\\Projects\\opencv\\opencv\\mypic.png" ); //change the name (image.jpg) according to your Image filename.
    cvNamedWindow( "Example1", CV_WINDOW_NORMAL );
    cvShowImage("Example1", img);
    cvWaitKey(0);
    cvReleaseImage( &img );
    cvDestroyWindow( "Example1" );
    return 0;
}

What's the cause of this error?