Ask Your Question

skr_robo's profile - activity

2020-04-11 17:41:50 -0600 received badge  Popular Question (source)
2019-01-11 15:05:39 -0600 asked a question Using Harris Corner Detector on video

Using Harris Corner Detector on video I am trying to use Harris Corner Detector on video based on the example given here

2018-12-28 10:44:05 -0600 received badge  Famous Question (source)
2018-09-28 16:48:53 -0600 received badge  Notable Question (source)
2018-08-18 01:47:57 -0600 received badge  Popular Question (source)
2018-08-14 17:12:41 -0600 commented answer OpenCV - Streaming H264 over RTSP using FFMPEG in version 3.4

@whdt No. sorry.

2018-06-27 10:22:02 -0600 asked a question API/ Library for re-orienting 360 degree camera frame efficiently

API/ Library for re-orienting 360 degree camera frame efficiently I am trying to correct the orientation of a 360 degree

2018-03-26 11:18:23 -0600 commented answer How to include and link Pylon library with OpenCV project

@Igor I had already solved it earlier and now I don't have a way of checking the solution. Sorry.

2018-03-16 14:43:37 -0600 edited question OpenCV - Streaming H264 over RTSP using FFMPEG in version 3.4

OpenCV - Streaming H264 over RTSP using FFMPEG in version 3.4 I am trying to capture an RTSP stream from a VIRB 360 came

2018-03-16 14:43:25 -0600 edited question OpenCV - Streaming H264 over RTSP using FFMPEG in version 3.4

OpenCV - Streaming H264 over RTSP using FFMPEG in version 3.4 I am trying to capture an RTSP stream from a VIRB 360 came

2018-03-16 10:33:51 -0600 commented answer OpenCV - Streaming H264 over RTSP using FFMPEG in version 3.4

I tried cv::CAP_GSTREAMER option as well. It doesn't display anything.

2018-03-16 08:50:54 -0600 asked a question OpenCV - Streaming H264 over RTSP using FFMPEG in version 3.4

OpenCV - Streaming H264 over RTSP using FFMPEG in version 3.4 I am trying to capture an RTSP stream from a VIRB 360 came

2018-03-15 09:52:34 -0600 commented answer how to stream h264 video with rtsp in opencv- partially answered

@manfeyn Do you mean Opencv 3.4 can capture h264 videos over rtsp streams?

2017-11-03 12:05:46 -0600 received badge  Notable Question (source)
2017-11-03 12:05:46 -0600 received badge  Popular Question (source)
2017-10-03 15:37:27 -0600 commented question How to include and link Pylon library with OpenCV project

I have to wait a day to add the answer, according to OpenCV forum rules. Anyways, thank you for the help.

2017-10-03 15:34:15 -0600 commented question How to include and link Pylon library with OpenCV project

I did see that file and I thought it was only necessary if I was trying to add the library using find_package().

2017-10-03 15:33:09 -0600 commented question How to include and link Pylon library with OpenCV project

How to check whether it is in compilation or linking? Anyways, I have figured what is wrong and I am adding it as an a

2017-10-03 14:39:21 -0600 commented question How to include and link Pylon library with OpenCV project

That did not fix the issue. This time cmake . gave a warning that it was dropping the third argument of target_link_libr

2017-10-03 14:22:23 -0600 commented question How to include and link Pylon library with OpenCV project

I added it here because I felt someone might have tried accessing Basler camera via OpenCV and may have figured out how

2017-10-03 14:21:37 -0600 commented question How to include and link Pylon library with OpenCV project

I added it here because I felt someone might have tried accessing Basler camera via OpenCV and may have figured out how

2017-10-03 14:20:01 -0600 edited question How to include and link Pylon library with OpenCV project

How to include and link Pylon library with OpenCV project I am trying to access images from a Basler camera interfaced w

2017-10-03 14:09:09 -0600 edited question How to include and link Pylon library with OpenCV project

How to include and link Pylon library with OpenCV project I am trying to access images from a Basler camera interfaced w

2017-10-03 14:07:47 -0600 edited question How to include and link Pylon library with OpenCV project

How to include and link Pylon library with OpenCV project I am trying to access images from a Basler camera interfaced w

2017-10-03 14:07:11 -0600 edited question How to include and link Pylon library with OpenCV project

How to include and link Pylon library with OpenCV project I am trying to access images from a Basler camera interfaced w

2017-10-03 14:05:22 -0600 edited question How to include and link Pylon library with OpenCV project

How to include and link Pylon library with OpenCV project I am trying to access images from a Basler camera interfaced w

2017-10-03 14:01:23 -0600 asked a question How to include and link Pylon library with OpenCV project

How to include and link Pylon library with OpenCV project I am trying to access images from a Basler camera interfaced w

2017-08-25 10:33:22 -0600 commented answer Fixing the color format of the video feed

