withrobot / ocam Goto Github PK
View Code? Open in Web Editor NEWoCam - USB 3.0 Board Camera
License: GNU General Public License v3.0
oCam - USB 3.0 Board Camera
License: GNU General Public License v3.0
I'd like to implement frame capture via the trigger pin provided on the oCam-1CGN-U.
It appears that all that is needed is write access to the registers of the sensor.
Does your API implement such functionality?
If not, could it be possible to implement?
It would be so useful!
Have a look at how the Arducam is doing it, since they have a shield with the same sensor (AR0134)
ArduCAM/ArduCAM_USB_Camera_Shield#15
It appears to show that if I can setup the camera with specific values on its registers it will begin capturing depending on the state of the trigger pin.
I purchased the oCam instead as it allows data transfer through USB3, Arducam only has USB2.0
[Transferring from Odroid Forum]
I am trying to update the oCam with the latest firmware.
As mentioned in the GitHub page, I erased the firmware in the oCam. After which WestBridge got listed in the device manager. After that I tried installing the WestBridge device using drv_1.2.3.10 directory. I am getting the following error message:
Cypress FX3 USB BootLoader Device is getting listed but with the warning sign.
After this, when I open the firmware updator, Write FW option is not enabled. I tried this on two of my Windows 10 [x86] PC with no results.
I even tried uninstalling the device driver of Cypress FX3 USB BootLoader Device and reinstalling the WestBridge device driver, but nothing worked.
cluelin@ubuntu:~/catkin_ws$ catkin_make
Base path: /home/cluelin/catkin_ws
Source space: /home/cluelin/catkin_ws/src
Build space: /home/cluelin/catkin_ws/build
Devel space: /home/cluelin/catkin_ws/devel
Install space: /home/cluelin/catkin_ws/install
[ 20%] Generating dynamic reconfigure files from cfg/cam.cfg: /home/cluelin/catkin_ws/devel/include/ocams/camConfig.h /home/cluelin/catkin_ws/devel/lib/python2.7/dist-packages/ocams/cfg/camConfig.py
../catkin_generated/env_cached.sh: 16: exec: /home/cluelin/catkin_ws/src/ocams/cfg/cam.cfg: Permission denied
ocams/CMakeFiles/ocams_gencfg.dir/build.make:63: recipe for target '/home/cluelin/catkin_ws/devel/include/ocams/camConfig.h' failed
make[2]: *** [/home/cluelin/catkin_ws/devel/include/ocams/camConfig.h] Error 126
CMakeFiles/Makefile2:451: recipe for target 'ocams/CMakeFiles/ocams_gencfg.dir/all' failed
make[1]: *** [ocams/CMakeFiles/ocams_gencfg.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1 -l1" failed
These error appeared after using 'catkin_make'.
The latest firmware release for oCam-1MGN-U (oCam-1MGN-U_R1808) doesn't allow for an fps higher than 30 for the image formats of 1280x960 and 1280x720. However the firmware release before that (oCam-1MGN-U_R1803) does.
The latest release has a release note of performance stabilization. Does running the camera with the old firmware at those frame rates cause issues?
Hello,
When testing the oCam-1MGN-U: Global Shutter Camera, I have image flickering making the camera unusable. How do I get rid of this flickering? It seems like an autogain is running on the device but it is unstable. Is there a way to turn of autogain if it exists?
Thank you for your help!
Initially I had an issue with my camera (1MGN), that occured within the last few week. Last week I could stream frames in both VLC and in Python using OpenCV. Today, the camera only returns black frames in OpenCV and in VLC I get an error something like "Camera not providing correct parameters" (translated from Danish).
However, I decided to try and update the firmware. The deletion and Win10 driver installation went succesfully, and the "181112_UpdateFW" tool also provides a "Successful" message when running the write sequence. Regardless of this, the device never appears under camera upon reconnection, the Cypress FX3 bootloader just continues to show up.
I have tried several times, with many different firmware versions, on two different win10 machines and a
win7 machine - all without success
I am clueless as how to proceed - can you guide me on further troubleshooting ?
Hi,
I am using the oCam-1MGN-U camera and a problem came up after updating the wrong firmware on the camera. The camera is recognized as a different one and does not display any image. The firmware I used is : oCamS-1CGN-U_R1705_170523.img . Now, on windows, in device manager, it's shows a camera named : oCamS-1CGN-U (which is different of oCam-1MGN-U). We followed the instructions once again to update the firmware with the correct file but "UpdateFW" doesn't let us "Erase FW". When we press on "Erase FW" we get the following error : Please reinsert Camera.
Therefore I was wondering if there was another possible procedure to erase the firmware on the camera in order to install the correct one.
Any update or help would be appreciated.
Thanks
Is it possible to add MJPEG on USB2 mode?
MJPEG on USB should enable 720p/30fps
1280x720에서 5프레임으로 돌리고 싶은데 가능한가요?
python + opencv에서 그렇게 셋을 하고 돌려도
5프레임으로 안나오는거 같아서요
확인부탁드리겠습니다
감사합니다^^
cam = cv2.VideoCapture(0)
cam.set(3,1280) #CV_CAP_PROP_FRAME_WIDTH
cam.set(4,720) #CV_CAP_PROP_FRAME_HEIGHT
cam.set(5,1) #CV_CAP_PROP_FPS
Hello,
I have 2 questions:
Is it possible to trigger the oCam-1MGN-U global shutter camera externally? I mean real wired external trigger via a dedicated pin on the camera. I see that on the back the camera has 3 pins exposed (besides the USB connector) but I could not find any documentation for the PINs. In case HW trigger is not possible - what about a software "trigger" via USB by changing some camera registers (Point Grey cameras can do sw trigger)? The sw-trigger is usually not so accurate (fast) as HW trigger but may actually be enough for part of the applications.
Given the external trigger would be possible can the sensor do auto-exposure with external trigger? This feature is not really standard one but there are cameras that can do it (example: Point Grey Chameleon 3 series). I got 2 Point Grey Firefly MV USB 2.0 cameras at $300 each and later have found out that this particular camera can not do auto-exposure with ext. HW trigger, even though the sensor is capable of it (I guess they did not include the feature to the camera's firmware).
Reason for my questions - I need to setup a stereo camera where 2 cameras will be synchronized and will each run on its own auto-exposure mode. The camera will be used in environment with dynamic ligting (passenger car) so I can not use fixed manual exposure. I tried to implement my own autoexposure mode for the Firefly MV but was not really successful (it surely is possible but out of my capabilities).
Btw. I also could not find a general manual for the camera - is there one?
Thanks for your answers in advance!
How to have automatic exposure control in Linux for oCam-1CGN-U?
Dear,
Isn't it possible to increase the framerate of the oCam-5CRO-U using grayscale instead of colors ?
Is there a gstreamer element to debayer the native GRGB format, so I can use it with gstreamer?
Hi!
I have recently purchased the 1CGN-U camera, and I'm having some issues.
I want to use this camera with ROS, but it's giving me a ton of trouble. I can't seem to find a good ROS driver. The
cv_camera
doesn't support the oCam because opencv can't open ituvc_camera
throws a segfault when you start it uplibuvc_camera
isn't working - may be my fault, but the the documentation and support for that node is horrificI tried modifying your examples to support ROS, and had some success, but I got this weird image, where there is an obvious checker pattern in the image. I suspect that I did it wrong.
Any way someone there could write a simple ROS node for the monocular camera? I don't need any controls or anything, just publishing the image is all.
Firmware update crashes everytime when trying to Erase FW - Win7 x64.
Can you provide upgrade program for Mac OSX, or preferably Linux so we can upgrade from odroid?
혹시 ocam-5cro-u 제품 셔터스피드 조절 가능한가요?
감사합니다^^
I have been trying to use oCam with a system running on Xubuntu 16.04
The camera shows up as a USB device with dmesg
But when is run ls /dev/video*, the camera doesn't show up as a video device.
The oCam viewer doesn't list it as well.
Is there anything that can be done to debug this?
[ INFO] [1651816960.325107840]: Initialized the camera
[ INFO] [1651816960.405051673]: Loading from ROS calibration files
[ INFO] [1651816960.405464314]: camera calibration URL: package://ocam/config/camera.yaml
[ INFO] [1651816960.405574285]: Unable to open camera calibration file [/home/a/sensors/ocam_ws/src/ocam/config/camera.yaml]
[ WARN] [1651816960.405601285]: Camera calibration file /home/a/sensors/ocam_ws/src/ocam/config/camera.yaml not found.
[ INFO] [1651816960.405627804]: Got camera calibration files
[ INFO] [1651816960.409884227]: Success, found camera
ROS노드를 실행시 위와 같이 워닝이 나오면서 .yaml 파일이 없다고 나오는데 문제가 없는 결과일가요?
I would like to use C# with libCamCap-x64.dll. but It seems like not possible.
could you please help me to use camera control function at C# environment ?
I was not able to find in the driver any reference to access the external trigger for the camera
what is the status of this?
Thanks
This commit causes white_balance_red_component
and white_balance_blue_component
to disappear from v4l control options of the camera oCam-1CGN-U-T. I rolled back the firmware to R2006 and these control options came back. (Note: with windows viewer, white balance can still be changed with R2101 firmware for some reason)
(redacted)@(redacted):~$ uname -a
Linux (redacted) 5.11.0-40-generic #44~20.04.2-Ubuntu SMP Tue Oct 26 18:07:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
With R2101 firmware, v4l2 options output:
(redacted)@(redacted):~$ sudo v4l2-ctl -l
gain 0x00980913 (int) : min=0 max=255 step=1 default=64 value=80
exposure_auto 0x009a0901 (menu) : min=0 max=3 default=1 value=1
exposure_absolute 0x009a0902 (int) : min=1 max=1000 step=1 default=55 value=250
With R2006 firmware, v4l2 options output:
(redacted)@(redacted):~$ sudo v4l2-ctl -l
white_balance_red_component 0x0098090e (int) : min=0 max=250 step=1 default=100 value=130
white_balance_blue_component 0x0098090f (int) : min=0 max=250 step=1 default=100 value=148
gain 0x00980913 (int) : min=0 max=255 step=1 default=64 value=80
exposure_auto 0x009a0901 (menu) : min=0 max=3 default=1 value=1
exposure_absolute 0x009a0902 (int) : min=1 max=1000 step=1 default=55 value=250
The oCam-2WRS-U only supports 15fps, 30fps @1920x1080 currently according to the readme.
Would it be possible to add firmware support for 1280x960 and 1280x720 resolutions?
제공받은 Example: opencv-basic_1MGN 을 사용하면 초기 카메라 연결 시, 항상 다음과 같은 에러가 2번 발생합니다.
error number: 11
Cannot get image from camera: Resource temporarily unavailable
error number: 11
Cannot get image from camera: Resource temporarily unavailable
또한 제공 받은 example내의 ROS코드를 기반으로 코드를 작성하여도 초기에 카메라를 연결하면 위와 같이 꼭 2회 에러가 발생합니다.
DBG_PRINTF를 켜면
DBG: [withrobot_camera.cpp, 863, get_buffer] Warning :: Different buffer size. v4l2: 0, User: 921600
이라는 메시지가 나옵니다.
보통의 경우 에러 발생이후 문제는 없이 돌아가지만 가끔씩 동작중에 발생하여 에러 복구가 안되어서 프로그램을 재시작해야 하는 경우가 발생합니다. 위의 에러가 발생하였을 때, 커널로그를 확인해 보면 항상 다음과 같은 내용이 나옵니다.
uvcvideo: Non-zero status (-71) in video completion handler.
해당 에러가 왜 발생하는지 알고싶습니다.
I have multiple oCam-1CGN-U-T cameras on my system, and I wanted to access them all, but the current version just selects one of the cameras and shows the output. Referencing the camera by serial number would make the driver device agnostic, meaning that the type of camera won't matter (except for oCam-1MGN-U-T2 and oCam-1CGN-U-T2 where flag0144 must be set to true). Attaching a possible solution below, since I don't have access to submit a PR.
void enum_dev_list(std::vector<Withrobot::usb_device_info> dev_list, std::string serial)
{
/* enumerate device(UVC compatible devices) list */
// std::vector<Withrobot::usb_device_info> dev_list;
dev_num = Withrobot::get_usb_device_info_list(dev_list);
if (dev_num < 1) {
dev_list.clear();
return;
}
for (unsigned int i=0; i < dev_list.size(); i++) {
if (dev_list[i].serial == serial)
{
devPath_ = dev_list[i].dev_node;
return;
}
}
}
With a few further modifications to source the appropriate calibration files, the code builds fine, and yields to following output.
kololhe@AxiomMeanMachine:~/BarCam_ws$ roslaunch ocam ocam_ros.launch
... logging to /home/kololhe/.ros/log/add17f1a-c75d-11ed-9554-095d547f1c37/roslaunch-AxiomMeanMachine-23985.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://AxiomMeanMachine:43851/
SUMMARY
========
PARAMETERS
* /first/auto_exposure: True
* /first/camera_frame_id: first
* /first/exposure: 100
* /first/frame_rate: 30
* /first/gain: 50
* /first/resolution: 0
* /first/serial: SN_35E27022
* /first/show_image: False
* /first/wb_blue: 200
* /first/wb_red: 160
* /rosdistro: noetic
* /rosversion: 1.16.0
* /second/auto_exposure: True
* /second/camera_frame_id: second
* /second/exposure: 100
* /second/frame_rate: 30
* /second/gain: 50
* /second/resolution: 0
* /second/serial: SN_35E27001
* /second/show_image: False
* /second/wb_blue: 200
* /second/wb_red: 160
NODES
/
first (ocam/ocam)
second (ocam/ocam)
auto-starting new master
process[master]: started with pid [24004]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to add17f1a-c75d-11ed-9554-095d547f1c37
process[rosout-1]: started with pid [24025]
started core service [/rosout]
process[first-2]: started with pid [24032]
process[second-3]: started with pid [24033]
Pixel format: G, R, B, G
Width: 1280, Height: 720, Image size: 921600
Frame Rate : 1 / 30 (30.00 fps)
[ INFO] [1679344068.711970232]: Initialized the camera
[ INFO] [1679344068.776446204]: Loading from ROS calibration files
[ INFO] [1679344068.776824041]: camera calibration URL: package://ocam/config/SN_35E27001.yaml
[ INFO] [1679344068.776966185]: Unable to open camera calibration file [/home/kololhe/BarCam_ws/src/ocam/config/SN_35E27001.yaml]
[ WARN] [1679344068.776993685]: Camera calibration file /home/kololhe/BarCam_ws/src/ocam/config/SN_35E27001.yaml not found.
[ INFO] [1679344068.777014391]: Got camera calibration files
Pixel format: G, R, B, G
Width: 1280, Height: 720, Image size: 921600
Frame Rate : 1 / 30 (30.00 fps)
[ INFO] [1679344068.808915614]: Initialized the camera
[ INFO] [1679344068.827498129]: Success, found camera
[ INFO] [1679344068.860870276]: Loading from ROS calibration files
[ INFO] [1679344068.861179044]: camera calibration URL: package://ocam/config/SN_35E27022.yaml
[ INFO] [1679344068.861271352]: Unable to open camera calibration file [/home/kololhe/BarCam_ws/src/ocam/config/SN_35E27022.yaml]
[ WARN] [1679344068.861286993]: Camera calibration file /home/kololhe/BarCam_ws/src/ocam/config/SN_35E27022.yaml not found.
[ INFO] [1679344068.861307703]: Got camera calibration files
[ INFO] [1679344068.863593057]: Success, found camera
There is currently no documented way of setting the oCam to auto-exposure mode (from the latest firmware release) using libCamCap.
Are there plans to add this in the future? Is there a workaround for it right now?
Hi,
I'm using ocam-1cgn-u and running the guvcview version 2.0.5 on Ubuntu 18 to make sure that the camera works perfectly fine and every once in a while it returns empty frame. I noticed this using pupils lab uvc backend and wanted to test this independently to confirm. Could you please help me with this?
Thanks
veddy@vedbpom01:~$ GUVCVIEW: version 2.0.5
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
V4L2_CORE: not decoding empty raw frame (frame of size 0 at 0x0x7f73b7ffe000)
V4L2_CORE: Error - Couldn't decode frame
V4L2_CORE: not decoding empty raw frame (frame of size 0 at 0x0x7f739fb81000)
V4L2_CORE: Error - Couldn't decode frame
V4L2_CORE: not decoding empty raw frame (frame of size 0 at 0x0x7f739fa55000)
V4L2_CORE: Error - Couldn't decode frame
V4L2_CORE: not decoding empty raw frame (frame of size 0 at 0x0x7f739f929000)
V4L2_CORE: Error - Couldn't decode frame
V4L2_CORE: not decoding empty raw frame (frame of size 0 at 0x0x7f73b7ffe000)
V4L2_CORE: Error - Couldn't decode frame
V4L2_CORE: not decoding empty raw frame (frame of size 0 at 0x0x7f739fb81000)
V4L2_CORE: Error - Couldn't decode frame
V4L2_CORE: not decoding empty raw frame (frame of size 0 at 0x0x7f739fa55000)
V4L2_CORE: Error - Couldn't decode frame
V4L2_CORE: not decoding empty raw frame (frame of size 0 at 0x0x7f739f929000)
V4L2_CORE: Error - Couldn't decode frame
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.