Ask Your Question

ClementD's profile - activity

2019-09-19 06:31:59 -0500 received badge  Popular Question (source)
2018-12-14 14:04:46 -0500 received badge  Popular Question (source)
2018-09-06 12:15:55 -0500 received badge  Student (source)
2017-01-24 02:00:58 -0500 commented answer Writing video fail with no error

Do you have a working example on your pc?

2017-01-24 02:00:30 -0500 commented answer Writing video fail with no error

Haha no problems. Thanks you.

2017-01-24 01:56:20 -0500 commented answer Writing video fail with no error

Ok , i'll try tonight. Do you know where i can find all codec? or the most common codec? Moreover, is there a way to see VideoWriter status? because i don't have any error.

2017-01-24 01:50:35 -0500 commented answer Writing video fail with no error

Hi, I switched it and it's still not working. I don't know why but the file was openned. It does create a file "outi.avi" but the file is empty (like 6Ko). Do you know if the probleme could comme from the file ffmpeg.dll? do i have to rename it ?or put it somewhere? maybe include it in my ".pro" file?

2017-01-23 12:32:52 -0500 asked a question Writing video fail with no error

Hello I am using QT and OpenCV 3.1.0 on a Win7 PC.

I am trying to record my camera and i don't know why but the file is always empty. i tired using other codec but it's always fails. any idea?

int main(int argc, char *argv[])

{

cv::VideoCapture cap(0);
cv::VideoWriter rec;
bool first = true;
for(;;)
{
    cv::Mat frame;

    cap >> frame;
    if (first)
    {
        qDebug()<< "init";
        rec.open("C:/Project/outi.avi", CV_FOURCC('X','V','I','D'), 24, cv::Size(frame.size().height,frame.size().width));
        if (!rec.isOpened())
        {
            qDebug()<< "open record fail";
            return 0;
        }
        first = false;
    }
    rec << frame;
    cv::imshow("test", frame);
    if (cv::waitKey(30) == 'q')
    {
        break;
    }
}
return 0;

}

2016-07-13 05:39:16 -0500 received badge  Organizer (source)
2016-07-13 04:59:11 -0500 asked a question [Solved] Open h264 RTSP Camera OpenCV 3.1.0

Hello ,

i wrote a little programme to open a camera with openCV and it always fails.

The error message is :

[rtsp @ 00000000003f7fc0] method SETUP failed: 461 Unsuported transport warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:578)

I have already been looking for solutions on furoms like : http://code.opencv.org/issues/2235 the modifications into the "cap_ffmpeg_impl.hpp" are already included in 3.1.0 and it's still fail openning the stream.

I do want to know if there is an existing solution for this problem.

Thanking you in advance,

Clément

Solution :

I finally solved the probleme using this example The solution uses libVlc to decode Frames and, by changing callbacks, creating cv::Mat.

I can give you my code if someone doesn't understand the example.

2016-04-07 07:37:17 -0500 commented answer Label Contours

Thanks! it's done.

2016-04-07 07:36:46 -0500 received badge  Scholar (source)
2016-04-07 06:42:18 -0500 received badge  Supporter (source)
2016-04-07 06:41:59 -0500 commented answer Label Contours

@StevenPuttmans Hello , how can i accept it?

2016-04-06 07:08:46 -0500 commented answer Label Contours

Oh ok Thanks you a lot. your helped me very fastly. My probleme is solved.

2016-04-06 06:58:48 -0500 commented answer Label Contours

Yes i change my point of view. how can i draw inside contours?

i tried this but it failed:

cv::polylines(img, contours.at(i), true, cv::Scalar(255,255,255), CV_FILLED);

I found it:

cv::fillConvexPoly  (img, contours.at(i), cv::Scalar(255, 0, 0));
2016-04-06 05:44:44 -0500 commented answer Label Contours

If i use inRange (img, 1, 2, imageOut), i want to know where are the 1 and where are the 2

2016-04-06 04:50:04 -0500 commented answer Label Contours

Thanks you , i will use inRange(img , myValue, myValue, binaryImage) then get my new contour with find contours. Is there a way to know how many differents values i had in my range?

2016-04-06 04:26:25 -0500 asked a question Label Contours

Hello,

I post this message because in need help with a project.

I have a binary image that containt object i want to detect ( obtained with a backgroundSubtractor)

Once detected,I want to give each object a label on an other image (the label Image). Then on the next image ( because i use a video ), I want to know which object has already been labeled using the last label image.

I use "findContours" to get all contours;

my Question is : Is there any method or function that could help me to get all pixels of with a given value (for example 3 )? I would like a function like "cv::findNonZero " but more specified like "findNumberPixel".

By waiting you answer i start to try create my own tools.

Thanking you in advance

Solution : (Thanks to LBerger ) Using InRange with all my values allows me to detect the label i want DrawContour with filled option allows me to draw my labels

2016-04-05 03:05:28 -0500 asked a question Deployment With Qt / OpenCV Dll

Hello,

I post this message because in need help with deployment.

