Ask Your Question

amin.karimi's profile - activity

2018-12-25 05:32:28 -0600 received badge  Notable Question (source)
2017-10-24 09:10:30 -0600 received badge  Popular Question (source)
2017-07-18 07:43:01 -0600 received badge  Famous Question (source)
2017-06-12 07:22:33 -0600 received badge  Taxonomist
2016-12-19 04:24:25 -0600 received badge  Famous Question (source)
2016-09-16 03:42:59 -0600 received badge  Student (source)
2016-04-29 05:48:01 -0600 received badge  Notable Question (source)
2015-12-28 03:47:08 -0600 received badge  Notable Question (source)
2015-10-15 22:22:32 -0600 received badge  Popular Question (source)
2015-07-17 10:53:01 -0600 received badge  Popular Question (source)
2014-02-06 09:01:07 -0600 commented answer i want to convert from rgb to lab

oh i know my problem was image type , my image type was bmp and i write jpg . thanks steven . steven open cv has not rgb to hsi ?why?

2014-02-05 09:50:06 -0600 commented answer i want to convert from rgb to lab

steven i copy my image to location of project and always do this work. so this is not problem and a lots of program i write with visual and so my configure is not problem too, i dont know?

2014-02-05 08:21:11 -0600 commented answer i want to convert from rgb to lab

i copy your code in my visual but it produce error like my code : no source avilable and write SEH Exception was handled

2014-02-04 05:13:57 -0600 asked a question i want to convert from rgb to lab

this is my code and my goal is to convert from rgb to lab but when implement this alghoritm opencv produce error and does'nt answer why?

Mat image,im;   
image=imread("2.jpg");  
a=image.rows;   
b=image.cols;   
cvtColor(image,im,CV_BGR2Lab);
imshow("sohi",im);
2014-02-02 20:10:49 -0600 asked a question how can convert rgb to cie l*a*b with cpp

hi i want to convert rgb (depth of pix=8 bits) to cie lab with cpp . plz help me guys

2013-12-14 10:46:18 -0600 commented answer define ROI around an object

well your explain about what you want were very ambiguous now i think u want contour around things so u can go this site and there are good information about contour

http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html

2013-12-14 08:06:33 -0600 received badge  Teacher (source)
2013-12-14 01:40:11 -0600 answered a question opencv imread, does it perform a deep copy?

hi i dont understand exactly what you say but i explain a bit about load image to program in additional code for add image to program you shoulad use

IplImage* img = cvLoadImage( "image.jpg" );

This line loads the image.* The function cvLoadImage()is a high-level routine that determines the file format to be loaded based on the fi le name; it also automatically allocates the memory needed for the image data structure. Note that cvLoadImage()can read a wide variety of image formats, including BMP, DIB, JPEG, JPE, PNG, PBM, PGM, PPM, SR, RAS, and TIFF. A pointer to an allocated image data structure is then returned. Th is structure, called IplImage, is the OpenCV construct with which you will deal the most.

but in c api at first you define a mat image that a image is like a mat after you read file from computer a depend to type of image like cv_8uc3 pixel to pixel of image(i.e inetensity if pixels) copy to mat and when u have 3 channels image indeed you have 3 mat or every location of mat has 3 value (intensity) at this state every image is mat finish ok ?

2013-12-14 01:05:40 -0600 commented answer i have problems with handling mouse event in opencv

hi daniil yes it is true thanks for your help only 1 questin ? what is voidparam argument in my_mouse_callback ? because i should add Mat image = *((Mat)param); to may function what is this? without this with add your advice again my program doesnt work

2013-12-13 15:07:52 -0600 answered a question define ROI around an object

in c++ u can write like this

Mat image// and add a image to your program

Rect ROI = Rect(x,y,width,height);

Mat image_ROI =image(ROI);

2013-12-13 15:03:57 -0600 commented question problem with imshow

u can add your image to location of your program and only use "ganesh.jpg" and about this you should write d:\ganesh.jpg no d:/

2013-12-13 14:45:14 -0600 commented answer i have problems with handling mouse event in opencv

no again whit add this code to my function after running only i have black image 500by500 that when i click left button nothing happens.

2013-12-13 11:47:32 -0600 asked a question i have problems with handling mouse event in opencv

i want to write a program with this feature:

1:when a user click left button of mouse on windows a circle is constructed with for ex radius (15)

at first i make a black image 500*500

and i use setMouseCallback for my_mouse_callback and in function my_mouse_callback i write my

circle code ,when run the program there arent any errors but only there is a black image 500*500 that when i click left button of mouse nothing happens, i know my program has trouble but where? please help me my program is like this:

void my_mouse_callback(int event, int x, int y, int flags, void* param);

int main() { int i,j,k;

Mat image;
image.create(500,500,CV_8UC3);

namedWindow("amin");

for(i=0;i<500;i++){
    for(j=0;j<500;j++){
        for(k=0;k<3;k++){
            Vec3b &intensity = image.at<vec3b>(j, i);
            intensity.val[k]=0; 
        }
    } 
} 

setMouseCallback( "amin", my_mouse_callback, &image );

imshow("amin",image);
waitKey(0);

return(0);

}

void my_mouse_callback( int event, int x, int y, int flags, void* param ) {
if(event==CV_EVENT_LBUTTONDOWN){
    circle( image, Point(x,y), 20, Scalar(0xff,0xff,0xff) );
}

}

2013-12-11 10:20:55 -0600 commented answer addweighted for mix of two image

martin said true , i should use image_roi as last argument in addweighted

2013-12-11 00:21:11 -0600 commented answer addweighted for mix of two image

yes martin , thanks alot

2013-12-10 17:05:34 -0600 asked a question addweighted for mix of two image

i want to mix a part of any image with original image and i write this program but my program produce only result of mixing of two parts but i want to see may original image with a part that is mixed with a part of another image why?please help me , my original image is "khaste.jpg"

    Mat image;
Mat im;
image=imread("khaste.jpg",CV_LOAD_IMAGE_COLOR);
im=imread("kari o behrooz.jpg",CV_LOAD_IMAGE_COLOR);
Rect roi=Rect(150,200,40,60);
Mat image_roi=image(roi);
Mat im_roi=im(roi);

addWeighted(image_roi,.3,im_roi,.7,0,image);

namedWindow("k",1 );
imshow("k",image);
cvWaitKey(0);
return (0);

}

2013-12-08 07:50:38 -0600 commented question how to print out (display) a matrix

ok because i start learning opencv with learning opencv book and this book is for c api do u know a book or site learning opencv with c++???????

2013-12-08 06:13:00 -0600 commented question how to print out (display) a matrix

when i write this code visual produce error

include <iostream>

include<core\core_c.h>

include<core\types_c.h>

include <highgui.h>

include <conio.h>

using namespace std;

int main()

{ int b; double a[] = { 3, 3, 3, 3, 3, 3, 7, 8, 9, 10, 11, 12 };

CvMat Ma=cvMat(3, 4, CV_64FC1, a);

cout<< Ma << endl; cin>>b; return(0);

} why???????/

2013-12-08 05:15:25 -0600 asked a question problam with cvinitmatheader

when i implement this program

include <iostream>

include <highgui.h>

include <core\core_c.h>

include <core\types_c.h>

using namespace std; int main() {

float vals[] = { 0.866025, -0.500000, 0.500000, 0.866025 }; CvMat rotmat; cvInitMatHeader( &rotmat, 2, 2, CV_32FC1, vals ); cout << M << endl; cin>>b;

return(0); } when i run it visual produce abnormal answer like this 1234awdedn455 rather than my matrix why?

2013-12-08 03:22:23 -0600 commented question how to print out (display) a matrix

thanks alot

2013-12-07 23:57:40 -0600 commented question how to print out (display) a matrix

how i can switch to c++ , when i write cout my visual produce error

2013-12-07 14:20:53 -0600 asked a question how to print out (display) a matrix

i create a matrix like this double a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };

CvMat Ma=cvMat(3, 4, CV_64FC1, a);

and i want to print out (display) this matrix but i cant i look for on the internet and learning opencv but i cant find a procedure for print out matrix please help me about 1 day i confuse

2013-12-02 14:31:33 -0600 commented question problem with error when i run my program

i use opencv 2.4.3 for visual studio 2013 and my os is 64 bit windows 8 when i use opencv 2.4.7. for visual 2013 my problem is changed and this error is seen unable to start program c:\opencv\my projects \amin \x64\debug

2013-12-02 13:28:15 -0600 commented question problem with error when i run my program

after adding opencv library to visual studio , i copy the program to my project and run it ,

program:

include <opencv2/opencv.hpp>

using namespace cv;

int main() { Mat img(Mat::zeros(100, 100, CV_8U));

imshow("window", img);

waitKey();

return 0;

}