[tiy] Re: TIY: camera ID initialisation under Windows

  • From: Andre Gaschler <gaschler@xxxxxxxxxxx>
  • To: Charles Blouin <cha.blouin@xxxxxxxxx>
  • Date: Thu, 03 Jul 2014 10:03:12 +0200

Hi Charles,
I'm copying to the list to have this archived.

We haven't had this before. However, we tested
the GigE interface much more thoroughly than the OpenCV
interface.
Can you please try two things:
1. Hardcode the correct ids directly in OpenCVStereoCamera::open,
compile, test.
2. If that doesn't work, try a minimal OpenCV program that directly
uses both openCam commands.

Hope this helps.
-Andre

On 07/01/2014 07:22 PM, Charles Blouin wrote:
> Hello Andre,
>
> Thanks for your reply. Now, if I write :
>
>    <left_camera_id>"0"</left_camera_id>
>    <right_camera_id>"0"</right_camera_id>
>
> I get the information from one of the camera. The following code works
> with the second camera:
>
>    <left_camera_id>"1"</left_camera_id>
>    <right_camera_id>"1"</right_camera_id>
>
> However, with this: 
>
>    <left_camera_id>"0"</left_camera_id>
>    <right_camera_id>"1"</right_camera_id>
>
> I obtain the error message: 
> OpenCVStereoCamera: openCam() - could not initialize OpenCV camera(s).
> OpenCVStereoCamera: openCam() - available OpenCV camera id's <<20>
> are: 0, 1, 2, 3, 4, 5, 6, 7 ,8 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
> MarkerTracking:: connectStereoCamera() failed
>
>
> ____________________________
> Charles Blouin
>
> Candidat, M.Sc. Génie Mécanique
> M.Sc. Mechanical Engineering Candidate
> University of Ottawa, CBY B08B
> (613) 600-2311
> cblou045@xxxxxxxxxx <mailto:cblou045@xxxxxxxxxx>
>
>
> On Mon, Jun 30, 2014 at 4:20 AM, Andre Gaschler <gaschler@xxxxxxxxxxx
> <mailto:gaschler@xxxxxxxxxxx>> wrote:
>
>
>     Hi Charles,
>
>     since it is extremely common, first check that you change the
>     input source setting in
>      config_run_parameters.xml
>      <input_src>v</input_src>
>     from the sample video to
>      <input_src>o</input_src>
>     for OpenCV, or
>      <input_src>b</input_src>
>     if you use GigE cameras.
>     You probably have, because you see one of your own cameras,
>     but I'm just repeating this for the mailing list because this is
>     extremely common.
>
>     For your camera IDs in
>      config_camera.xml
>      <left_camera_id>"Basler-21050001"</left_camera_id>
>     defines the ID that is used in the GigE driver (Basler in Windows
>     or Aravis in Linux)
>
>     With the OpenCV camera interface, please have a look at
>      OpenCVStereoCamera.cpp
>     The IDs from the constructor
>      std::string& camera_id_left, std::string& camera_id_right
>     are mapped to numbers 0, 1 in line 27f
>      camera[LEFT].open(atoi(camera_id[LEFT].c_str()));
>     These numbers are exactly those you would use in the native OpenCV
>     camera
>     interface.
>     Therefore, please write [0, 1] in <left_camera_id></left_camera_id>
>     hardcode-overwrite them in the OpenCVStereoCamera.cpp constructor
>     if you are
>     compiling yourself.
>
>     Hope this helps.
>
>     -Andre
>
>
>
>
>     On 06/23/2014 01:16 AM, Charles Blouin wrote:
>>     Hi all,
>>
>>     I cannot obtain two different OpenCV camera feed into TIY under
>>     Windows. The wiki states:
>>
>>     When starting the /server/ program, an error should occur and all
>>     connected cameras listed. The appeared names/numbers need to be
>>     filled into the first two fields of
>>     the /config_camera.xml/ configuration file.
>>
>>     However, server.exe does not show an error. It simply shows me
>>     the video feed from the same camera for left and right, no matter
>>     what the IDs are in /config_camera.xml./
>>     /
>>     /
>>     I looked into the source code and online without success.
>>     /
>>     /
>>     Thank for your help,
>>     ____________________________
>>     Charles Blouin
>>
>>     Candidat, M.Sc. Génie Mécanique
>>     M.Sc. Mechanical Engineering Candidate
>>     University of Ottawa, CBY B08B
>>     (613) 600-2311 <tel:%28613%29%20600-2311>
>>     cblou045@xxxxxxxxxx <mailto:cblou045@xxxxxxxxxx>
>
>
>     -- 
>
>     Andre Gaschler
>     M. Sc.
>
>     fortiss --- An-Institut Technische Universitaet Muenchen
>     Guerickestrasse 25 | 80805 Muenchen | Germany
>     T +49 (0)89 360 35 22 544 <tel:%2B49%20%280%2989%20360%2035%2022%20544> | 
> Fx +49 (0)89 360 35 22 50 <tel:%2B49%20%280%2989%20360%2035%2022%2050>
>     gaschler@xxxxxxxxxxx <mailto:gaschler@xxxxxxxxxxx> | www.fortiss.org 
> <http://www.fortiss.org>
>
>     Amtsgericht Muenchen | HRB 176633 | Sitz Garching b. Muenchen
>     Rechtsform: gemeinnuetzige GmbH
>     USt-IdNr.:  DE263907002 | Steuer-Nr.: 143/237/25900 
> <tel:143%2F237%2F25900>
>     Geschaeftsfuehrer: Dr. Harald Ruess
>
>


-- 

Andre Gaschler
M. Sc.

fortiss --- An-Institut Technische Universitaet Muenchen
Guerickestrasse 25 | 80805 Muenchen | Germany
T +49 (0)89 360 35 22 544 | Fx +49 (0)89 360 35 22 50
gaschler@xxxxxxxxxxx | www.fortiss.org

Amtsgericht Muenchen | HRB 176633 | Sitz Garching b. Muenchen
Rechtsform: gemeinnuetzige GmbH
USt-IdNr.:  DE263907002 | Steuer-Nr.: 143/237/25900
Geschaeftsfuehrer: Dr. Harald Ruess

Other related posts: