Ask Your Question

mahsa's profile - activity

2021-04-23 16:23:17 -0600 received badge  Popular Question (source)
2017-04-28 12:34:41 -0600 received badge  Popular Question (source)
2014-12-09 13:45:00 -0600 marked best answer sum a sequence of frames using opencv/c++

I want to sum all values in 4 frames in real-time. current frame and 3 frames before that. To do that, every time that current farme is produced, I store it in a vector called Nframe. This is what I have done until now but seems incorrect..

float *amp;   //points to the current frame
vector<float *>Nframe;

   for(int i=0; i<4; i++){
           Nframe.push_back(amp);
        }

         int sum_of_elems=0;
         for(std::vector<int>::iterator j=Nframe.begin();j!=Nframe.end();++j){
         sum_of_elems += *j;
         }
2014-12-09 13:16:35 -0600 marked best answer find the center point of an object

I could detect a shape by using canny edge detector. is there any way to find the center point of this detected object? (I mean is there any function in Opencv that can get the output of canny edge detector function as an input and then give the center of this area as an output?)

Thanks in advance..

2014-03-04 08:28:00 -0600 commented answer standard deviation calculation

Thanks for the answer...One more thing: Type of the input is CV_32FC1, should I still use uchar?

2014-03-04 04:57:21 -0600 asked a question standard deviation calculation

I was searching for standard deviation calculation using opencv that I found this:

http://answers.opencv.org/question/6501/problem-with-meanstddev/

I can not underestand what do these two lines mean:

uchar       mean_pxl = mean.val[0];
uchar       stddev_pxl = stddev.val[0];

what would be the output of mean.val[0] and stddev.val[0] ?

Thanks in advance..

2014-02-21 03:06:43 -0600 asked a question keep values in a specific range in a mat using opencv

I have a matrix which has values between 100 to 900. I want to just keep values between 300 to 400 and make zero rest of them. I could not find any thresholding function which keep values between a Range. Does Opencv have any function to do that?

Thanks in advance...

2014-02-19 08:56:42 -0600 commented answer magnitude of a matrix

wow..good news. Is there any function for "orientation"?

2014-02-19 02:41:47 -0600 asked a question magnitude of a matrix

I have used sobel to get the gradient of an image in X and Y direction:

cv::Sobel( Min1, grad_x, Min1.depth(), 1, 0, 3);    
cv::Sobel( Min1, grad_y, Min1.depth(), 0, 1, 3);

now I have the gradient of the Min1 in X direction stored in Mat grade_x and in Y direction stored in Mat grade_y.

How do I calculate the magnitude of grad_x and grad_y? Is there any function in Opencv to get the norm of a matrix?

Thanks in advance...

2014-02-17 06:45:00 -0600 commented answer Fourier Transform

you meant I should try to find the gradient in X and Y direction and use tan to get the orientation?

2014-02-17 06:24:53 -0600 commented answer Fourier Transform

wow..Gradient Images, sounds interesting..do you have any good book or website which is relevant to it?

2014-02-17 03:33:33 -0600 commented answer Fourier Transform

In spatial domain, Yes, it is possible but I need to have orientation and magnitude as output.. which is impossibel in spatial domain

2014-02-17 03:29:31 -0600 commented answer Fourier Transform

Let me to explain what I meant more..assume that I am interested in output(magn and orientation) of the pixel which is located in row 4 and column 8. Is it meaningful to just calculate DFT for this specific pixel? In DFT calculation seems it is possible but in Image procesing viewpoint...I do not know! do you think neighbour pixels have any affection on the output of each pixel value at the end?

2014-02-17 03:02:19 -0600 commented answer Fourier Transform

Thanks for the clear answer...I came up with a new question: If I define an empty kernel on the image, is there any difference If I apply DFT on whole image or just apply it into this specific kernel?I mean what would be the output of pixel values inside the kernel when I apply DFT into whole image and when I apply it on this kernel?In better way: I want to get magnitude and orientation of some values inside the imege. Should I apply DFT on whole image and then find the correspond values result or should I try to calculate DFT on those specific values(for example by assuming that they are defined inside a kernel)? It would be appreciated if you make it clear for me...

