-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port to OpenCV 4.6.0 #38
Conversation
For some reason, on Linux, setting the frame rate results in the camera being disabled.
Ah great someone is trying to update this. I just successfully built your branch on ubuntu 22.04. Unfortunately it's still not working for me:
Also, looks like no matter which camera I select, it tries to open /dev/video1.. both webcams connected are working fine in chrome |
Thank you for testing! You can try P.S.: Did you install before running? If I don't, I get
|
|
||
#if defined(linux) | ||
// FIXME(silhusk): reimplement for `frame` instead of `pImage` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this conversion still needed? Doesn't ocv take care itself? We don't get any such information form a cv::Mat, we would have to check camera properties in advance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. This was for an old camera model, perhaps is safe to delete it.
(pImg->nChannels== 3 && | ||
((pImg->channelSeq[0]== 'R' && pImg->channelSeq[1]== 'G' && pImg->channelSeq[2]== 'B') || | ||
(pImg->channelSeq[0]== 'B' && pImg->channelSeq[1]== 'G' && pImg->channelSeq[2]== 'R')), | ||
wxASSERT_MSG ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any information about the format here. Does the assertion make any sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so.
} | ||
|
||
bool CCameraWDM::DoQueryFrame(CIplImage& image) | ||
bool CCameraWDM::DoQueryFrame(cv::Mat &frame) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are native drivers still relevant or can they be dropped entirely? The driver selection seems to be hard-coded to opencv.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure
I have compiled the silhusk feat/openc4-460 and tested it. |
Does this happen only on this branch and not in master? The device list is populated by enumerating the "native driver" but then the same index is used with the opencv driver. This could lead to inconsistencies. But this mode of device discovery shouldn't have changed between the two branches. If you can confirm that it happens in master maybe that's the cause and we can fix it there. |
I had to modify the file viacamcontroller.cpp, line 252 from
to
The value 1 mean CAMERA_CV_ID and not NATIVE_CAM_CLASS as used in order to get the devices list. |
The native enumeration tell the following:
The list presented within the chooser is:
This order is strange and it will probably possible to eliminate the entries which don't have controls. |
No description provided.