I have done a program on Qt 5.5.1 using OpenCV 3.1.0. My problem is that when i want to procceed to the deployment with "windeployqt.exe ", windeploy add the Qt's ".dll" files but not the opencv ".dll"files. I would know if it is possible to do that automatically with Qt.

If not, i will create my own batch file that call windeployqt.exe , locate openCV files and add them . Godd idea?

Thanking you in advance for your help.

2016-03-04 02:26:44 -0500 received badge  Enthusiast
2016-02-29 07:03:22 -0500 commented question [Solved] Background MOG Substractor unreferenced - OpenCV 3.1.0

Thanks you berak . Then i have new question, How can i add this to my current project? just copy the .cpp and . hpp i need into my current opencv? or do i have to rebuild opencv? or just add in my .pro file a way to the include folder of the opencv_Contrib

2016-02-29 05:59:48 -0500 commented question [Solved] Background MOG Substractor unreferenced - OpenCV 3.1.0

I write my own code, i can use the MOG2 but i can't find the simple MOG background substractor

2016-02-29 05:01:05 -0500 asked a question [Solved] Background MOG Substractor unreferenced - OpenCV 3.1.0

Hi ,

I am here because i do not come up to use a MOG background substractor with OpendCV 3.1.0

I don't know if it is an include probleme or anything else.

I followed this official tutorial :http://docs.opencv.org/3.1.0/d1/dc5/tutorial_background_subtraction.html#gsc.tab=0

But when i try to create a MOG background substractor like this:

Ptr<BackgroundSubtractor> pMOG; //MOG Background subtractor
Ptr<BackgroundSubtractor> pMOG2; //MOG2 Background subtractor
...
//create Background Subtractor objects
pMOG = createBackgroundSubtractorMOG(); //MOG approach
pMOG2 = createBackgroundSubtractorMOG2(); //MOG2 approach

i get the error: cv has no member named "createBackgroundSubtractorMOG"

Can someone help me?

Edit: I write my own code, i can use the MOG2 but i can't find the simple MOG background substractor.

Solution: Thanks to berak: MOG was moved to opencv_contrib

Importing Contrib to OpenCV: Thanks to the Readme.md in github, i saw that the best way to improt contrib is to rebuild openCV using special option on CMake.

As a temporrary solution i copied the files in an external folder and i included them in my project.

As berak pointed out, the background substractor is in a new namespace, cv::bgsegm::createBackgroundSubtractorMOG(..)

2016-02-06 12:57:23 -0500 commented question How can i use openCV on Qt windows [ solved ]

But in the lib folder there is only "opencv_ts300" and "opencv_world" . is these two lib allow me to use all opencv?

2016-02-06 12:41:54 -0500 commented question How can i use openCV on Qt windows [ solved ]

So i have to build the lib?

2016-02-06 11:49:56 -0500 commented question How can i use openCV on Qt windows [ solved ]

Can't you read the number of the error? want me to traduct it?

2016-02-06 11:40:06 -0500 commented question How can i use openCV on Qt windows [ solved ]

Done . i put the begning becaus it could be too long

2016-02-06 11:38:59 -0500 received badge  Editor (source)
2016-02-06 11:16:12 -0500 asked a question How can i use openCV on Qt windows [ solved ]

Hi ,

Here is my configuration

Qt 5.5.1 Visual studion 2013 OpenCV 3.0.0

My problem is that i can't use opencv on my PC and i don't know how to solve my problem

Here is my .pro file:

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Dev_OpenCV
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui

INCLUDEPATH += E:\\Logiciels\\OpenCV\\opencv\\build\\include

LIBS += -LE:\\Logiciels\\OpenCV\opencv\\build\\x64\\vc12\\staticlib \
    -lopencv_calib3d300d \
    -lopencv_core300d \
    -lopencv_features2d300d \
    -lopencv_flann300d \
    -lopencv_hal300d \
    -lopencv_highgui300d \
    -lopencv_imgcodecs300d \
    -lopencv_imgproc300d \
    -lopencv_ml300d \
    -lopencv_objdetect300d \
    -lopencv_photo300d \
    -lopencv_shape300d \
    -lopencv_stitching300d \
    -lopencv_superres300d \
    -lopencv_ts300d \
    -lopencv_video300d \
    -lopencv_videoio300d \
    -lopencv_videostab300d

The probleme is when i try to use an OpenCV object, there are many errors and i don't know why . Here is i screenshot of the probleme. Can someone help me?

image description

Here the begining of the output in txt . (just the begining because there is too many errors )

opencv_core300d.lib(alloc.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(matrix.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(opencv_core_pch.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(stl.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(system.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(umatrix.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(copy.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(convert.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(matop.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(stat.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(kmeans.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(array.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(datastructs.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(cuda_gpu_mat.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(cuda_host_mem.obj) : error LNK2038: discordance détectée pour 'RuntimeLibrary' : la valeur 'MTd_StaticDebug' ne correspond pas à la valeur 'MDd_DynamicDebug' in main.obj
opencv_core300d.lib(cuda_stream.obj) : error LNK2038 ...
(more)