Ask Your Question

aliavci's profile - activity

2019-05-31 14:56:30 -0600 commented question How to detect clock drawing?

Berak, How is this not a question? I don't see how this is against the FAQ guidelines.

2019-05-31 14:52:43 -0600 edited question How to detect clock drawing?

How to detect clock drawing How can a hand drawn clock be analyzed to see whether or not it was drawn correctly? Some ex

2019-05-31 12:34:00 -0600 asked a question How to detect clock drawing?

How to detect clock drawing How can a hand drawn clock be analyzed to see whether or not it was drawn correctly? Some ex

2015-10-02 04:19:16 -0600 received badge  Necromancer (source)
2015-10-01 22:07:05 -0600 answered a question how to detect eyes and face

You need to have an InputStream for each Cascade file such as in the example below:

InputStream is1 = context.getResources().openRawResource(R.raw.lbpcascade_frontalface);
InputStream is2 = context.getResources().openRawResource(R.raw.eyes_detect);

File cascadeDir = context.getDir("cascade", Context.MODE_PRIVATE);
File cascadeFile = new File(cascadeDir, "lbpcascade_frontalface.xml");
File cascadeFileEye = new File(cascadeDir, "eyes_detect.xml");

FileOutputStream os1 = new FileOutputStream(cascadeFile);
FileOutputStream os2 = new FileOutputStream(cascadeFileEye);

 byte[] buffer = new byte[4096];
 int bytesRead;

while ((bytesRead = is1.read(buffer)) != -1) {
       os1.write(buffer, 0, bytesRead);
 }
 while ((bytesRead = is2.read(buffer)) != -1) {
       os2.write(buffer, 0, bytesRead);
 }
2015-04-09 15:09:56 -0600 commented answer OpenCV Error: Bad Argument <Can not get new positive sample....

Thank you for your answer. However, I even tried making numpos =1 yet it still doesn't work

2015-04-09 01:36:00 -0600 asked a question OpenCV Error: Bad Argument <Can not get new positive sample....

Although I experimented with many different numpos values, including just 1 and not declaring what numpos is at all, I keep getting this error.

With: C:\opencv\build\x64\vc10\bin\opencv_traincascade.exe -data DoneHere -vec IMPORTANTVEC.vec -bg allnegatives.txt -mode ALL -w 24 -h 24

I know this question has been asked many times before, giving an equation of what numpos needs to be. I tried the equation, and many other numpos values too yet no output.

Please let me know what may be causing this.

2015-03-19 23:16:11 -0600 answered a question Zooming problem in ubuntu 14.04

You can always use the WarpPerspective() function. After that, you need to convert the mat into a CV_8UC3 type to perform colour detection. Below is an example:

public void ZOOM(Mat temp){
    Mat temp2 = new Mat();
    temp.convertTo(temp2, CvType.CV_32FC1);

    Mat src=new Mat(1,4,CvType.CV_32FC2);
    Mat dst=new Mat(1,4,CvType.CV_32FC2);

    double[] temppoint = new double[2];

    //src
    temppoint[0] = ZoomAtPoint.x - 50;
    temppoint[1] = ZoomAtPoint.y - 50;
    src.put(0, 0, temppoint);
    temppoint[0] = ZoomAtPoint.x + 50;
    temppoint[1] = ZoomAtPoint.y - 50;
    src.put(0, 1, temppoint);
    temppoint[0] = ZoomAtPoint.x + 50;
    temppoint[1] = ZoomAtPoint.y + 50;
    src.put(0, 2, temppoint);
    temppoint[0] = ZoomAtPoint.x - 50;
    temppoint[1] = ZoomAtPoint.y + 50;
    src.put(0, 3, temppoint);
    //dst:
    temppoint[0]=0.0;
    temppoint[1]=0.0;
    dst.put(0, 0, temppoint);
    temppoint[0]=temp.width();
    temppoint[1]=0.0;
    dst.put(0, 1, temppoint);
    temppoint[0]=temp.width();
    temppoint[1]=temp.height();
    dst.put(0, 2, temppoint);
    temppoint[0]=0.0;
    temppoint[1]=temp.height();
    dst.put(0, 3, temppoint);
    Mat temp3 = temp2.clone();
    Mat perspectiveTransform=Imgproc.getPerspectiveTransform(src, dst);
    Imgproc.warpPerspective(temp2.clone(),temp, perspectiveTransform, temp.size());

}
2015-03-08 16:39:24 -0600 commented answer IP Camera frames manipulation

This works great! However, there is a huge lag between the view output and the camera input. What would you recommend to reduce this? Thanks in advance!

2015-03-08 16:38:18 -0600 received badge  Supporter (source)
2015-03-08 03:27:16 -0600 commented question openCV Android camera orientation

OpenCV is written in C/C++ and you're using its Java wrappers. You might be having this trouble because C/C++ code requires manual memory allocation.

I suggest you use the release() function for each Mat after using them. e.g. mRgba.release()

2015-03-07 20:22:15 -0600 commented question OpenCV Manager Samsung S3

Are you performing the release() operation on each new Mat?

2015-03-07 20:19:31 -0600 asked a question Android OpenCV: IP camera and phone camera simultaneously

I am trying to write an android app that performs operations on two cameras simultaneously. This could be an IP camera and phone camera or two IP cameras (What ever works).