2014-02-13 08:35:57 -0600 asked a question Fourier Transform

I used DFT in opencv to get the complex and real images values but some of the values which I get for the Complex image are Negative. Is it usual? what is the reason that I get Negative values?

Thanks in advance..

2013-12-20 08:56:09 -0600 commented question average of some frames

because each element of the list is a float pointer to the current frame.

2013-12-20 05:41:12 -0600 asked a question average of some frames

Is there any possibility in opencv to get average of some frames?

std::list<float*> frames;

for(int i = 0; i < frames.size(); i++)
 {
     //Average of frames            

 }
2013-12-20 02:44:37 -0600 commented answer adding several images

Thanks a lot for your help...what I am doing is difficult for me since I am completely newbie. I edited the code, it would be appreciated if you give me some hints on what I am doing..

2013-12-19 23:30:32 -0600 commented answer adding several images

thanks for the comment but what I mean is using some kind of Temporal Filtering..I want to use medianBlur function in temporal domain

2013-12-19 08:31:40 -0600 commented answer adding several images

I want to apply medianblur function into a sequence of frames...So, is it possible two add some frames the same as yours, then get the average of them and give it as an input to the medianBlur function?

2013-12-19 08:30:01 -0600 commented answer adding several images

really? so, what is addweighted function?!!

2013-12-19 08:11:56 -0600 asked a question adding several images

is there any way to add several images two each other using opencv?

thanks in advance...

after editing:

 int N;
     cin >> N;
     for(int i=0; i<sen; i++){
        Nframes.push_back(pClose); //pclose is a float pointer which points to the current frame
        if(Nframes.size() == N){
            for(int i=N; i>0; i--){
               Nframes.pop_front();

             //  addWeighted(src1, alpha, src2, beta, gamma, dst, -1);

           }
        }
     }
2013-12-19 03:16:18 -0600 commented question Temporal filtering

actually what I am going to do is noise reduction. I am using depth images and I want to work on motion blur. I do not know what would be the benefit of tracking 1 point in stream and what would be the result of getting average of a sequence of frames..somehow applying a kind of filtering algorithm into a sequence of frames. would it smooth the images?

2013-12-19 02:28:29 -0600 commented answer N frames summation

Thanks Median, but I am talking about the real-time...Is that work in this case since I just have access to the current frame?

2013-12-19 02:26:27 -0600 received badge  Supporter (source)
2013-12-19 02:26:08 -0600 commented answer problem with HoughCircles

It is the real one..thanks for the comment.. actually the problem was thresholding part...

2013-12-17 02:37:40 -0600 asked a question Temporal filtering

I would like to ask a question which I could not find any answer for that in the internet. I was thinking about the Temporal filtering that I came up with this question that If it is possible to get average of some sequence of frames or not? if yes, what would be the benefit of doing this? Does it smooth the images? Is it a kind of temporal filtering? and....

Any explanation would be appreciated...

2013-12-16 11:10:45 -0600 asked a question N frames summation

Is it possible to add N frames together in Real-time by using Opencv?

2013-12-16 02:47:41 -0600 asked a question problem with HoughCircles

I have one question! What is the reason that My HoughCircles function sometimes can detect the ball sometimes not?

there is just one ball in the scene, without any movement... sometimes HoughCircles can detect it sometimes not!

any idea will be appreciated..

2013-12-15 17:19:55 -0600 asked a question draw a plot between two center points in real-time

If I want to draw a line between (center.x , center.y)in the current frame and (center.x , center.y) in the previous frame..should I every time that the code runs keep it in a vector and then take them two by two and use cvPoint() and cvLine() ?

Is this the correct way to do that by using opencv?

2013-12-15 12:05:53 -0600 received badge  Editor (source)
2013-12-15 12:05:53 -0600 edited question Track a Point in Stream

If I know the coordinate of one point in Frame 1, Is there any way in Opencv to track this point in a sequence of frames and find its new coordinates in different frames?Is there any way to Plot them?

Thanks in advance