TheImagingSource / tiscamera

The Linux SDK for The Imaging Source cameras.
https://www.theimagingsource.com
Apache License 2.0
300 stars 148 forks source link

Problem with triggering DFK 33UX178 <case:443985> #168

Closed kolyalyan closed 6 years ago

kolyalyan commented 6 years ago

I tried to use trigger-images.c and trigger-images.py, but first one always returns "Could not trigger" and second one says "Valve is broken. Cannot save image".

Python one also returns following lines: !!!!!Element message came from: prepare-window-handle !!!!!Element message came from: have-window-handle !!!!!Element message came from: GstNavigationMessage

It shows the real-time stream, but can't snap a picture.

kolyalyan commented 6 years ago

Out of a topic: I have noticed that camera become as hot as 40-50 C after a short time (less than 10 minutes). Is it normal?

TIS-Stefan commented 6 years ago

Hello

trigger-images.c:

"Could not trigger" means, the software trigger property of the camera is not available. Please install the uvc extension, as shown at https://github.com/TheImagingSource/tiscamera/wiki/UVC-Extension-Units

trigger-images (.py)

You may update your repository, because in the trigger-images Python sample is no text with the word "valve".

I hope, this helps.

Stefan

kolyalyan commented 6 years ago

Hello, Stefan! Thanks you for reply, but unfortunately it didn't help. Permanent solution was applied before. But while trying to make it manually, it returns:

[libwebcam] Unknown V4L2 user control ID encountered: 0x0098090E (V4L2_CID_USER_BASE + 14)
[libwebcam] Unknown V4L2 user control ID encountered: 0x0098090F (V4L2_CID_USER_BASE + 15)
Importing dynamic controls from file usb3.xml.
usb3.xml: error: video0: unable to map 'Gain (dB/100)' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Whitebalance One Push' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Whitebalance Preset' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Trigger Polarity' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 17: File exists)
usb3.xml: error: video0: unable to map 'Trigger Global Reset Release' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 17: File exists)
usb3.xml: error: video0: unable to map 'Auto Focus One Push' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Auto Focus ROI Enable' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Auto Focus ROI Left' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Auto Focus ROI Top' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'ATR Enable' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'ATR Gain' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'ATR Enable Wide D' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'ATR Contrast' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'ATR Contrast Auto' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'ATR Chroma' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Image Stabilization' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Noise Reduction' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Face Detection' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Flip Vertical' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Highlight Reduction' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Trigger Operation' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Trigger Exposure Mode' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Auto Functions ROI Preset' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 22: Invalid argument)
usb3.xml: error: video0: unable to map 'Exposure Auto Lower Limit' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)
usb3.xml: error: video0: unable to map 'Override Scanning Mode' control. ioctl(UVCIOC_CTRL_MAP) failed with return value -1 (error 2: No such file or directory)

Also I'm sorry for previous misunderstanding, it was not "trigger-images"'s output, but "pipeline"'s. I tried to snap pictures via this example, and it said about "broken valve".

TIS-Stefan commented 6 years ago

Hello

please do a

tcam-ctrl -p serialnumber

and show me the output. I tried the trigger c sample on my computer and it works.

Stefan

kolyalyan commented 6 years ago
Found 43 propert(y/ies)
Brightness                              (int) min=0 max=4095 step=1 default=200 value=240 category=Exposure
Saturation                              (int) min=0 max=255 step=1 default=64 value=64 category=Color
Hue                                     (int) min=-180 max=180 step=1 default=0 value=0 category=Color
Whitebalance Auto                       (bool) default=true value=true category=Color
Whitebalance Red                        (int) min=0 max=255 step=1 default=64 value=109 category=Color
Whitebalance Blue                       (int) min=0 max=255 step=1 default=64 value=132 category=Color
Gamma                                   (int) min=1 max=500 step=1 default=100 value=100 category=Image
Gain                                    (int) min=0 max=480 step=1 default=0 value=0 category=Exposure
Exposure                                (int) min=20 max=60000000 step=1 default=333 value=333 category=Exposure
Exposure Auto                           (bool) default=true value=true category=Exposure
Exposure Auto Reference                 (int) min=0 max=255 step=1 default=128 value=128 category=Exposure
Gain Auto                               (bool) default=true value=true category=Exposure
Trigger Mode                            (bool) default=false value=false category=Special
Software Trigger                        (button) category=Special
Trigger Delay (us)                      (int) min=0 max=1000000 step=1 default=0 value=31 category=Special
Strobe Enable                           (bool) default=false value=false category=Special
Strobe Polarity                         (bool) default=false value=false category=Special
Strobe Exposure                         (bool) default=true value=true category=Special
Strobe Duration                         (int) min=0 max=32767 step=1 default=100 value=100 category=Special
Strobe Delay                            (int) min=0 max=32767 step=1 default=0 value=0 category=Special
GPOut                                   (int) min=0 max=1 step=1 default=0 value=0 category=Special
GPIO                                    (int) min=0 max=1 step=1 default=0 value=0 category=Special
Offset X                                (int) min=0 max=2816 step=4 default=0 value=0 category=Partial Scan
Offset Y                                (int) min=0 max=2044 step=4 default=0 value=0 category=Partial Scan
Offset Auto Center                      (bool) default=true value=true category=Partial Scan
Trigger Polarity                        (enum)  default=RisingEdge category=Special
                        value=FallingEdge
                            FallingEdge
                            RisingEdge
