Ask Your Question

Prakash's profile - activity

2020-06-25 05:18:22 -0600 received badge  Notable Question (source)
2019-04-03 06:19:15 -0600 received badge  Popular Question (source)
2018-02-20 02:08:33 -0600 commented answer LBF Facemark Tutorial Issue

followed above steps got this error "loading data from : lbfmodel.yaml OpenCV(3.4.0-dev) Error: Unknown error co

2018-02-20 02:07:53 -0600 commented answer LBF Facemark Tutorial Issue

followed above steps got this error * "loading data from : lbfmodel.yaml OpenCV(3.4.0-dev) Error: Unknown error

2017-08-20 21:58:55 -0600 answered a question Using trained file for predictions

in Opencv 3.3 syntax is changed.
You need to pass the path of your trained ".yml" file in the constructor. like shown here
I don't have python opencv installed so i'm not sure about python syntax

2017-04-26 23:09:17 -0600 commented answer OpenCv 3.2 Build failed

Thanks for your reply. yeah i chose the right one for 32bit. but to which project should i add path? there are 53 projects

2017-04-26 04:25:20 -0600 received badge  Nice Question (source)
2017-04-25 23:56:07 -0600 commented question OpenCv 3.2 Build failed

yes i tried again from start (with latest tbb) no error from cmkae, but in visual studio i see error at C:\OpenCv_3.2\Source\modules\core\include\opencv2\core\private.hpp # include "tbb/tbb.h" can you try once? (i had removed cuda from build)

2017-04-25 11:13:35 -0600 commented question OpenCv 3.2 Build failed

TBB_ENV_INCLUDE = C:/tbb2017_20161128oss/include

TBB_ENV_LKIB = C:/tbb2017_20161128oss/lib/ia32/vc14_ui/tbb.lib

TBB_ENV_LIB_DEBUG = C:/tbb2017_20161128oss/lib/ia32/vc14_ui/tbb_debug.lib

TBB_VER_FILE = C:/tbb2017_20161128oss/include/tbb/tbb_stddef.h

these are the values that i gave in cmake , i hope the values are correct. (previously Opencv 3.1 had built fine! )

2017-04-25 08:31:27 -0600 commented question OpenCv 3.2 Build failed

thanks for your reply. that error is slightly confusing. i have downloaded tbb and pointed its header in cmake (check cmake output) i didn't notice any error in cmake reg tbb!

2017-04-25 04:43:02 -0600 asked a question OpenCv 3.2 Build failed

i downloaded latest repo from GitHub (Master branch OpenCv 3.2).
i'm building with tbb and world [Cmake gui, located tbb header file and tbb.lib, tbb_debug.lib ]
used visual studio 2015 community [x86 release mode]
build failed, what could ahve gone wrong?
Below is the output from visual studio (here's Cmake's Output, CMakeCache.txt and cvconfig.h)
Thanks

1>------ Build started: Project: opencv_world_AVX, Configuration: Release Win32 ------
2>------ Build started: Project: opencv_world_AVX2, Configuration: Release Win32 ------
3>------ Skipped Build: Project: RUN_TESTS, Configuration: Release Win32 ------
3>Project not selected to build for this solution configuration
4>------ Skipped Build: Project: uninstall, Configuration: Release Win32 ------
4>Project not selected to build for this solution configuration
1> mathfuncs_core.avx.cpp
2> mathfuncs_core.avx2.cpp
1>C:\OpenCv_3.2\Source\modules\core\include\opencv2/core/private.hpp(63): fatal error C1083: Cannot open
include file: 'tbb/tbb.h': No such file or directory 2>C:\OpenCv_3.2\Source\modules\core\include\opencv2/core/private.hpp(63): fatal error C1083: Cannot open include file: 'tbb/tbb.h': No such file or directory
5>------ Build started: Project: opencv_world, Configuration: Release Win32 ------
5>LINK : fatal error LNK1181: cannot open input file 'C:\OpenCv_3.2\Build\modules\world\opencv_world_AVX.dir\Release\mathfuncs_core.avx.obj'
6>------ Build started: Project: opencv_createsamples, Configuration: Release Win32 ------
7>------ Build started: Project: opencv_interactive-calibration, Configuration: Release Win32 ------
8>------ Build started: Project: opencv_python3, Configuration: Release Win32 ------
9>------ Build started: Project: opencv_test_highgui, Configuration: Release Win32 ------
6>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
7>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
8>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
10>------ Build started: Project: opencv_perf_calib3d, Configuration: Release Win32 ------
11>------ Build started: Project: opencv_perf_core, Configuration: Release Win32 ------
12>------ Build started: Project: opencv_perf_features2d, Configuration: Release Win32 ------
9>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
13>------ Build started: Project: opencv_perf_imgcodecs, Configuration: Release Win32 ------
10>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
14>------ Build started: Project: opencv_perf_imgproc, Configuration: Release Win32 ------
11>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
12>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
15>------ Build started: Project: opencv_perf_objdetect, Configuration: Release Win32 ------
16>------ Build started: Project: opencv_perf_photo, Configuration: Release Win32 ------
13>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
17>------ Build started: Project: opencv_perf_stitching, Configuration: Release Win32 ------
15>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
16>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
18>------ Build started: Project: opencv_perf_superres, Configuration: Release Win32 ------
14>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
19>------ Build started: Project: opencv_test_flann, Configuration: Release Win32 ------
20>------ Build started: Project: opencv_perf_video, Configuration: Release Win32 ------
17>LINK : fatal error LNK1181: cannot open input file '....\lib\Release\opencv_world320.lib'
21>------ Build started: Project: opencv_perf_videoio, Configuration: Release Win32 ------
18>LINK : fatal error LNK1181: cannot open input file ...







































