TheImagingSource / tiscamera

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

For camera(DFK33UP1300) on Jetson Nano #464

Closed FantasticCHH closed 2 years ago

FantasticCHH commented 2 years ago

Würden Sie mir bitte mitteilen, wie ich das Jetson Nano IDK wie das PC IDK lassen kann? Ich habe einige Einstellungen für mein Experiment Ich hatte mein PC-Experiment beendet, aber jetzt muss ich auf die Jetson Nano-Plattform umsteigen. Unten sind meine schematischen Diagramme, die die PC-Plattform und die Jetson-Nano-Plattform darstellen. Mein erwarteter Effekt ist, dass die Jetson Nano-Plattform mit den gleichen Einstellungen wie die PC-Plattform angepasst werden kann. Sie wissen nicht, ob es ein Paket oder Update gibt, das diese Funktion unterstützt? Meine Jetpack-Version ist 4.3. Ich habe versucht, das Paket der Exe-Datei über Wine zu installieren. Offensichtlich gibt es einige Probleme bei der Installation. Ich frage mich, ob es andere Lösungen gibt?

would you please let me know how to let the Jetson Nano IDK as like the PC IDK? I have some settings to setting for my experiment I had finished my PC experiment,but now I have to transplant to Jetson Nano platform. Below are my schematic diagrams, representing the personal computer platform and the jetson nano platform. My expected effect is that the jetson nano platform can be adjusted with the same settings as the PC platform. Don't know if there is a package or update that supports this feature? My jetpack version is 4.3. I have tried to install the package of the exe file through wine. Obviously, there are some problems in the installation. I wonder if there are other solutions? jn-colorindex PC-iccapture ?

TIS-Stefan commented 2 years ago

Hallo

Es tut mir leider, aber die Kameraeigenschaften von Windows und Linux unterscheiden sich sehr, da unterschiedliche Treiber verwendet werden. Es bleibt Ihnen nur die Möglichkeit, die Kameraeigenschaften so einzustellen, daß Sie ein ähnliches Bild wie in Windows erhalten. Bei weißabgleich wäre das Linux 64 = 1.0 in Windows. Daraus folgt:

Rot 64 1,59 = 101 Grün 64 1,08 = 69 Blau 64 *1,596 = 101

Ich hoffe, daß das weiterhilft.

Hello

I am sorry, but the camera properties of Windows and Linux are very different, because different drivers are used. Your only option is to adjust the camera properties to get a similar image as in Windows. For white balance this would be Linux 64 = 1.0 in Windows. From this follows:

Red 64 1.59 = 101 Green 64 1.08 = 69 Blue 64 *1,59 = 101

I hope that this helps.

Stefan

FantasticCHH commented 2 years ago

Tcam Capture - Resolution

resolution2

excuse me, for this setting about the resolution on Jetson Nano. I get the setting on my PC platform. I used the choice about RGB 1024*768 But on Jetson Nano do not have this choice , and also the format do not have RGB,do I have another plan to cover this question? Thanks you for the your answer

TIS-Stefan commented 2 years ago

Using v4l2 for USB cameras has a limited list of video formats only. You may access the camera by USB3Vision using Aravis (use tiscamera 1.0 (git checkout development) for this) and build with Aravis support. Then you can set many formats.

FantasticCHH commented 2 years ago

sorry for bothering,about the aravis: I didn't understand some news what you teach me. :( can you teach me how can I do for that? I have no idea about this . I just try to install TCAM_ARAVIS_USB_VISION DBUILD_LIBUSB and DBUILD_V4L2 But the question do not been fix. poorly...

TIS-Stefan commented 2 years ago

Some background information: v4l2 reads the available video formats and their frame rates from the USB descriptor in the camera. The USB descriptor in the camera has limited space, therefore, we can store only some video formats and frame rate in there. The camera itself has millions of formats and frame rate combinations, but you simple can not store them in the USB descriptor of the camera. Here we use USB3Vision instead of v4l2. With USB3Vision we can specify the width and height and the frame rate we want to use. The camera tells us, whether this is a valid format. For USB3Vision, we use the open source Aravis library.

Did you build tiscamera on your own or did you install the package?

Package: Aravis / USB3Vision support is built in.

Build on your own: Run cmake as shown in the "Readme" at https://github.com/TheImagingSource/tiscamera:

git clone https://github.com/TheImagingSource/tiscamera.git
cd tiscamera
# only works on Debian based systems like Ubuntu
sudo ./scripts/install-dependencies.sh --compilation --runtime
mkdir build
cd build

