Ask Your Question

AMP's profile - activity

2015-11-11 07:36:05 -0500 received badge  Nice Answer (source)
2014-08-10 11:45:15 -0500 commented answer How to extract Frames from AVI video

sprintf(s,"YOUR_DIRECTORY/frame%d.jpg",num);

2013-07-10 17:02:38 -0500 received badge  Nice Answer (source)
2013-07-10 10:18:57 -0500 received badge  Teacher (source)
2013-07-09 07:47:01 -0500 answered a question Is the Erode and Dilate images mixed up in the Doc

Dilation and erosion work on white pixels(pixels with 1 value) so when you dilate above image you expand white area and when eroding reduce white area.

So there is not any bug!

2013-06-21 01:49:52 -0500 answered a question Detect specific body parts

I think you can't find them,but you can train any thing you want with sample images of that.

Cascade Classifier Training

2013-06-20 05:42:28 -0500 commented answer How to perform skin tone matching

you don't need to match histograms,if you find the color that maximize histogram you can change color of the other image to match the color of face!

2013-06-20 03:19:18 -0500 answered a question How to perform skin tone matching

First you should detect face.you can use OpenCV Face detection.

then you can compute histogram of detected face.the most frequent color is face's color and you can use it to change color of body.

2013-06-19 01:15:13 -0500 answered a question cv2.VideoWriter.write is doing nothing

You should write this part out of Loop

writer = cv2.VideoWriter(vidDir, fourcc, 30, (width,height))

because it construct a new video file at each iteration.

2013-06-16 06:22:12 -0500 received badge  Organizer (source)
2013-05-29 12:45:14 -0500 received badge  Critic (source)
2013-05-22 11:25:49 -0500 commented answer Detect hand-drawing shapes

Squares.cpp is a sample code(inside your OpenCV folder) for detecting squares in c++,you should read it and change it to java.if you want to find another objects you should change few parameters to find triangle, circle,...

2013-05-22 09:58:18 -0500 commented answer Can't find the button create by cvCreateButton

I don't think so...

2013-05-22 09:55:27 -0500 answered a question Detect hand-drawing shapes

You can get idea from "squares.cpp" in samples folder of OpenCV.

2013-05-14 09:31:34 -0500 answered a question How to display a raw image using Opencv

Check out DCRaw

2013-05-04 02:28:17 -0500 answered a question Difference between frames after edge detection

Hi,

you should keep edge frame of last iteration of loop then compute " absdiff " between new edge frame and last edge frame.

2013-01-19 05:33:44 -0500 commented answer How to extract Frames from AVI video

if (c == 'f')

{

sprintf(s,"frame%d.jpg",num);

cvSaveImage(s,frame);

}

this part save image when you press f

if you want to process them you can type what you want in "for loop" and then save output. cvSaveImage(s,output)

2013-01-18 11:43:04 -0500 answered a question How to extract Frames from AVI video

Try this.(press "f" button to save frame)
it's your code with some changes!

#include<opencv\cv.h>
#include<opencv\highgui.h>
#include<opencv\ml.h>
#include<opencv\cxcore.h>
#include<fstream>



int main( int argc, char** argv ) {
cvNamedWindow( "DisplayVideo", CV_WINDOW_AUTOSIZE );
CvCapture* capture = cvCreateFileCapture( argv[1] );
IplImage* frame;
int num=0;
char s [20];
while(1) {
num++;
frame = cvQueryFrame( capture );
if( !frame ) break;
cvShowImage( "DisplayVideo", frame );
char c = cvWaitKey(33);
if( c == 27 ) break;
if (c == 'f')
{
sprintf(s,"frame%d.jpg",num);
cvSaveImage(s,frame);

}
}
cvReleaseCapture( &capture );
cvDestroyWindow("DisplayVideo" );
}
2012-12-23 10:07:24 -0500 answered a question Can't find the button create by cvCreateButton

click on "Display properties window" button at top of the window or CTRL+P,now you can see your button.

2012-12-22 08:04:24 -0500 answered a question imshow in python

Out put of capture.read() is a bool and an image you should separate them ; and you should use waitKey.

import cv2
capture=cv2.VideoCapture(0)
while True:
    b,frame=capture.read()
    cv2.imshow("image", frame)
    cv2.waitKey(1)
2012-12-07 05:50:31 -0500 commented question Combining multiple webcam feeds to one large via stitching

If they are fixed so you only need to map the outputs of these cameras to a surface and then Blend them together(you can do that manually only one time).

2012-12-07 05:36:08 -0500 commented question Combining multiple webcam feeds to one large via stitching

I think it's easier than panorama!

Are your webcams fixed?!

2012-12-07 04:18:42 -0500 commented answer Highlight the Squares in an Image using OpenCV for iOS

Sorry I don't know objectiveC programming and Xcode project...!

2012-12-07 01:36:42 -0500 commented answer Highlight the Squares in an Image using OpenCV for iOS

It's in your OpenCV folder! ...../OpenCV-2.4.3/samples/cpp/squares.cpp

I can mail it to you if you want.

2012-12-07 00:35:45 -0500 answered a question Highlight the Squares in an Image using OpenCV for iOS

You can use "squares.cpp" in samples folder to implement that for iOS.(you need to edit this code)

2012-11-29 02:37:04 -0500 answered a question How to filter a shape from a binary image

I think squares.cpp(or squares.py) in samples folder can help you.

you can change some parts of the code and detect any simple objects (like square,circle,triangle...)

2012-11-27 00:50:34 -0500 commented answer How to operate on each pixel of a cv2.cv.Mat with a 3 x 3 matrix?

yes,it does create a 3x1 matrix.

you should manually iterate over each pixel by changing i & j in a for loop.

2012-11-26 08:47:38 -0500 received badge  Supporter (source)
2012-11-26 07:46:12 -0500 answered a question How to operate on each pixel of a cv2.cv.Mat with a 3 x 3 matrix?

I think this code can help you!

Mat x,y,z;
x=Mat(image.at<cv::Vec3b>(i,j));
x.convertTo(y,c.type()); //c is your 3x3 matrix
z=c*y;