Ask Your Question

arvids.p's profile - activity

2019-01-25 06:55:42 -0500 answered a question BackgroundSubtractor is not a member of 'cv' on VS17 C++

The solution was just moving #include "stdafx.h" to the top of the file.

2019-01-18 08:33:50 -0500 commented question BackgroundSubtractor is not a member of 'cv' on VS17 C++

Thank you for the help!

2019-01-18 08:13:42 -0500 commented question BackgroundSubtractor is not a member of 'cv' on VS17 C++

Removing stdafx created an other error. However, moving it to the top of the file seems to have fixed the error!

2019-01-18 07:59:02 -0500 commented question BackgroundSubtractor is not a member of 'cv' on VS17 C++

Could it be because of some unnecessary headers?

2019-01-18 07:44:12 -0500 commented question BackgroundSubtractor is not a member of 'cv' on VS17 C++

opencv3.4.1 It worked well without the bgs. I used cv::absdiff before.

2019-01-18 07:33:20 -0500 asked a question BackgroundSubtractor is not a member of 'cv' on VS17 C++

BackgroundSubtractor is not a member of 'cv' on VS17 C++ I'm building a background subtractor on Visual Studio 17. I've

2018-08-28 07:06:02 -0500 received badge  Notable Question (source)
2018-03-08 19:57:05 -0500 received badge  Popular Question (source)
2017-09-01 00:14:19 -0500 commented question cant add tracking modules to opencv solution

Well i have this problem: Module opencv_tracking disabled because opencv_dnn dependency can't be resolved!

2017-08-31 09:13:17 -0500 commented question cant add tracking modules to opencv solution

There is no such option in OpenCV 3.2. Is there an other workaround?

2017-08-31 08:35:23 -0500 commented question Module opencv_tracking disabled because opencv_dnn dependency can't be resolved!

Any other ways to solve this issue? I need to get OpenCV 3.2 tracking working.

2017-08-31 08:35:04 -0500 answered a question Module opencv_tracking disabled because opencv_dnn dependency can't be resolved!

Any other ways to solve this issue? I need to get OpenCV 3.2 tracking working.

2017-08-31 02:38:19 -0500 commented question OpenCV 3.2 with extra modules on Jetson TX2

Latest version is not an option, because it has changed behaviour on Jetson TX2 and code that works on TX1 now throws a

2017-08-31 02:21:27 -0500 received badge  Organizer (source)
2017-08-31 02:19:30 -0500 asked a question OpenCV 3.2 with extra modules on Jetson TX2

OpenCV 3.2 with extra modules on Jetson TX2 Has anyone successfully installed OpenCV 3.2.0 with extra modules (opencv_co

2017-01-31 04:55:03 -0500 received badge  Enthusiast
2017-01-30 02:03:49 -0500 received badge  Supporter (source)
2017-01-30 02:01:07 -0500 commented question Recognizing an untaught object (image recognition)

What precision can you reach with this method?

2017-01-29 02:22:04 -0500 commented question Recognizing an untaught object (image recognition)

Thank you for the response! Have you tried anything like this? Should i try to teach a class with some random objects that shouldn't be there or just use low confidence for other classes as the trigger?

2017-01-27 09:13:20 -0500 received badge  Editor (source)
2017-01-27 05:36:29 -0500 asked a question Recognizing an untaught object (image recognition)

I am working with image recognition and classification. My current task is to detect an object that is not in any of the trained classes in order to catch objects that shouldn't be there (view img. 1 where the camera would look at the objects one by one). My current idea is to raise an alarm if none of the trained classes have a high confidence, but this seems like a bad idea. Has anyone dealt with a task like this? Or maybe just share some thoughts on it?

image description image 1

2016-12-31 15:26:15 -0500 received badge  Student (source)
2016-12-30 03:03:08 -0500 answered a question How to fix opencv H264 decoding error

From what i know FFMPEG player has trouble decoding h264 (High) streams. Consider switching to libVlc or using a FFMPEG player compiled elsewhere with libx264 or find a way to decode h264 (High) to h264 (Main). Need any extra info?

2016-12-28 02:40:03 -0500 asked a question Decoding a h264 (High) stream with OpenCV's ffmpeg on Ubuntu

I am working with a video stream (no audio) from an ip camera on Ubuntu 14.04. Also i am a beginner with Ubuntu and everything on it. Everything was going great with a camera that has these parameters (from FFMPEG):

Input #0, rtsp, from 'rtsp://*private*:8900/live.sdp': 0B f=0/0   
  Metadata:
    title           : RTSP server
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 352x192, 29.97 tbr, 90k tbn, 180k tbc

But then i changed to a newer camera, which has these parameters:

Input #0, rtsp, from 'rtsp://*private*/media/video2':0B f=0/0   
  Metadata:
    title           : VCP IPC Realtime stream
    Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc

My C++ program uses OpenCV3 to process the stream. By default OpenCV uses ffmpeg to decode and display the stream with function VideoCapture.

VideoCapture vc;
vc.open(input_stream);
while ((vc >> frame), !frame.empty()) {
   *do work*
}

With the new camera stream i get errors like these (from ffmpeg):

[h264 @ 0x7c6980] cabac decode of qscale diff failed at 41 38
[h264 @ 0x7c6980] error while decoding MB 41 38, bytestream (3572)
[h264 @ 0x7c6980] left block unavailable for requested intra mode at 0 44
[h264 @ 0x7c6980] error while decoding MB 0 44, bytestream (4933)
[h264 @ 0x7bc2c0] SEI type 25 truncated at 208
[h264 @ 0x7bfaa0] SEI type 25 truncated at 206
[h264 @ 0x7c6980] left block unavailable for requested intra mode at 0 18
[h264 @ 0x7c6980] error while decoding MB 0 18, bytestream (14717)

The image sometimes is glitched, sometimes completely frozen. After a few seconds to a few minutes the stream freezes completely without an error. I tried appending ?tcp to the input stream, but the video still froze without an error after ~10 seconds. However on vlc it plays perfectly. I installed the newest version (3.2.2) of ffmpeg player with

./configure --enable-gpl --enable-libx264

Now playing directly with ffplay (instead of launching from source code with OpenCV function VideoCapture), the stream plays better, doesn't freeze, but sometimes still displays warnings:

[NULL @ 0x7f834c008c00] SEI type 25 size 896 truncated at 320=1/1   
[h264 @ 0x7f834c0d5d20] SEI type 25 size 896 truncated at 319=1/1   
[rtsp @ 0x7f834c0008c0] max delay reached. need to consume packet   
[rtsp @ 0x7f834c0008c0] RTP: missed 1 packets
[h264 @ 0x7f834c094740] concealing 675 DC, 675 AC, 675 MV errors in P frame
[NULL @ 0x7f834c008c00] SEI type 25 size 896 truncated at 320=1/1

Changing the camera hardware is not an option. The camera can be set to encode to h265 or mjpeg. When encoding to mjpeg it can output 5 fps, which is not enough. Decoding to a static video is not an option either, because i need to display real time results about the stream. Maybe i should switch to some other decoder and player? From my research i conclude that i have these options:

  • Somehow get OpenCV to use the ffmpeg player from another directory, where it is compiled with libx264

  • Somehow get OpenCV to use ...

(more)