# With ARAVIS:
cmake -DBUILD_ARAVIS=ON ..

make
sudo make install

After you did so, tcam-capture will show your camera twice with the backend "v4l2" and "aravis" shown after the serial number.

Give that a try.

Stefan

FantasticCHH commented 2 years ago

Thanks for your teaching. I were try to install as like your teaching steps. It's looks like as you say. device But at the format and resulation,it did not have the choice as like PC platform S__140206082 S__140206084 pc resulation How can I create it ,or update this function?

TIS-Stefan commented 2 years ago

The serial number with extension "-aravis" is not offered?

The do following:

cd tiscamera
cd build
rm * -rf
# With ARAVIS:
cmake -DBUILD_ARAVIS=ON ..

make
sudo make install

The "rm * -rf" is new. Sometimes cmake does not overwrite as wanted...

Stefan

FantasticCHH commented 2 years ago

I were tried it again,but the UI interface do not be exchange.as like I posted the img format and resulation still not have the choice which I want to choose(format:RGB,Resulation:1024*768). device

also, I try to install th code: gst-launch-1.0 tcamsrc serial=18714599! videoconvert! video/x-raw,format=RGBx,width=1024,height=768,framerate=30/1!videoconvert!ximagesink But also it do not be install successfully

TIS-Stefan commented 2 years ago

Hello The camera is listed only once? Please show me the output of tcam-ctrl -l

Stefan

FantasticCHH commented 2 years ago

this is the img of "tcam-ctrl -l" but looks not install aravis well I'm trying another time.but at the step of "make" ,looks not successfully . I don't know why.poorly l

TIS-Stefan commented 2 years ago

WTF?? The instructions I gave work on all other computers. Did you also add the ".." to the cmake command?

Stefan

FantasticCHH commented 2 years ago

yes~ I also add ".." but it show m make-error e

TIS-Stefan commented 2 years ago

ok, there is an error, so it can not work

please sudo rm * -rf in the build run cmake ...... again and show the output.

Stefan

FantasticCHH commented 2 years ago

I did it again and again, but it still error again and again. Do you know how can I fix it ?or download it again?

TIS-Stefan commented 2 years ago

You have a "permission denied" error. So it is something with user rights on your computer. You may try sudo cmake ..... Which usually is not a good idea.

TIS-Stefan commented 2 years ago

Arrrgh! I forgot one point. In order to use usb3vision, tiscamera must be built with that. So the cmake command expands to

cd tiscamera
cd build
rm * -rf
# With ARAVIS:
cmake -DBUILD_ARAVIS=ON -DTCAM_ARAVIS_USB_VISION=ON ..

make
sudo make install

Please apologize, that I missed that one and wasted your time.

Stefan

FantasticCHH commented 2 years ago

I were followed the tips ,but it still have a big trouble. I don't know why.poorly Do you use the same jetson system machine to install? I have no idea now.... install1 install2 install3 install4

TIS-Stefan commented 2 years ago

Run "sudo make". Then "sudo make install

FantasticCHH commented 2 years ago

my install step: tiscamera/build

