Ask Your Question

zshn25's profile - activity

2020-10-15 02:50:09 -0600 received badge  Popular Question (source)
2016-06-29 13:19:12 -0600 received badge  Necromancer (source)
2016-03-31 00:28:01 -0600 commented question No Implementation Found Error in OpenCv Android Tutorial 4

Having the same issue. Did you find any solution for this?

2016-03-18 07:44:56 -0600 answered a question Camera not scanning face properly

I suggest you first try your app on PC, rather than jumping to Android.

The problems you face are common ones if you are using any of the OpenCV Face Recognition algorithms (LBPHFaces, FisherFaces, EigenFaces). Try using all of these. In your PersonRecognizer.java file, line 16, change createLBPHFaceRecognizer to createFisherFaceRecognizer or createEigenFaceRecognizer and see which works best for you.

As per the face inside face problem, once you detect face, you can restrict the blobs according to its size(length, width, area). As for the beard part, try using other cascade classifiers. If not, create your own.

Research on how you can improve the available techniques or implement another Face recognition algorithm. (Read related papers)

2016-03-17 07:12:59 -0600 answered a question How to detect the Licence plate?

Turns out, the number plate is not actually white. I tuned the HSV parameters a little bit and it worked.

Also, this is not a reliable method for detecting number plates. Since, it changes from image to image.

2016-03-17 06:38:08 -0600 answered a question Moving object classification

The aspect ratio of cars and moterbikes may be relatively less. But, cars will have more width (and length) You can check the length and width of each blob and set a threshold to classify the vehicles.

Also, you can check the blob properties in an ROI (the junction) to make it more effective. The blob area and aspect ratio wouldn't vary that much within the ROI

2016-03-17 05:29:58 -0600 commented answer Error building OpenCV with Tesseract

Thanks, that worked :)

2016-03-16 01:34:06 -0600 commented question Error building OpenCV with Tesseract

But why is it not building. May I ask? Did I do anything wrong?

2016-03-15 05:21:13 -0600 asked a question Error building OpenCV with Tesseract

I downloaded and built both Tesseract as well as Protocol buffer from source. But CMake gives me error. Tesseract: NO Could NOT find PROTOBUF (missing: PROTOBUF_LIBRARY) Build libprotobuf from sources: libprotobuf not found into system Tesseract: NO image description

2016-03-06 23:55:22 -0600 commented answer How to use #include cvcam.h in opencv 3.0?

If you just want to run it, then this code will directly run with OpenCV 3.0.0. But using the depreciated C functions is not recommended. Also, I think the problem is in including the libraries. How are you compiling this? If you are using Visual Studio in Windows, then follow this tutorial to compile.

2016-03-05 03:36:21 -0600 answered a question How to reduce false positives for face detection

One method for avoiding false positives might be to check for the size of the detected blob, or to check its aspect ratio. Faces must have a particular aspect ratio and thus eliminates false positives

2016-03-05 03:32:38 -0600 commented question opencv 3.1 java video file not opening

Maybe it is am ffmpeg problem, try copying the ffmpeg ddl file from opencv built folder to your application folder

2016-03-04 08:12:16 -0600 commented question opencv 3.1 java video file not opening

In the video path, give '/' instead of '\'

2016-03-04 08:03:00 -0600 commented answer How to use #include cvcam.h in opencv 3.0?

Please stop using the depriciated C code. For example use Mat instead of IplImage, etc.That should do it

And, yes, you can add long code. Edit your question and add the code to it in the end

2016-03-03 00:29:45 -0600 commented answer How to use #include cvcam.h in opencv 3.0?

Then maybe the problem is something else. Help me help you by posting your code

2016-03-02 13:23:55 -0600 received badge  Student (source)
2016-02-29 23:18:07 -0600 answered a question How to use #include cvcam.h in opencv 3.0?
#include <opencv2/opencv.hpp>

should do it

2016-02-29 22:44:18 -0600 answered a question VideoCapture is not working in OpenCV 3.0.0 or the 3.1.0 in Windows 7

I think your rtsp link is broken. I tried the same with OpenCV 3.0.0 and its working perfectly fine! image description

2016-02-28 23:30:28 -0600 asked a question How to detect the Licence plate?

I am trying to detect the number plate in an image. Usually licence plates in my country are black texts with white or yellow background. So, I detect these colors from an image. But my algo gives me everything except the licence plate. The code I used is

Mat img_hsv;
cvtColor(input_image, img_hsv, CV_BGR2HSV);

Mat img_yellow;
int lowerHue = 22;  //For yellow
int upperHue = 38;
inRange(img_hsv, Scalar(lowerHue, 100, 100), Scalar(upperHue, 255, 255), img_yellow);

Mat img_white;
inRange(img_hsv, Scalar(0, 0, 200), Scalar(255, 55, 255), img_white);