Trigger Burst Count                     (int) min=1 max=1000 step=1 default=1 value=1 category=Special
Trigger Debounce Time (us)              (int) min=0 max=1000000 step=1 default=0 value=0 category=Special
Trigger Mask Time (us)                  (int) min=0 max=1000000 step=1 default=0 value=0 category=Special
Trigger Noise Surpression Time (us)     (int) min=0 max=1000000 step=1 default=0 value=0 category=Special
Auto Functions ROI Control              (bool) default=true value=true category=Special
Auto Functions ROI Left                 (int) min=0 max=3056 step=1 default=0 value=768 category=Special
Auto Functions ROI Top                  (int) min=0 max=2032 step=1 default=0 value=512 category=Special
Auto Functions ROI Width                (int) min=16 max=3072 step=1 default=0 value=1536 category=Special
Auto Functions ROI Height               (int) min=16 max=2048 step=1 default=0 value=1024 category=Special
Whitebalance                            (bool) default=false value=false category=Color
Whitebalance Auto Preset                (enum)  default=Any    category=Color
                        value=Any
                            Any
                            Cool White
                            Daylight
                            Deep Shade
                            Warm White
Whitebalance Green                      (int) min=0 max=255 step=1 default=64 value=64 category=Color
White Balance Temperature Preset        (enum)  default=       category=Color
                        value=Cool White Fluorescent Light
                            Blue Sky
                            Cool White Fluorescent Light
                            Cool White LED
                            Cool White/Daylight (CFL)
                            Daylight
                            Halogen Light
                            Neutral White
                            Sodium-Vapur Lamp
                            Warm Light
Whitebalance Temperature                (int) min=2500 max=10000 step=100 default=6500 value=4000 category=Color
Reverse X                               (bool) default=false value=false category=Unknown
Exposure Auto Upper Limit Auto          (bool) default=true value=true category=Exposure
Exposure Auto Upper Limit               (int) min=20 max=1000000 step=1 default=333 value=100000 category=Exposure
kolyalyan commented 6 years ago

Now I've done something really wrong... I tried to build all "libwebcam" library from link which you sent me. I downloaded it, extracted, made dir "build" and after executed commands "cmake .." and "make" from "build" dir. Now I do not see real-time stream from any .c code and from any .py too.

TIS-Stefan commented 6 years ago

"Libwebcam" is necessary only, if uvcdynctrl is not available in the standard Linux packages. Ubuntu 16.04 has this in its packages. I am not sure, what happened now on your computer, but you can try

TCAM_LOG=DEBUG gst-launch-1.0 tcambin ! videoconvert ! ximagesink

and let me know, what happens.

However, the tcam-ctrl output shows all necessary properties. Therefore, even "Software Trigger" is available and should work, as it does on my Ubuntu 16.04. Which Linux do you use?

kolyalyan commented 6 years ago

I use Ubuntu 17.10 Output:

Установка конвейера в состояние PAUSED…
26353      <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
26366      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-v4l2.so
26797      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 1
27080      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-aravis.so
27119      <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
27127      <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
27145      <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:465: Unable to connect to gige-daemon. Using internal methods
29048      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
29141      <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
29185      <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:507: Unable to connect to gige-daemon. Using internal methods
31294      <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:509: Aravis gave us 0
31406      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-libusb.so
37072      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
37173      <DEBUG> /home/kolya/new_camera/tiscamera/src/DeviceIndex.cpp:147: Number of found devices: 1
37446      <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
37478      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
38122      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1147: Encountered write only control.
39027      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RGGB
39123      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RG16
39189      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: YUYV
39517      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 0
39524      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
39588      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 33524742
39593      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
39636      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:235: Returning 5 formats.
39677      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:127: Received 5 formats.
39917      <DEBUG> /home/kolya/new_camera/tiscamera/src/PropertyHandler.cpp:283: Created 43 properties
Конвейер работает и не требует состояния PREROLL…
Установка конвейера в состояние PLAYING…
New clock: GstSystemClock
42932      <INFO> /home/kolya/new_camera/tiscamera/src/ImageSource.cpp:68: Source changed to state STOPPED
42940      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:527: Unable to set ioctl VIDIOC_STREAMOFF 16
42946      <WARNING> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:252: Sink is not defined.
42979      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:160: Requested format change to 'format=RGGB,width=3072,height=2048,framerate=60,000000' 42474752
43163      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:371: Setting framerate to '60,000000' =  60 / 1
43341      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
43374      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:215: Active format is: 'format=RGGB,width=3072,height=2048,framerate=60,000000'
43432      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'RGGB' - 1111967570
43446      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'RG16' - 909199186
43450      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'YUYV' - 1448695129
43453      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 0
43457      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc '' - 0
43461      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 33524742
43464      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc '' - 861030210
43476      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:160: Requested format change to 'format=RGGB,width=3072,height=2048,framerate=60,000000' 42474752
43679      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:371: Setting framerate to '60,000000' =  60 / 1
43835      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
43871      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:215: Active format is: 'format=RGGB,width=3072,height=2048,framerate=60,000000'
43893      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43929      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43943      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43951      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43958      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43964      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43972      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43980      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43986      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
43994      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
44005      <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:499: Pipeline creation successful.
44012      <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:509: source ->  sink
44015      <INFO> /home/kolya/new_camera/tiscamera/src/ImageSink.cpp:51: Pipeline started playing
44046      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1546: Will use 10 buffers
44061      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f9365ff4010) with length 6291456
45268      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
45273      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f93659f3010) with length 6291456
46137      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
46145      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f93653f2010) with length 6291456
47023      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
47029      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f9364df1010) with length 6291456
47881      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
47889      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f93647f0010) with length 6291456
48720      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
48729      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f93641ef010) with length 6291456
49747      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
49757      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f93579ff010) with length 6291456
50686      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
50697      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f93573fe010) with length 6291456
51671      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
51678      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f9356dfd010) with length 6291456
52487      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
52493      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7f93567fc010) with length 6291456
53302      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
53411      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:510: Starting stream in work thread.
53503      <DEBUG> /home/kolya/new_camera/tiscamera/src/ImageSource.cpp:57: PLAYING....
53516      <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:83: All pipeline elements set to PLAYING.