Finished~ But the format still not have the RGB choice Resolution still not have 1024*768 :( what the problem it is .

TIS-Stefan commented 2 years ago

Please show the output of tcam-ctrl -c 1871459n-aravis

Please replace the "x" with the missing number of the serial number of your camera.

Stefan

FantasticCHH commented 2 years ago

I am so sorry about waste your time . Screenshot from 2022-05-17 21-44-24

But I do not have answer

TIS-Stefan commented 2 years ago

Hmm

Something cleary went wrong. From the documentation at https://www.theimagingsource.com/documentation/tiscamera/building.html?highlight=usb3vision you can see, what I meant.

I did the building steps 100 times on my computers and they always worked as expected.

Can you check the firmware version of your camera? It was not built in Germany, so I do not have access to the databases.

FantasticCHH commented 2 years ago

this web is the camera drive which I were using on the PC platform.I can install the camera drive (.exe) documentation to let it run on my computer. Before I ask I had tried to use wine to let it can be install on jetson nano platform.But it can't be use successfully. thanks for your help. I have no idea :( I don't know is that the problem for the ubuntu18.04 or jetson nano or not. that make me in the biggest trouble https://www.theimagingsource.tw/%E7%94%A2%E5%93%81/%E5%B7%A5%E6%A5%AD%E7%9B%B8%E6%A9%9F/usb-3.0-%E5%BD%A9%E8%89%B2/dfk33up1300/

TIS-Stefan commented 2 years ago

Jetson nano is not the problem. Ubuntu 18.04 is not the problem. Please change into tiscamera/build/tools/firmwareupdate run sudo ./firmwareupdate -i -d nnnnnnnn

Show me the output. "nnnnnnnn" is to be replaced by your camera's serial number. You camera is from 2017, so we may have an old firmware.

FantasticCHH commented 2 years ago

this photo is from tiscamera/build/tools/firmware-update

firmware

TIS-Stefan commented 2 years ago

Version 781 is recent. It implements USB3Vision protocol.

ok. last try

cd tiscamera
cd build
rm * -rf
cd ..
git checkout development
cd build
cmake -DTCAM_ARAVIS_USB_VISION=ON -DTCAM_BUILD_ARAVIS=ON -DTCAM_DOWNLOAD_MESON=ON ..
make
sudo make install

It uses a different Aravis version. And it is the tiscamera 1.0 release candidate

FantasticCHH commented 2 years ago

it is looks like some proble lasttry2 lasttry-1 m

TIS-Stefan commented 2 years ago

"Permission denied" always points to user right issues on your system. maybe sudo rm *-rf in build directory helps.

FantasticCHH commented 2 years ago

I already do that operate but it looks not fix the problem. :( Screenshot from 2022-05-17 23-32-07 Screenshot from 2022-05-17 23-31-44

TIS-Stefan commented 2 years ago

It seems, your Linux knowledge is a little bit limited, right?

I suggest to continue tomorrow.

Since you seem to be from Asia, you may contact my colleagues in Taipeh https://www.theimagingsource.com/company/contact/ Maybe they can help directly on your computer using Anydesk or Teamviewer.

FantasticCHH commented 2 years ago

Oops ,yes.. Thanks for your teaching. This is my first to use this .. Just keep practicing . or you can give me some new knowledge let me try myself?

FantasticCHH commented 2 years ago

excuse me for the same question before I ask your colleagues in Taipei your colleagues had already try to install on the jetpack version 4.5 I got to try jetpack package version: 4.3 4.4 It's also do not have aravis development version could you please let me know how to find the aravis version? I've been stuck on this issue for a long time.. :(

TIS-Stefan commented 2 years ago

I have the suspect, you already asked my colleagues in Taipeh.

However, we found, the DFG 33UP1300 does not work with Aravis, the frame rates are not listed. We do not know why that happens, all other cameras work.

Please go in contact with my Asian colleagues, as I mentioned.

Also: tiscamera installs the correct Aravis version. You do not need to bother about this.

Stefan

FantasticCHH commented 2 years ago

As I said, I have already consulted with your colleagues in Taipei. 123

TIS-Stefan commented 2 years ago

I am sorry for misunderstanding.

However, they asked me too and we found the issue of the DFK 33UP1300 with Aravis.

FantasticCHH commented 2 years ago

We are looking forward to your helpful answer to the issue.

TIS-Stefan commented 2 years ago

Hello

you can try this: Please download the file(s)

Until now, I had time to test it on AMD64. The DFK 33UP1300 works well with v4l2 and aravis.

Install with sudo apt install ./tiscamera_1.0.0.3995~development_3e7c334a_arm64_ubuntu_1804.deb

Then run tcam-capture.

However, release tests are pending.

Stefan

FantasticCHH commented 2 years ago

Thanks for your help,this gave me a lot of support. By the way,could you help me to add the choice Include(Format:RGB,Resolution:1024*768,FPS:120)

S__141197315 S__141197317 S__141197318

TIS-Stefan commented 2 years ago

Hello

The list in the program tcam-capture is limited, we made a selection of the millions of formats you can set. In your own program you can use a pipeline like tcambin ! video/x-raw, format=BGRx, width=1024, height=768, framerate=120/1 ! videoconvert ! ximagesink

You can test this on the command line with gst-launch-1.0 tcambin ! video/x-raw, format=BGRx, width=1024, height=768, framerate=120/1 ! videoconvert ! ximagesink

On Thu, 26th May 2022 at 6:29, TheImagingSource/tiscamera @.***> wrote:

Thanks for your help,this gave me a lot of support. By the way,could you help me to add the choice Include(Format:RGB,Resolution:1024*768,FPS:120) [https://user-images.githubusercontent.com/63339132/170415954-b12bfd6d-accd-4a9c-979b-8e42a8509df6.jpg] [https://user-images.githubusercontent.com/63339132/170415959-e4af6d47-acaa-4f37-abcd-153ab18e30a1.jpg] [https://user-images.githubusercontent.com/63339132/170415962-3c0ccd0c-503f-440e-b632-9ae34732b74e.jpg] — Reply to this email directly, view it on GitHub [https://github.com/TheImagingSource/tiscamera/issues/464#issuecomment-1138141315], or unsubscribe [https://github.com/notifications/unsubscribe-auth/ABALVSCAAICETONYMI7FSJ3VL34XFANCNFSM5V2H4SUQ]. You are receiving this because you commented. [https://theimagingsource.deskpro.com/file.php/3266289MRSQMWCTHRBNMMC0/image8561.gif?sc=0-utvmxvrdgh-f79d51927416b28c5903f2d67d733849201318d1]Message ID: @.***>

  Was this message helpful?   Yes   [https://theimagingsource.deskpro.com/ticket-rate/VNFT-2227-QDAF/WA3B2QAM7CDTSZN/400484?setrating=1]   It was OK   [https://theimagingsource.deskpro.com/ticket-rate/VNFT-2227-QDAF/WA3B2QAM7CDTSZN/400484?setrating=0]   No   [https://theimagingsource.deskpro.com/ticket-rate/VNFT-2227-QDAF/WA3B2QAM7CDTSZN/400484?setrating=-1]

View and manage this ticket online: https://theimagingsource.deskpro.com/tickets/83729

  The Imaging Source [https://www.theimagingsource.com] · https://theimagingsource.deskpro.com/

(#ETWJWA3B2QAM7CDTSZN)

   

FantasticCHH commented 2 years ago

I got to use"gst-launch-1.0 tcambin ! video/x-raw, format=BGRx, width=1024, height=768, framerate=120/1 ! videoconvert ! ximagesink " ,it couldn't be added. By the way, I got to try the format choice and it can't be exchanged. resolution can be exchanged successfully,and also I let the FPS choice be exchanged sometimes it will let the Jetson Nano error , I have to restarted the machine.But it can't be troubleshooting.

gsterror .

TIS-Stefan commented 2 years ago

Hello

you must pass the serial number and the backend to the tcambin, otherwise, it does not know, how to use the camera;

gst-launch-1.0 tcambin serial=18714599-aravis ! video/x-raw, format=BGRx, width=1024, height=768, framerate=120/1 ! videoconvert ! ximagesink

Stefan

FantasticCHH commented 2 years ago

It couldn't be installed. 0601

TIS-Stefan commented 2 years ago

Please try the release version:

https://we.tl/t-yCzjdpfuOG

Download and install.

FantasticCHH commented 2 years ago

I got already do it.And try to do it (gst-launch-1.0 tcambin ! video/x-raw, format=BGRx, width=1024, height=768, framerate=120/1 ! videoconvert ! ximagesink) again.But the problem isn't been fixed.

TIS-Stefan commented 2 years ago

The link above is a newer version, than the one I sent previously. Therefore, please dowload & install.

FantasticCHH commented 2 years ago

sure.I know~I got already download it,and finished install .After that ,I got already try it again.But it isn't been fixed.

TIS-Stefan commented 2 years ago

Runs perfectly on my desktop computer.

please run tcam-ctrl --version and show the output. It must be

Versions: 
    Tcam:   1.0.0_development/12cac40d_rev_3997
    Aravis: 0.8_version_12cac40d
    Modules:    gst_aravis_arvu3v_v4l2_libusb_tools_doc_tests

run tcam-capture and make sure, the trigger mode is disabled.

FantasticCHH commented 2 years ago

I run the code tcam-ctrl --version The answer is as like yours (I try it on my Jetson Nano) And also try this(gst-launch-1.0 tcambin!video/x-raw,format=BGRx,width=1024,height=768,framerate=120/1!videoconvert!ximagesink) It can't be installed

TIS-Stefan commented 2 years ago

Its a Nano issue. Working on that.

TIS-Stefan commented 2 years ago

DFK 33UP1300 will provide smaller resolutions using Aravis, but with 1024x768 there are issues with the USB transfer on the Nano. This could be worked around by a hack in Aravis, but this does not work stable. This issue is a combination of Nano and this camera only . Therefore, we wont solve it in the DFK 33UP1300. The other DFK 33U work fine, which of course points to a flaw in the DFK 33UP1300.

You may consider to stay a v4l2 and use a higher resolution and lower frame rate compared to 1024x768 resolution. With the videocrop module https://gstreamer.freedesktop.org/documentation/videocrop/videocrop.html?gi-language=c, you can get the smaller image you need.

Why do you need the 1024x768 resolution?

Stefan