Mat img_black;
inRange(img_hsv, Scalar(0, 0, 0), Scalar(255, 55, 50), img_black);

Mat mask = img_black + img_white + img_yellow;
Mat img_result;
bitwise_and(input_image, input_image, img_result, mask);

and the result is image description

2016-02-28 23:04:55 -0600 commented question VideoCapture is not working in OpenCV 3.0.0 or the 3.1.0 in Windows 7

Could you please give us more info? Is the rtsp link working? You can check that through vlc player. What error are you getting?

2016-02-27 03:29:15 -0600 answered a question OpenCV is built with CUDA but gpu::getCudaEnableDeviceCount() returns 0

I guess updating your graphics card drivers might help.

2016-02-27 00:31:31 -0600 received badge  Enthusiast
2016-02-26 04:14:49 -0600 commented answer getRotationMatrix2D gives error

I'm sorry, it worked. Thanks!!

2016-02-26 03:20:39 -0600 received badge  Scholar (source)
2016-02-26 01:05:26 -0600 received badge  Critic (source)
2016-02-26 01:05:07 -0600 commented question How to include ros.h and other ros headers??

Let me tell you something about headers, When you #include < >, you are including standard library header files. For example #include <sstream>. It includes the system header files. When you #include " ", you are including user-defined header files. For example #include "ros/ros.h". These are the libraries you downloaded.

2016-02-26 00:15:07 -0600 asked a question getRotationMatrix2D gives error

The python function getRotationMatrix2D as follows

center = tuple(np.array(image.shape)/2)
rot_mat = cv2.getRotationMatrix2D(center,angle,1.0)
result = cv2.warpAffine(image, rot_mat, image.shape,flags=cv2.INTER_LINEAR)

gives this error

Traceback (most recent call last):
File "C:\Users\zeeshan khan\Desktop\opencv\Code\Python\rotate.py", line 13, in <module>
rot_mat = cv2.getRotationMatrix2D(center,angle,1.0)
TypeError: function takes exactly 2 arguments (3 given)
2016-02-25 04:32:52 -0600 received badge  Supporter (source)
2016-02-25 04:10:46 -0600 commented answer Where to find string.h??

How about strings.h? (the plural of string)

2016-02-24 06:14:28 -0600 received badge  Editor (source)
2016-02-24 06:12:10 -0600 asked a question Super Resolution gives error with CUDA or with TVL1

I tried running the super resolution OpenCV sample. I built OpenCV 3.0.0 with CUDA on my 64-bit machine. The function cv::superres::createFrameSource_Video_CUDA gives the following error

OpenCV Error: The function/feature is not implemented (The called functionality is disabled for current build or platform) in throw_no_cuda, file C:\opencv\source\modules\core\include\opencv2/core/private.cuda.hpp, line 101

So, it uses createFrameSource_Video function to get the input. Also, other CUDA functions work fine. Just the above one gives an error.

It works fine with the farneback Optical flow algoritm but does't work with others. For example, the function createOptFlow_DualTVL1_CUDA gives the following error

OpenCV Error: Assertion failed (allocSize == allocations.back()) in `anonymous-namespace'::MemoryStack::returnMemory, file C:\opencv\source\modules\core\src\cuda_stream.cpp, line 99

image description

2016-02-24 05:48:41 -0600 answered a question Where to find string.h??

Use #include <string> or #include <string.h>.

The solution is that you should use <..> instead of '..'.

Hope it helps

2016-02-24 03:18:22 -0600 received badge  Nice Answer (source)
2016-02-24 03:05:03 -0600 received badge  Teacher (source)
2016-02-23 04:14:21 -0600 answered a question How to change BGR to RGB of a video frame using C /C++

You can just use

cv::VideoCapture cap(0);
cv::Mat frame;
while(cap.read (frame)){
  cv::cvtColor(frame, frame, BGR2RGB);
  cv::imshow("RGB", frame);
  cv::waitKey(1);
}
2016-02-23 03:52:09 -0600 answered a question cv2.imread returns None

Try replacing \ with / in your path to image. Also, try copying the image in your program folder and just give

im = cv2.imread("image.jpg")

cv2.imshow("", im)

cv2.waitKey(0)

2016-02-23 03:40:58 -0600 answered a question VideoReader_GPU not available, but built with NVCUVID?

Try updating your Nvidia device drivers. Worked for me

2016-01-29 01:00:18 -0600 answered a question error: ‘create’ is not a member of ‘cv::FeatureDetector {aka cv::Feature2D}’ Ptr<FeatureDetector> detector = FeatureDetector::create("SURF") and some compiling errors for OpenCV sample code

For the first two errors, its because of the CV version 3. Try this

Ptr<descriptorextractor> extractor = SURF::create();

Ptr<featuredetector> detector = SURF::create();