I have some "transparent" window. On screen that I attached it is in full screen mode. bug

TIS-Stefan commented 6 years ago

Hello

The pipeline was successfully started. The transparent window is the ximagesink window, waiting for an image. It waits, because either trigger mode is still enabled, but the camera is not triggered or the camera is too fast for your computer.

Therefore, simply disconnect and reconnect the camera. This should disable the trigger mode definitely. Then you use

gst-launch-1.0 tcambin ! video/x-raw,format=BGRA,width=640,height=480,framerate=30/1 ! videoconvert ! ximagesink So we get 640x480 @ 30 fps. Your computer should be able to run that. If this works, you can try

gst-launch-1.0 tcambin ! videoconvert ! ximagesink again

Stefan

kolyalyan commented 6 years ago

Yes, you were right, triggering was enable (strange). I reconnected the camera and now all real-time streams work fine again. But anyway I still can't snap any picture. Python codes return same outputs as before, C triggering code says "could not trigger".

TIS-Stefan commented 6 years ago

Hmm Please comment the line

tcam_prop_set_tcam_property(TCAM_PROP(source), "Trigger Mode", &trigger_val);

just for testing, whether you get a live video.

Stefan

kolyalyan commented 6 years ago

Nothing changed. I still have a real-time stream and no triggering.

TIS-Stefan commented 6 years ago

Yes. this is the expected behavior, if the trigger mode is not used. However, we know, the program is running with live stream. If you uncomment the line again, then you wont get a live stream. Please check, whether "Software Trigger" in the string is written as tcam-ctrl shows it.

I believe, it must be something very simple. However, I tried the sample with a DFK 33UX290 (I don not have a DFK 33UX178 right now) and it works. I do not get an error message.

Stefan

kolyalyan commented 6 years ago

Now I got 8 properties found...

Found 8 propert(y/ies)
Brightness                              (int) min=0 max=4095 step=1 default=200 value=240 category=Exposure
Saturation                              (int) min=0 max=255 step=1 default=64 value=64 category=Color
Hue                                     (int) min=-180 max=180 step=1 default=0 value=0 category=Color
Whitebalance Auto                       (bool) default=true value=true category=Color
Whitebalance Red                        (int) min=0 max=255 step=1 default=64 value=111 category=Color
Whitebalance Blue                       (int) min=0 max=255 step=1 default=64 value=150 category=Color
Gamma                                   (int) min=1 max=500 step=1 default=100 value=100 category=Image
Gain                                    (int) min=0 max=480 step=1 default=0 value=0 category=Exposure

I reconnected the camera and output is same? What happened?

TIS-Stefan commented 6 years ago

Uhm, that is quite different to your post 3 hours ago... what did you change?

kolyalyan commented 6 years ago

Nothing. I reconnected camera and maybe rebooted later. It is a bug I think.

TIS-Stefan commented 6 years ago

Do following:

