Ubuntu 20.04 does not include opencv 3.2 that is needed by libArduCamLib.so.2.0.

Published by peter on

Home Forums Arducam USB Camera Shields Ubuntu 20.04 does not include opencv 3.2 that is needed by libArduCamLib.so.2.0.

  • This topic has 10 replies, 4 voices, and was last updated 1 month ago by wong.
Viewing 10 reply threads
  • Author
    Posts
    • #24116
      peter
      Participant

      Ubuntu 20.04 contains binaries for opencv 4.2. Is there a way to get a version of libArduCamLib .so that is linked against opencv 4.2?

    • #24160
      bin
      Keymaster

      Hello,

      We have not compiled the libarducam_camera.so file on ubuntu system. I will try to compiled it on it when I am free.

    • #24232
      peter
      Participant

      Thanks! I am using libArduCamLib.so.2.0.0 from ArduCAM_USB_Camera_Shield/Linux_x86/Cpp/Streaming_demo/Arducam_SDK.

    • #24264
      bin
      Keymaster

      OK. Wait my news.

    • #29396
      Nuno
      Participant

      Hello,

      I am having the same issue.
      I am working on a commercial project and we have acquired and high number of arducam’s (model AR0134-C).
      However, we need to use Ubuntu 20.

      Could you please compile the .so file in Ubuntu20 or provide the source code?

      Many thanks,
      Nuno

    • #29403
      wong
      Moderator

      Hi all,

      There is no reason for this, libArduCamLib.so.2.0.0 does not link the opencv library.

    • #29434
      Nuno
      Participant

      Hi wong, thanks for the reply.

      I actually realized I poorly formulated my question.
      My problem is not with opencv and libArduCamLib.so.2.0, but with libArduCamLib.so

      I followed the steps at this example but when I run make it gives me the following:

      g++ ArduCam_Demo.cpp Arducam_SDK/ArduCamLib.h -o ArduCam_Demo -lArduCamLib -lusb-1.0 -lpthread -larducam_config_parser pkg-config --cflags --libs opencv4 -L. -I. -std=gnu++11 -g
      /usr/bin/ld:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/libArduCamLib.so: file format not recognized; treating as linker script
      /usr/bin/ld:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/libArduCamLib.so:0: syntax error
      collect2: error: ld returned 1 exit status
      make: *** [makefile:8: ArduCam_Demo] Error 1

      I have checked and when I run make-install  the so files get copied to /usr/lib, so I am not sure why it seems to be looking for them in other place. And I also don’t understand where the file format not recognized; treating as linker script  comes from.

      If I run ls -ltr ./libArduCamLib.so I obtain:
      -rw-rw-r– 1 nuno nuno 22 out 19 11:06 ./libArduCamLib.so

      If I run file ./libArduCamLib.so I obtain:
      ./libArduCamLib.so: ASCII text, with no line terminators

       

      Is there something I can do about this?

      Thanks,
      Nuno

    • #29502
      wong
      Moderator

      Hi @Nuno

      libArduCamLib.so should be a soft link, I think some information may be lost when copying.
      Please try the following steps:
      cd Arducam_SDK/
      rm libArduCamLib.so libArduCamLib.so.2
      ln -s libArduCamLib.so.2.0.0 libArduCamLib.so
      ln -s libArduCamLib.so.2.0.0 libArduCamLib.so.2
      cd ..
      make install-sdk
      make clean && make

    • #29563
      Nuno
      Participant

      Hi wong,

      Many thanks for your reply again.

      I tried what you asked but I am still having problems.
      My question is, shouldn’t the compilation process create an executable of ArduCam_Demo?
      Because the default “make install-sdk && make clean && make” does not create an executable.
      What I have been trying is to, after running compilation, using “chmod +x ArduCam_Demo” and then run it as an executable, as per the instructions in the Github repository.

      However this just results in the following:
      ./ArduCam_Demo: 1: gpch+014Fo���/0�x?����wPx86-64generic__SSP_STRONG__ 3__DBL_MIN_EXP__ (-1021)__cpp_attributes 200809�__FLT128_MAX_10_EXP__ 4932
      __FLT_MIN__ 1.1__GCC_IEC_559_COMPLEX 2__UINT_LEAST8_TYPE__: not found
      ./ArduCam_Demo: 2: Syntax error: word unexpected (expecting “)”)

      Do you have any idea of what I could be doing wrong?
      Since I am using Ubuntu 20, which comes with opencv4, I also had to change the following line inside the makefile:
      LIBS = -lArduCamLib -lusb-1.0 -lpthread -larducam_config_parser pkg-config --cflags --libs opencv4

      Note the opencv4 instead of just opencv.

       

      Thanks again,

      Nuno

    • #29722
      wong
      Moderator

      Hi @Nuno

      I will test it, please be patient.

    • #29752
      wong
      Moderator

      Hi @Nuno

      I downloaded and installed ubuntu20.04 for testing, I did the operations I mentioned before and successfully compiled the executable file

      libArduCamLib.so should be a soft link, I think some information may be lost when copying.
      Please try the following steps:
      cd Arducam_SDK/
      rm libArduCamLib.so libArduCamLib.so.2
      ln -s libArduCamLib.so.2.0.0 libArduCamLib.so
      ln -s libArduCamLib.so.2.0.0 libArduCamLib.so.2
      cd ..
      make install-sdk
      make clean && make

      Please try again.

      • This reply was modified 1 month ago by wong.
Viewing 10 reply threads
  • You must be logged in to reply to this topic.