(more)

2017-04-11 01:36:13 -0600 received badge  Scholar (source)
2017-04-11 01:32:25 -0600 received badge  Student (source)
2016-06-21 03:58:05 -0600 asked a question Opencv IP Camera Error

I am using andriod app (IP webcam) as ip camera. i'm running below code in separate thread. because if i run in main thread it crashes the program.

VideoCapture cap; Mat img;
cap.open("http://192.168.0.101:8080/video?x.mjpeg");
while(waitKey(33)!=27)
{
    try{
        cap>>img;
        cout<<"Thread active"<<endl;
        if(img.empty())
        {
         cout<<"camera Closed"<<endl;
         break;
        }
         imshow("Video",img);
      } catch(...{}    
}

everything works fine. even if i turn off camera(close andriod app) it prints "Camera closed" in Console. The problem occurs when i turn off wifi on my andriod device. the moment i turn off wifi directly(having app still running) thread freezes, even though its in try catch block!

i have a button_click event in my form and i'm callingcap.release(); in it. if i click this button then, follow error is displayed in visual studio (no error from opencv)

HEAP[Test.exe]: HEAP: Free Heap block 6797780 modified at 67977d4 after it was freed Windows has triggered a breakpoint in Test.exe.
This may be due to a corruption of the heap, which indicates a bug in Test.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while Test.exe has focus.
The output window may have more diagnostic information.

Have anybody come across this error? Visual Studio debugger stops at cap.release(); line

Is there a way to overcome this issue?

Thanks & Regards

P.S: I'm using Visual Studio 2013 with opencv 3.0 [C++/Cli (winforms)]

2016-04-09 20:59:06 -0600 received badge  Editor (source)
2016-04-09 20:50:16 -0600 asked a question openh264 - bEnableFrameSkip=0, bitrate can't be controlled

there are a lot of questions asked regarding opencv + H.264 but none of them gave detailed explanation.

i am using openh264(openh264-1.4.0-win32msvc.dll) along with opencv 3.1(custom build with cmake having ffmpeg enabled) in visual studio, i wanted to save video coming from webcam in mp4 format with H.264 compression

VideoWriter write = VideoWriter("D:/movie.mp4", CV_FOURCC('H', '2', '6', '4'), 10.0, cv::Size(192, 144), true);

before using openh264, in console window i was seeing an warning message "Failed to load openh264 library : openh264-1.4.0-win32msvc.dll please check your environment and/or download from here: https://github.com/cisco/openh264/rel... (also video was not been saved)

so i downloaded the dll & kept in a folder with my program file(exe) now when i run the program, i'm seeing different error "[OpenH264] this = 0x0DE312C0, warning: bEnabledFrameSkip=0, bitrate can't be controlled for RC_QUALITY_MODE and RC_TIMESTAMP_MODE without enabling skip frame" (now video is saved, but size is very high! bit rate is around 1200 Kbps)

for me, the sole purpose of using h264 is to reduce the file size.. i think i may have to build openh264 myself with some changes to remove this error, can anyone guide me how? or tell me if there is a way to reduce bit rate somehow through code?

Thanks & Regards

P.S: I tried giving -1 instead of CV_FOURCC(), 'installed codecs' window in my system showed up, i couldn't find h264 or x264 or h264vfw even though i have installed variety of codec packs & h264 from here

2016-03-04 04:14:06 -0600 commented question Opencv haar training parameters : Mode & symmentry

changed -maxfalsealarm to -maxFalseAlarmRate still not working!

2016-03-03 23:31:20 -0600 asked a question Opencv haar training parameters : Mode & symmentry

I am using Opencv 3.0 Before beginning training i wanted to set 'mode' parameter to 'all' below is the command line argument

C:\OpenCV\build\x64\vc12\bin\opencv_traincascade.exe -data cascade -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHitRate 0.995 -maxfalsealarm 0.5 -w 36 -h 28 -mode ALL

even though i am explicitly specifying mode parameter it still uses default value (BASIC), as u can see below

D:\>C:\OpenCV\build\x64\vc12\bin\opencv_traincascade.exe -data cascade -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHi
tRate 0.995 -maxfalsealarm 0.5 -w 36 -h 28 -mode All
PARAMETERS:
cascadeDirName: cascade
vecFileName: samples.vec
bgFileName: NegativeSet.txt
numPos: 333
numNeg: 922
numStages: 20
precalcValBufSize[Mb] : 3750
precalcIdxBufSize[Mb] : 3750
stageType: BOOST
featureType: HAAR
sampleWidth: 36
sampleHeight: 28
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: BASIC

my second question is, How to use -nonsym ? if i append -nonsym at the end or anywhere between command line argument, training crashes once i pass the arguments (as soon as i hit enter in cmd) it says "opencv_traincascade.exe has stopped working"

below is the cmd line argument including -nonsym

C:\OpenCV\build\x64\vc12\bin\opencv_traincascade.exe -data cascade -numStages 20 -vec samples.vec -bg NegativeSet.txt -precalcValBufSize 3750 -precalcIdxBufSize 3750 -numPos 333 -numNeg 922 -minHitRate 0.995 -maxfalsealarm 0.5 -w 36 -h 28 -mode ALL -nonsym

Thanks & regards

2015-12-31 22:48:52 -0600 received badge  Enthusiast
2015-12-30 10:29:21 -0600 commented question Opencv's image.empty() function not working

Thanks for your suggestion. but it didn't work.. tried grab & retrieve as well. its still the same

2015-12-30 00:38:34 -0600 asked a question Opencv's image.empty() function not working

Below code works fine, until

 VideoCapture cap_cam1(0);
 Mat img_cam1;

while(true)
{
            cap_cam1 >> img_cam1;

            if (img_cam1.empty() || !cap_cam1.isOpened())
            {                               
                cap_cam1.release();  
                 break;                 
            }

            else {        
                 imshow("Live",img_cam1); 
                if (!img_cam1.isContinuous())
                   break;
                 img_cam1.empty();              
                 img_cam1.release();

                 if(waitKey(33)==27) break; 
            }
    }

USB camera is removed while program is running. After disconnecting USB camera i see a blank image, but program should stop because img_cam1.empty() is true and !cap_cam1.isOpened() is also true. for some reasons both are false! why is it? how to stop the program when USB camera is removed?

2015-12-18 00:02:25 -0600 asked a question videwriter not working after image resize

i am using opencv 3 & visual studio. issue here is that i am unable to save video for any particular resolution other than default full camera resolution there is no error, only thing is video file doesn't grow. it stays at 5.54kb. here is my code

#include"opencv2\opencv.hpp"
using namespace cv;
using namespace std;

VideoCapture cap_cam1(0);

double Width = cap_cam1.get(CV_CAP_PROP_FRAME_WIDTH);
double Height = cap_cam1.get(CV_CAP_PROP_FRAME_HEIGHT); 
cv::Size frameSize(static_cast<int>(Width), static_cast<int>(Height));
string videoFileName = "D://current.avi";
VideoWriter cam1_write(videoFileName, CV_FOURCC('D', 'I', 'V', '3'), 10.0, frameSize, true);
Mat image;
int main()
{
    while (true)
    {
        cap_cam1 >> image;
        resize(image, image, Size(320, 240));
        imshow("image", image);
        cam1_write.write(image);
        if (waitKey(33) == 27)break;
    }

}

if i comment remove resize function, then file size grows and frames are added i also tried adding below lines after videowriter definition

cap_cam1.set(CV_CAP_PROP_FRAME_WIDTH, 240);
cap_cam1.set(CAP_PROP_FRAME_HEIGHT,320);

also tried changing resolution at videowriter definition, after everything file size remains at 5.54kb.

how to record video at custom resolution? Thanks

2015-08-19 02:50:30 -0600 received badge  Supporter (source)