sudo mkdir /usr/share/uvcdynctrl/data/199e
sudo cp <tiscamera>/data/uvc-extensions/*.xml /usr/share/uvcdynctrl/data/199e

(Copied from the wiki link, I meantiond hours ago) Then restart the computer. check tcam-ctrl -p serial

Trigger mode and software trigger must be back again.

kolyalyan commented 6 years ago

I have this folder already (even before your first message it was there). But I will change the files inside now.

kolyalyan commented 6 years ago

I've rebooted and again same 8 properties...

kolyalyan commented 6 years ago

I catch the moment than it have changed!

I ran the following code: sudo uvcdynctrl -i usb3.xml -d /dev/video0

And now I got:

Found 43 propert(y/ies)
Brightness                              (int) min=0 max=4095 step=1 default=200 value=240 category=Exposure
Saturation                              (int) min=0 max=255 step=1 default=64 value=64 category=Color
Hue                                     (int) min=-180 max=180 step=1 default=0 value=0 category=Color
Whitebalance Auto                       (bool) default=true value=true category=Color
Whitebalance Red                        (int) min=0 max=255 step=1 default=64 value=109 category=Color
Whitebalance Blue                       (int) min=0 max=255 step=1 default=64 value=151 category=Color
Gamma                                   (int) min=1 max=500 step=1 default=100 value=100 category=Image
Gain                                    (int) min=0 max=480 step=1 default=0 value=91 category=Exposure
Exposure                                (int) min=20 max=60000000 step=1 default=333 value=16666 category=Exposure
Exposure Auto                           (bool) default=true value=true category=Exposure
Exposure Auto Reference                 (int) min=0 max=255 step=1 default=128 value=128 category=Exposure
Gain Auto                               (bool) default=true value=true category=Exposure
Trigger Mode                            (bool) default=false value=false category=Special
Software Trigger                        (button) category=Special
Trigger Delay (us)                      (int) min=0 max=1000000 step=1 default=0 value=31 category=Special
Strobe Enable                           (bool) default=false value=false category=Special
Strobe Polarity                         (bool) default=false value=false category=Special
Strobe Exposure                         (bool) default=true value=true category=Special
Strobe Duration                         (int) min=0 max=32767 step=1 default=100 value=100 category=Special
Strobe Delay                            (int) min=0 max=32767 step=1 default=0 value=0 category=Special
GPOut                                   (int) min=0 max=1 step=1 default=0 value=0 category=Special
GPIO                                    (int) min=0 max=1 step=1 default=0 value=0 category=Special
Offset X                                (int) min=0 max=2816 step=4 default=0 value=0 category=Partial Scan
Offset Y                                (int) min=0 max=2044 step=4 default=0 value=0 category=Partial Scan
Offset Auto Center                      (bool) default=true value=true category=Partial Scan
Trigger Polarity                        (enum)  default=RisingEdge category=Special
                        value=FallingEdge
                            FallingEdge
                            RisingEdge
Trigger Burst Count                     (int) min=1 max=1000 step=1 default=1 value=1 category=Special
Trigger Debounce Time (us)              (int) min=0 max=1000000 step=1 default=0 value=0 category=Special
Trigger Mask Time (us)                  (int) min=0 max=1000000 step=1 default=0 value=0 category=Special
Trigger Noise Surpression Time (us)     (int) min=0 max=1000000 step=1 default=0 value=0 category=Special
Auto Functions ROI Control              (bool) default=true value=true category=Special
Auto Functions ROI Left                 (int) min=0 max=3056 step=1 default=0 value=768 category=Special
Auto Functions ROI Top                  (int) min=0 max=2032 step=1 default=0 value=512 category=Special
Auto Functions ROI Width                (int) min=16 max=3072 step=1 default=0 value=1536 category=Special
Auto Functions ROI Height               (int) min=16 max=2048 step=1 default=0 value=1024 category=Special
Whitebalance                            (bool) default=false value=false category=Color
Whitebalance Auto Preset                (enum)  default=Any    category=Color
                        value=Any
                            Any
                            Cool White
                            Daylight
                            Deep Shade
                            Warm White
Whitebalance Green                      (int) min=0 max=255 step=1 default=64 value=64 category=Color
White Balance Temperature Preset        (enum)  default=       category=Color
                        value=Cool White Fluorescent Light
                            Blue Sky
                            Cool White Fluorescent Light
                            Cool White LED
                            Cool White/Daylight (CFL)
                            Daylight
                            Halogen Light
                            Neutral White
                            Sodium-Vapur Lamp
                            Warm Light
Whitebalance Temperature                (int) min=2500 max=10000 step=100 default=6500 value=4000 category=Color
Reverse X                               (bool) default=false value=false category=Unknown
Exposure Auto Upper Limit Auto          (bool) default=true value=true category=Exposure
Exposure Auto Upper Limit               (int) min=20 max=1000000 step=1 default=333 value=16666 category=Exposure

But after this code sudo uvcdynctrl -i usb3.xml -d /dev/video0 (it again returned many errors), I can't receive real-time stream (I got "transparent" window instead of stream). Then I reconnected the camera and again got just 8 properties.

TIS-Stefan commented 6 years ago

Starting with sudo uvcdynctrl -i usb3.xml -d /dev/video0 so you have all properties. Please run the trigger-images sample with TCAM_LOG=DEBUG ./trigger-image serialnumber Let me know the output.

Stefan

kolyalyan commented 6 years ago
kolya@MSI:~/new_camera/tiscamera/examples/c$ TCAM_LOG=DEBUG ./trigger-images 33714446
146013     <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
146037     <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-v4l2.so
146810     <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 1
147363     <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-aravis.so
147424     <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
147440     <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
147468     <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:465: Unable to connect to gige-daemon. Using internal methods
149367     <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
149498     <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
149545     <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:507: Unable to connect to gige-daemon. Using internal methods
151507     <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:509: Aravis gave us 0
151623     <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-libusb.so
161259     <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
161486     <DEBUG> /home/kolya/new_camera/tiscamera/src/DeviceIndex.cpp:147: Number of found devices: 1
161894     <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
161932     <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 30 / 1 fps
163122     <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1147: Encountered write only control.
164973     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RGGB
165098     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RG16
165142     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: YUYV
165407     <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 0
165412     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
165457     <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 33524742
165461     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
165494     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:235: Returning 5 formats.
165525     <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:127: Received 5 formats.
165701     <DEBUG> /home/kolya/new_camera/tiscamera/src/PropertyHandler.cpp:283: Created 43 properties
165856     <INFO> /home/kolya/new_camera/tiscamera/src/ImageSource.cpp:68: Source changed to state STOPPED
165865     <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:527: Unable to set ioctl VIDIOC_STREAMOFF 16
165870     <WARNING> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:252: Sink is not defined.
166020     <INFO> /home/kolya/new_camera/tiscamera/src/CaptureDeviceImpl.cpp:162: Closed device DFK 33UX178.
166140     <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 30 / 1 fps
166465     <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1147: Encountered write only control.
167056     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RGGB
167110     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RG16
167163     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: YUYV
167460     <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 0
167466     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
167520     <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 33524742
167526     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
167566     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:235: Returning 5 formats.
167584     <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:127: Received 5 formats.
167767     <DEBUG> /home/kolya/new_camera/tiscamera/src/PropertyHandler.cpp:283: Created 43 properties
171229     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1335: Changed ctrl Trigger Mode to value 1.
Press 'q' then 'enter' to stop the stream.
Press 'Enter' to trigger a new image.
171837     <INFO> /home/kolya/new_camera/tiscamera/src/ImageSource.cpp:68: Source changed to state STOPPED
171853     <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:527: Unable to set ioctl VIDIOC_STREAMOFF 16
171860     <WARNING> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:252: Sink is not defined.
171928     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:160: Requested format change to 'format=RGGB,width=3072,height=2048,framerate=60.000000' 42474752
172176     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:371: Setting framerate to '60.000000' =  60 / 1
172357     <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
172387     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:215: Active format is: 'format=RGGB,width=3072,height=2048,framerate=60.000000'
172439     <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'RGGB' - 1111967570
172452     <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'RG16' - 909199186
172456     <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'YUYV' - 1448695129
172460     <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 0
172463     <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc '' - 0
172467     <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 33524742
172470     <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc '' - 861030210
172481     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:160: Requested format change to 'format=RGGB,width=3072,height=2048,framerate=60.000000' 42474752
172703     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:371: Setting framerate to '60.000000' =  60 / 1
172816     <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
172835     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:215: Active format is: 'format=RGGB,width=3072,height=2048,framerate=60.000000'
172854     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172882     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172896     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172903     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172910     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172919     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172926     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172932     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172938     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172944     <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
172954     <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:499: Pipeline creation successful.
172961     <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:509: source ->  sink
172965     <INFO> /home/kolya/new_camera/tiscamera/src/ImageSink.cpp:51: Pipeline started playing
172993     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1546: Will use 10 buffers
173008     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effb077f010) with length 6291456
174509     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
174520     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effb017e010) with length 6291456
175404     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
175412     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effa39ff010) with length 6291456
176255     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
176263     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effa33fe010) with length 6291456
177075     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
177082     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effa2dfd010) with length 6291456
177885     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
177892     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effa27fc010) with length 6291456
178674     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
178680     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effa21fb010) with length 6291456
179497     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
179504     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effa1bfa010) with length 6291456
180303     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
180310     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effa15f9010) with length 6291456
181114     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
181121     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7effa0ff8010) with length 6291456
181896     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
182020     <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:510: Starting stream in work thread.
182070     <DEBUG> /home/kolya/new_camera/tiscamera/src/ImageSource.cpp:57: PLAYING....
182075     <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:83: All pipeline elements set to PLAYING.
1339180    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-v4l2.so
1340630    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 1
1341733    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-aravis.so
1341806    <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
1341853    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:465: Unable to connect to gige-daemon. Using internal methods
1384913    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
1385028    <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
1385090    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:507: Unable to connect to gige-daemon. Using internal methods
1426603    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:509: Aravis gave us 0
1426646    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-libusb.so
1426685    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
1426718    <DEBUG> /home/kolya/new_camera/tiscamera/src/DeviceIndex.cpp:147: Number of found devices: 1

And again "transparent" windows waiting for untriggering.

TIS-Stefan commented 6 years ago

Did you hit the enter key for software triggering? I do not see the message, that the trigger failed.

Stefan

kolyalyan commented 6 years ago

Now I pressed enter. After first attempt nothing changed, after second there came picture into previously "transparent" window. And after all following hits images came. But no real-time stream.

kolya@MSI:~/new_camera/tiscamera/examples/c$ TCAM_LOG=DEBUG ./trigger-images 33714446
27827      <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
27846      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-v4l2.so
28262      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 1
28540      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-aravis.so
28584      <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
28592      <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
28608      <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:465: Unable to connect to gige-daemon. Using internal methods
30438      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
30544      <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
30595      <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:507: Unable to connect to gige-daemon. Using internal methods
32728      <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:509: Aravis gave us 0
32849      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-libusb.so
42908      <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
43112      <DEBUG> /home/kolya/new_camera/tiscamera/src/DeviceIndex.cpp:147: Number of found devices: 1
43319      <DEBUG> Logger:108: 
The following library versions are used:
    Tcam:   0.9.1_master/50d4ea6_rev_1783
    Aravis: 0.6_version_5a2f97a
43333      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
43777      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1147: Encountered write only control.
44399      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RGGB
44455      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RG16
44503      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: YUYV
44755      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 0
44759      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
44824      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 33524742
44828      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
44861      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:235: Returning 5 formats.
44889      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:127: Received 5 formats.
45043      <DEBUG> /home/kolya/new_camera/tiscamera/src/PropertyHandler.cpp:283: Created 43 properties
45181      <INFO> /home/kolya/new_camera/tiscamera/src/ImageSource.cpp:68: Source changed to state STOPPED
45190      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:527: Unable to set ioctl VIDIOC_STREAMOFF 16
45198      <WARNING> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:252: Sink is not defined.
45310      <INFO> /home/kolya/new_camera/tiscamera/src/CaptureDeviceImpl.cpp:162: Closed device DFK 33UX178.
45404      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
45663      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1147: Encountered write only control.
45999      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RGGB
46037      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: RG16
46074      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: YUYV
46264      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 0
46269      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
46306      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 33524742
46310      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:685: Found format: 
46332      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:235: Returning 5 formats.
46367      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:127: Received 5 formats.
46479      <DEBUG> /home/kolya/new_camera/tiscamera/src/PropertyHandler.cpp:283: Created 43 properties
47967      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1335: Changed ctrl Trigger Mode to value 1.
Press 'q' then 'enter' to stop the stream.
Press 'Enter' to trigger a new image.
48316      <INFO> /home/kolya/new_camera/tiscamera/src/ImageSource.cpp:68: Source changed to state STOPPED
48325      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:527: Unable to set ioctl VIDIOC_STREAMOFF 16
48329      <WARNING> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:252: Sink is not defined.
48366      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:160: Requested format change to 'format=RGGB,width=3072,height=2048,framerate=60.000000' 42474752
51608      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:371: Setting framerate to '60.000000' =  60 / 1
51931      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
51982      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:215: Active format is: 'format=RGGB,width=3072,height=2048,framerate=60.000000'
52081      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'RGGB' - 1111967570
52109      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'RG16' - 909199186
52122      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc 'YUYV' - 1448695129
52134      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 0
52144      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc '' - 0
52155      <ERROR> /home/kolya/new_camera/tiscamera/src/format.cpp:102: No string for fourcc 33524742
52164      <DEBUG> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:222: Found device fourcc '' - 861030210
52196      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:160: Requested format change to 'format=RGGB,width=3072,height=2048,framerate=60.000000' 42474752
52482      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:371: Setting framerate to '60.000000' =  60 / 1
52814      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:404: Current framerate is 60 / 1 fps
52870      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:215: Active format is: 'format=RGGB,width=3072,height=2048,framerate=60.000000'
52914      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
52981      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53025      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53062      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53087      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53109      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53131      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53152      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53173      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53198      <INFO> /home/kolya/new_camera/tiscamera/src/MemoryBuffer.cpp:38: allocating data buffer
53230      <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:499: Pipeline creation successful.
53244      <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:509: source ->  sink
53257      <INFO> /home/kolya/new_camera/tiscamera/src/ImageSink.cpp:51: Pipeline started playing
53316      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1546: Will use 10 buffers
53353      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facbad98010) with length 6291456
55864      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
55879      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facba797010) with length 6291456
58334      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
58349      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facba196010) with length 6291456
60712      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
60726      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facb9b95010) with length 6291456
63102      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
63116      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facb9594010) with length 6291456
65547      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
65572      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facb8f93010) with length 6291456
66837      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
66853      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facb8992010) with length 6291456
67720      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
67727      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facb8391010) with length 6291456
68574      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
68580      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facaf9ff010) with length 6291456
69397      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
69403      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1573: Queueing buffer(0x7facaf3fe010) with length 6291456
70199      <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1582: Successfully queued v4l2_buffer
70320      <INFO> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:510: Starting stream in work thread.
70391      <DEBUG> /home/kolya/new_camera/tiscamera/src/ImageSource.cpp:57: PLAYING....
70405      <INFO> /home/kolya/new_camera/tiscamera/src/PipelineManager.cpp:83: All pipeline elements set to PLAYING.
71331      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71394      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71406      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71418      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71429      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71437      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71445      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71454      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71465      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...
71474      <ERROR> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1508: Buffer has wrong size. Got: 0 Expected: 6291456 Dropping...

530309     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1335: Changed ctrl Software Trigger to value 1.

652934     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1335: Changed ctrl Software Trigger to value 1.
654247     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1527: pushing new buffer

762353     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1335: Changed ctrl Software Trigger to value 1.
763172     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1527: pushing new buffer

815601     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1335: Changed ctrl Software Trigger to value 1.
816995     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1527: pushing new buffer

975626     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1335: Changed ctrl Software Trigger to value 1.
976993     <DEBUG> /home/kolya/new_camera/tiscamera/src/v4l2/V4l2Device.cpp:1527: pushing new buffer
1197362    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-v4l2.so
1198776    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 1
1199820    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-aravis.so
1199924    <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
1199969    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:465: Unable to connect to gige-daemon. Using internal methods
1234689    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
1234800    <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
1234850    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:507: Unable to connect to gige-daemon. Using internal methods
1274786    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:509: Aravis gave us 0
1274857    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-libusb.so
1274920    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
1274968    <DEBUG> /home/kolya/new_camera/tiscamera/src/DeviceIndex.cpp:147: Number of found devices: 1
2407807    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-v4l2.so
2408697    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 1
2409388    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-aravis.so
2409439    <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
2409472    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:465: Unable to connect to gige-daemon. Using internal methods
2447886    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
2447942    <ERROR> /home/kolya/new_camera/tiscamera/src/utils.cpp:342: Could not open file "/var/lock/gige-daemon.lock"
2447964    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:507: Unable to connect to gige-daemon. Using internal methods
2488546    <ERROR> /home/kolya/new_camera/tiscamera/src/aravis/aravis_utils.cpp:509: Aravis gave us 0
2488620    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:169: retrieving list for libtcam-libusb.so
2488763    <DEBUG> /home/kolya/new_camera/tiscamera/src/BackendLoader.cpp:172: Amount of devices: 0
2488843    <DEBUG> /home/kolya/new_camera/tiscamera/src/DeviceIndex.cpp:147: Number of found devices: 1
TIS-Stefan commented 6 years ago

The software trigger pushes, no error message, only, there is no image. We are going in circles.

Please enter the examples/cpp directory of the tiscamera repository. Do following

mkdir build
cd build
cmake ..
make
cd tcam-view
./tcam-view

Select the camera. Use a small video format and low frame rate. On the left side of the program, you will see the camera properties. Enable trigger and try the software trigger. If this works, the 3072x2048 @ 60.00024 fps may is too fast for your computer all frames are dropped. That would explain that the ximagesink does not get anything to display.

Attached you will find a cpp sample code, that uses the TcamCamera wrapper class from examples/cpp/common. With this, we can set the video format and frame rate comfortably. See

int main(int argc, char **argv)
{
    gst_init(&argc, &argv);

    // Open camera by serial number
    TcamCamera cam("00001234");

    // Set video format, resolution and frame rate
    cam.set_capture_format("BGRA", FrameSize{640,480}, FrameRate{3,1});
...

tcamsoftwaretrigger.zip

You must also change the CMakeLists.txt for the location of your tiscamera repository i the line

set( TISCAMERA_DIR /home/bvtest/projects/tiscamera-1.0)

then you can do the usuall stuff:

mkdir build
cmake ..
make
./tcamsoftwaretrigger

Please try that too.

Stefan

kolyalyan commented 6 years ago

Now I got some stupid error... cmake says that I set directory incorrectly, but it is correct!

kolya@MSI:~/new_camera/tiscamera/examples/cpp/software_trigger/build$ cat ~/new_camera/tiscamera/examples/cpp/common/tcamcamera.h
#ifndef __TCAMCAMERA_H__
#define __TCAMCAMERA_H__

#include <vector>
#include <string>
#include <memory>
#include <functional>
...
};

kolya@MSI:~/new_camera/tiscamera/examples/cpp/software_trigger/build$ cat ../CMakeLists.txt 
project(tcamsoftwaretrigger)

cmake_minimum_required(VERSION 2.6)
set(CMAKE_CXX_STANDARD 11)

find_package(PkgConfig REQUIRED)

set( TISCAMERA_DIR ~/new_camera/tiscamera)

if(NOT EXISTS(${TISCAMERA_DIR}/examples/cpp/common/tcamcamera.h))
    message( "CONFIGURATION ERROR : TISCAMERA_DIR not set to tiscamera directory." )
    return()
endif()

pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0 gstreamer-app-1.0 gstreamer-video-1.0)
pkg_check_modules(TCAMLIB tcam)

include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${TISCAMERA_DIR}/examples/cpp/common  ${GSTREAMER_INCLUDE_DIRS} ${TCAM_INCLUDE_DIRS} )
add_definitions(${GSTREAMER_CFLAGS_OTHER})  

add_executable(tcamsoftwaretrigger main.cpp ${TISCAMERA_DIR}/examples/cpp/common/tcamcamera.cpp )

target_link_libraries(tcamsoftwaretrigger ${TCAMLIB_LIBRARIES} ${GSTREAMER_LIBRARIES} )

install(TARGETS tcamsoftwaretrigger RUNTIME DESTINATION bin)

kolya@MSI:~/new_camera/tiscamera/examples/cpp/software_trigger/build$ ls ~/new_camera/tiscamera/examples/cpp/common
build                CMakeLists.txt           examples        tcam_view
CMakeCache.txt       common                   Makefile
CMakeFiles           CPackConfig.cmake        tcamcamera.cpp
cmake_install.cmake  CPackSourceConfig.cmake  tcamcamera.h
kolya@MSI:~/new_camera/tiscamera/examples/cpp/software_trigger/build$ cmake ..CONFIGURATION ERROR : TISCAMERA_DIR not set to tiscamera directory.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kolya/new_camera/tiscamera/examples/cpp/software_trigger/build

UPD: I tried to recreate all repository (by deleting all tiscamera folder and cloning it again), but same error. The file is there 100%. I can use "cat" function on it But cmake says that isn't there...

kolyalyan commented 6 years ago

Ok, I have deleted "if" part of the CMakeLists file and it works. I executed the program and it returned followings:

kolya@MSI:~/new_camera/tiscamera/examples/cpp/tcamsoftwaretrigger/build$ ./tcamsoftwaretrigger 
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger

pipeline refcount at cleanup: 1

(Pipeline string appears after I have pressed an enter key)

When I changed "set_capture_format" method it returned:

kolya@MSI:~/new_camera/tiscamera/examples/cpp/tcamsoftwaretrigger/build$ ./tcamsoftwaretrigger 

(tcamsoftwaretrigger:2596): GStreamer-CRITICAL **: gst_caps_get_size: assertion 'GST_IS_CAPS (caps)' failed

(tcamsoftwaretrigger:2596): GStreamer-CRITICAL **: gst_caps_get_size: assertion 'GST_IS_CAPS (caps)' failed
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger
Trigger

pipeline refcount at cleanup: 1

Also, as I understood from code, here should be a live stream too, but it didn't appear.

TIS-Stefan commented 6 years ago

The "return()" in the CMakeLists.txt is the problem.. Sorry for that. And also I missed a "0": wrong:

cam.set_capture_format("BGRA", FrameSize{640,480}, FrameRate{3,1});

correct:

cam.set_capture_format("BGRA", FrameSize{640,480}, FrameRate{30,1});

The camera wont support 3 fps....

Please check with 30 fps. I suppose, you will see a live video.

BTW: Which computer model do you use?

What is the output of

lsusb -t

Stefan

kolyalyan commented 6 years ago

Yes, now here was a live video. And many "callback called" strings in output.

kolya@MSI:~/new_camera/tiscamera/examples/cpp/tcamsoftwaretrigger/build$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    |__ Port 2: Dev 4, If 0, Class=Miscellaneous Device, Driver=, 5000M
    |__ Port 2: Dev 4, If 1, Class=Miscellaneous Device, Driver=, 5000M
    |__ Port 2: Dev 4, If 2, Class=Miscellaneous Device, Driver=, 5000M
    |__ Port 2: Dev 4, If 3, Class=Video, Driver=uvcvideo, 5000M
    |__ Port 2: Dev 4, If 4, Class=Video, Driver=uvcvideo, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
    |__ Port 6: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 14: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 3: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 3: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
        |__ Port 5: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M

My computer: MSI GE72 2QF Apache Pro Ubuntu 17.10 Intel Core i7 4720hq nVidia 970m 16gb RAM

But lately I'm planning to use camera on Odroid XU4 with archlinux (arm) onboard.

TIS-Stefan commented 6 years ago

Please also do a lspci

We now figured out:

Now rise the video format and frame rate step by step. Use following parameters for each test:

cam.set_capture_format("BGRA", FrameSize{1920,1080}, FrameRate{30,1});

cam.set_capture_format("BGRA", FrameSize{3072,2048}, FrameRate{15,1});

cam.set_capture_format("BGRA", FrameSize{3072,2048}, FrameRate{30,1});

On my old Core i5 with a fast USB 3.0 controller I get images with all these parameters.

Stefan

kolyalyan commented 6 years ago

I see live video with all formats include max resolution at 60 fps.

lspci:

kolya@MSI:~/new_camera/tiscamera/examples/cpp/tcamsoftwaretrigger/build$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
00:1c.6 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #7 (rev d5)
00:1c.7 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #8 (rev d5)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05)
00:1f.2 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 3D controller: NVIDIA Corporation GM204M [GeForce GTX 970M] (rev ff)
03:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)
04:00.0 Ethernet controller: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller (rev 13)
TIS-Stefan commented 6 years ago

The hardware is ok too.

Thus: software trigger is working know, camera is working now and you got a working and hopefully easy to understand sample code. Can we close the issue?

Stefan

kolyalyan commented 6 years ago

No, since I have same issue with python.

kolya@MSI:~/new_camera/tiscamera/examples/python$ python3 pipeline
Valve is broken. Cannot save image
Starting stream...
!!!!!Element message came from: prepare-window-handle
!!!!!Element message came from: have-window-handle
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
Valve is broken. Cannot save image
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage
!!!!!Element message came from: GstNavigationMessage

UPD: And I still can't record a video: stream.ts (in a /tmp) has size of 0 bytes. Also I have no images or new windows from tcam_demo.cpp, but it list all properties and formats.

TIS-Stefan commented 6 years ago

Use this sample save-single-image.zip

Adapt the line

Tis = TIS.TIS("31510423",640, 480, 10,True )

to your needs

kolyalyan commented 6 years ago

Ok, that works, but you have to change "raw_input" to simple "input", otherwise it raises an error that name "raw_input" is not defined.

And I solved the video problem -- it was because of a .lock file.

Then I have last 2 question: 1) Can I adjust the video quality (and things like resolution, fps)? Since it is very poor now. 2) Is there any forum for questions about coding?

TIS-Stefan commented 6 years ago

Can I adjust the video quality (and things like resolution, fps)? Since it is very poor now.

Adapt the line

Tis = TIS.TIS("camera serial",640, 480, 10,True )

e.g.

`Tis = TIS.TIS("camera serial",3072,2048,30,True)

Is there any forum for questions about coding? Depend on what. I think, you will find Python und GStreamer samples and maybe als forums in the internet. I must admit, I did not search explicitly for that.

Stefan

kolyalyan commented 6 years ago

I meant C code (save-video). How to change quality in it?

TIS-Stefan commented 6 years ago

This depends on the used codec and its properties. In this case I am not sure about, what you are doing. I searched in the internet for "gstreamer avi capture sample" and got many results, e.g. http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines You may search too.

Stefan

kolyalyan commented 6 years ago

Ok, thank you a lot.

kolyalyan commented 6 years ago

Hello, Stefan! I have encountered some small problem: How should the "tcam_demo" (.cpp example) work? I have executed it, it prints video formats and properties, after return "pipeline refcount at cleanup: 1" and nothing else. As I understood from code it should display some video. I tried to change "xvideosink" to "autovideosink", but it also didn't change anything.