My aim is to display both camera views at the same time. However, to my knowledge, this does not seem possible with the CameraBridgeView given by OpenCV. Please tell me if I am wrong.

Alternatively, I plan to perform operations on frames obtained from two cameras simultaneously without displaying both, but only displaying one at a time.

Please let me know what the correct method to do this is.

2015-02-27 00:31:53 -0600 received badge  Enthusiast
2015-02-24 22:52:10 -0600 commented answer Webcam and IP cam recording with openCv

Would any new IP camera work though as a solution? What about doing this on Android?

2015-02-20 21:57:35 -0600 commented question Curling stone detection

The camera will be moving at all sorts of positions.

2015-02-01 12:09:06 -0600 commented question Curling stone detection

The camera will be moving

2015-01-30 11:38:43 -0600 asked a question Curling stone detection

What is the optimal method to detect a Curling stone in the rink? 2 methods I'm thinking of are colour detection and Cascade training. If there's anything else, please let me know.

2014-12-09 02:48:54 -0600 commented question LBP cascade classification: Swimming pool detection

Steven, could you please elaborate? Canny detection at every single threshold possible doesn't specifically extract the pool edges. A tonne of noise is involved. Sobel seems not to help since it only cuts the found lines up into pieces. Is your numbering meant to imply a sequence of steps or various methods usable?

2014-12-08 20:22:33 -0600 answered a question How to recognize the image that have a circle ?

Use HoughCircles. This method detects circles according to the criteria that you give it.

2014-12-07 01:18:52 -0600 answered a question How to recognize the image that have a circle ?
2014-11-16 12:35:34 -0600 received badge  Nice Answer (source)
2014-11-13 16:18:20 -0600 asked a question Detect swimmer in lane of 50 meter pool

How can I detect a swimmer who is wearing a coloured cap and does some splashing in the water? I want to know when a swimmer approached the lane boundaries and ends.

One approach is colour detection to track swimming cap colour. The problem with this is that the splashes of water and distance might hide the cap.

One possible approach is using cascade training with a lot of images of water splashes. Would this approach work?

Please tell me possible approaches and alternatives.

Thanks in advance

2014-10-19 23:06:53 -0600 commented question Opening video using Python - cannot play video

Is your PC x86 or x64? Try adding the following for x64 in your PATH variable in the Environmental Variables of the computer: ...\opencv\build\x64\vc10\bin in other words: Add the bin path of your OpenCV to the PATH

2014-10-10 12:40:43 -0600 answered a question How to remove small line segments from contour?

Make sure your parameters aren't giving you excess lines by calling OpenCV's convexHull function found here: http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/hull/hull.html

After this to find corners, there's a whole complex manual method of running all the lines through many while loops and calculating their slopes to detect whether they are horizontal or vertical. check your vertical lines separately for highest and lowest y values. Make sure you do this separately for vertical lines on specific x ranges to differentiate between right line and left line

2014-10-07 10:35:53 -0600 commented answer Android using drawContours to fill region

cvtColor(src, dst, GRAY2RGBA, 4)

2014-10-06 18:45:30 -0600 answered a question Android using drawContours to fill region

Did you convert back to rgb? Its only black and white now

2014-10-05 11:18:56 -0600 received badge  Editor (source)
2014-10-05 11:17:32 -0600 answered a question Line detection as only one line
  1. Make a new function to calculate the slope of a line by using the 2 points in a single line. You can do this with the y and x values of the line's points. Do this for every line.
  2. Use the gradient to separate between horizontal lines and vertical looking lines
  3. Find the end points of the line you want to draw by search end points by searching the end points of all the lines according to gradient and place where you might see that point.

An example for part 3 is when searching a horizontal line: Use gradient function to filter horizontal lines, then search the x values of all points to keep the lowest x and highest x only.

2014-10-03 20:14:56 -0600 asked a question Functionality in JavaCV that can't be done in OpenCV

Does JavaCV have any functionality that the regular OpenCV java doesn't have?

2014-10-02 21:53:06 -0600 commented answer OpenCV Java = JavaCV?

Hence, would you suggest working with javacv or opencv for java programs on android and pc?

2014-09-25 03:38:00 -0600 received badge  Teacher (source)
2014-09-24 15:20:59 -0600 answered a question Get quadrilateral from sparse segments
  1. Blur it so that the close lines join together. 2.Then make a while loop to loop over every contour to leave the bigger contours only.
  2. Call the Canny function
  3. Call houghlines to draw the lines on the image to draw the lines
2014-09-15 23:21:33 -0600 asked a question JavaCV or simply OpenCV's java functions?

JavaCV lacks API and code online, hence seems inconvenient OpenCV has a java version.

Would you recommend JavaCV, or just simply OpenCV by itself?

2014-09-09 15:09:24 -0600 commented question LBP cascade classification: Swimming pool detection

The issue I find with that is how would you plan to isolate the swimming pool area? Considering various swimming pool tile colours.

2014-09-08 18:40:25 -0600 answered a question Problems with Face detection

Not sure if this is the most efficient way but try cascade training with half faces?

2014-09-08 18:38:22 -0600 asked a question LBP cascade classification: Swimming pool detection

I am trying to make my program detect a swimming pool and place lines around its boundaries. I think that using LBP cascade to detect the swimming pool area, then Harris corner detection to find the corners is the right approach. I am not sure though. Is a swimming pool possible to be detected?