I tried the same code on my laptop and the webcam. The output of std::cout << cap.get(CV_CAP_PROP_FORMAT); was same: 16. But the images were fine.

2017-08-25 08:18:39 -0600 commented answer Fixing the color format of the video feed

I don't have documentation for this camera and the model is unknown, which is the stem of all problems. I printed format using std::cout << cap.get(CV_CAP_PROP_FORMAT);. It returned 16. I am trying to figure out what that means.

2017-08-24 13:50:39 -0600 commented question Fixing the color format of the video feed

I tried YUV2BGR as well. No change in the results.

2017-08-23 15:03:39 -0600 received badge  Editor (source)
2017-08-23 14:50:30 -0600 asked a question Fixing the color format of the video feed

I am using the following code to access video feed from a camera (lsusb command in Jetson TX1 terminal lists the camera as Pixart Imaging, Inc.).

Code:

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

int main()
{
        cv::VideoCapture cap(1);
        if(!cap.isOpened())
        {       
                std::cout << "Input error\n";
                return -1;
        }

        cv::namedWindow("Video Feed", cv::WINDOW_AUTOSIZE);

        for(;;)
        {
                cv::Mat frame;
                cap >> frame;
                std::cout << "Type: " << frame.type() << "\n";
                //cv::cvtColor(frame, frame, CV_YUV2RGB);
                //cv::resize(frame, frame, cv::Size2i(256, 144));
                cv::imshow("Video Feed", frame);        
                if (cv::waitKey(10) == 27)
                {
                        break;
                }
        }       
        cv::destroyAllWindows();
        return 0;
}

The screeenshots of the video feed can be seen below: image description

image description

I am trying to identify the color format of the camera and convert it to RGB. I have tried different color formats, but I focused mainly on YUV to RGB conversion as shown below (this line is commented out in the above code): cv::cvtColor(frame, frame, CV_YUV2RGB);

I have also tried different variants of YUV as listed here. However, I haven't received any result close to a normal RGB image.

I am also getting the following message on the terminal:

Corrupt JPEG data: 1 extraneous bytes before marker 0xd9

1) Is this just a defective camera?

2) Are there any tests/ approaches to identify and rectify the problem?

Edit based on comments:

I have tried YUV2BGR as well, but the results are same. Is there a way to figure out output format of the camera if the model is unknown?

2017-08-23 10:54:48 -0600 received badge  Student (source)
2017-08-23 10:30:38 -0600 asked a question Relating flags and numbers for functions like imread or namedWindow.

I saw an example for the usage of namedWindow as shown below:

namedWindow("edges", 1)

I believe that the number 1 is related to a flag such as WINDOW_AUTOSIZE. However, I am not able to find any clear documentation which says what number relates to what flag. In the case of imread, the documentation states:

>0 Return a 3-channel color image.

=0 Return a grayscale image.

<0 Return the loaded image as is (with alpha channel)

For namedWindow, I found that this link has a section called Enumerations which had the following content:

enum    cv::WindowFlags { 
  cv::WINDOW_NORMAL = 0x00000000, 
  cv::WINDOW_AUTOSIZE = 0x00000001, 
  cv::WINDOW_OPENGL = 0x00001000, 
  cv::WINDOW_FULLSCREEN = 1, 
  cv::WINDOW_FREERATIO = 0x00000100, 
  cv::WINDOW_KEEPRATIO = 0x00000000, 
  cv::WINDOW_GUI_EXPANDED =0x00000000, 
  cv::WINDOW_GUI_NORMAL = 0x00000010 
}
    Flags for cv::namedWindow.

However, I am not sure if this is what I am looking for because some of the values on RHS are not unique. So, how do we differentiate between them (for example cv::WINDOW_NORMAL and cv::WINDOW_KEEPRATIO)? Is there any other place where I can this information for namedWindow and other functions?

2016-11-21 19:08:18 -0600 answered a question Hough Transform after removal of color

I used the solution available here and it works fine.

2016-11-18 14:28:13 -0600 asked a question Hough Transform after removal of color

I have a hough transform object detection code which detects the target objects. But a few lines are detected from the green background (trees). I wish to eliminate all the green background. I tried a code based on this and it worked fine. But the problem is that the resulting image is black and white. I want the green part to go black, but I want the rest to remain as the original image.

I also tried the second solution from this, with the image given there. The problem was whenever I accessed the result image and displayed it with imshow, it would display like the original.

So, are there any better solutions? Is there a way that I can see all pixels that fall in an hsv range, using inRange and then, instead of turning the whole image black and white, just turn those pixels in the range to black?

2016-11-05 15:47:50 -0600 received badge  Enthusiast
2016-11-04 15:30:49 -0600 marked best answer C++ - Difference between Vec definitions

What is the difference between the definitions:

1) vector<Vec4i> lines and

2) Vec4i l

I found both these in the same code here. I am wondering if there is any difference between the both? If not why use the first format which is longer?