Multi-camera setup project. - page 35 - Creative Uses of CHDK - CHDK Forum  

Multi-camera setup project.

  • 462 Replies
  • 191221 Views
*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #340 on: 27 / December / 2015, 09:07:11 »
Advertisements
@waterwingz

As i can see , there is only one version of the sources (of im/cd/iup)..and thats logic

For example
http://sourceforge.net/projects/canvasdraw/files/5.9/Docs%20and%20Sources/

You see actually only one source package.
On the other hand , there are several pre-built binaries of these packages..and i hope i am picking the right one :)

@reyalp

First of all , just to clear things ...i am not using chdkptp on some linux distro..or want/wish to change the linux version of it.
I am just getting bored from times to times and mess around with "things". :)

After yesterday's failure , i thought to try my luck with Manjaro (Arch-based) since many packages that dont exist on official repos..exist in the community repo (aka https://aur.archlinux.org/)

As expected all packages were there

iup -> https://aur.archlinux.org/packages/iup-gtk/
im ->https://aur.archlinux.org/packages/im/
cd -> https://aur.archlinux.org/packages/cd/

with all the necessary dependencies in place and pre-recorded compile/installation steps in the PKGBUILD file.

im and cd compiled and installed correctly...no dramas there.

iup , was a mess..every time iup is the messy one.It uses packages that now are newer versions and different names..and it ends up to some unresolved errors .

So the whole project was once , a fail :)


So i thought to try the other thing i was thinking yesterday...a locally compiled chdkptp with everything in local files.

1. I compiled lua 5.3 locally.
2. I used pre-built binaries of iup/cd/im locally (i dont even know if im is ever used in this scenario...but..its there if needed)
3.Tried to mess around with chdkptp config files..to use lua 5.3 and the local libs/headers of lua/cd/iup.

So after all these..i ended up here

Code: [Select]
gcc -o chdkptp lfs/lfs.o properties.o ptp.o chdkptp.o lbuf.o liveimg.o rawimg.o luautil.o sockutil.o  -g -L./lua-5.3.2/src/ -L./iup-3.17/ -L./cd-5.9/ -liuplua53 -liupluacd53 -lcdlua53 -llua -liupcd -lcd -liup -lusb -lfreetype -lz -lm -ldl -lreadline -lhistory
/usr/bin/ld: cannot find -liupcd
/usr/bin/ld: cannot find -liup
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'chdkptp' failed

I am missing something in the config files...i guess...with the name declaration of libs...or something....


Just to mention once again , i am simply messing around with this..no need to lose your sleep over it...:)


EDIT : That link created that really big blank space..can't help it..sorry.
« Last Edit: 27 / December / 2015, 09:12:02 by mphx »

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #341 on: 27 / December / 2015, 15:12:15 »
Here again :)

Today , i played with another installation (Ubuntu 15.10)

The whole compiling process was problematic.

So , after alot of tries and alot of "dirty" fixes in the configuration files of almost every package involved (cd/im/iup/chdkptp) i managed to compile a standalone chdkptp.

You can find it in the following link https://www.dropbox.com/s/9wvpk4r905vx70h/chdkptp-r690-standalone.tar.gz?dl=0

It contains locally compiled im/cd/iup (latest versions) and lua 5.2.
Chdkptp is r690 and it is working well (in a first glance).

I tested it in another linux installation (Manjaro) to check if it is indeed standalone..if it can work in another environment and it worked.

Give it a try :)

Someone could keep the same folders and just use the next versions as they come from reyalp (binary or source)..and it can be transferred and work anywhere ..theoretically.

Compiling all the involved packages was a nightmare..fixes over fixes...so in case someone would like to compile the next version of chdkptp against these pre-compiled packages (cd/im/iup) , it might not be that easy :)
« Last Edit: 27 / December / 2015, 15:14:57 by mphx »

*

Offline reyalp

  • ******
  • 14079
Re: Multi-camera setup project.
« Reply #342 on: 27 / December / 2015, 15:16:06 »
On the other hand , there are several pre-built binaries of these packages..and i hope i am picking the right one :)
If you go to the file downloads for each project, pretty much every previous version is available, e.g. http://sourceforge.net/projects/iup/files/ there is both source and binaries in each version directory. The directory you linked to was the 5.9 subdirectory, so it only has one source.

Quote
After yesterday's failure , i thought to try my luck with Manjaro (Arch-based) since many packages that dont exist on official repos..exist in the community repo (aka https://aur.archlinux.org/)
Personally, I'd suggest picking one distro, and working methodically through each problem/error rather than trying stuff and hoping it works.

If you are willing to switch distros, just use ubuntu 14.04 64 bit (later versions and other debian based distros have a good chance of working too), download the pre-built chdkptp binary I provide and the exact libraries listed in the change log. Then all you have to do is edit chdkptp-sample.sh

You should also be able to build with the libraries.

Quote
So i thought to try the other thing i was thinking yesterday...a locally compiled chdkptp with everything in local files.

1. I compiled lua 5.3 locally.
How many times did I advise against using Lua 5.3?!

Quote
Code: [Select]
gcc -o chdkptp lfs/lfs.o properties.o ptp.o chdkptp.o lbuf.o liveimg.o rawimg.o luautil.o sockutil.o  -g -L./lua-5.3.2/src/ -L./iup-3.17/ -L./cd-5.9/ -liuplua53 -liupluacd53 -lcdlua53 -llua -liupcd -lcd -liup -lusb -lfreetype -lz -lm -ldl -lreadline -lhistory
/usr/bin/ld: cannot find -liupcd
/usr/bin/ld: cannot find -liup
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'chdkptp' failed
This error means the compiler didn't find those libraries. The most likely causes are:
1) The directories (*_LIB_DIR) are not correct
2) the library names have changed in the version of the libraries you are using. AFAIK recent versions have switched to making seperate libraries for Lua 5.2 and 5.3, which may involve name changes. This kind of thing is the reason I recommend using specific Lua and library versions.

You find out which is the cause by looking for e.g. libiup.so (or maybe libiup.a) in the directories specified by IUP_LIB_DIR etc in config.mk.

FWIW, although it will probably work in this case I would generally avoid using relatives paths (like ./foo) when specifying the library paths, since it will break if the build process uses multiple directories.

edit:
Glad to see you got it working :)

« Last Edit: 27 / December / 2015, 16:26:29 by reyalp »
Don't forget what the H stands for.

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #343 on: 27 / December / 2015, 17:09:39 »
@reyalp

waterwingz said (if i remember well) if i am picking the right source file...

I am just saying , there is only one source file for each package (either im , cd , iup) and multiple pre-built binaries.
I just linked the "cd" source subdirectory to point out exactly this.
Same thing applies to iup and im file list...

About distros..

I am not using linux for primary o/s (i have weird laptop hardware...) , i just have some of them in vmware.
I like trying several , finding the "best" one , the most organized one ..for future use :)
Thats why i am trying things in several distros...just for messing around :)

About lua 5.3

You advised against that alot of times..but i have bleeding edge hardcoded in my dna..its a bad thing sometimes..but...i cant help it :)

About the whole project

I dont think its im/cd/iup 's fault..i think as i said before..the creators of them...dont like to organize things better somehow..
They could easily distribute pre-built binaries packages (rpm,deb etc) , so at some point distros can put them in official repos.
If you try to compile them from source , you see that even if these packages can be compiled for lua5.3 , config files are still written to search previous versions.
Maybe for someone who knows his way around config files its easy task..i was lost at some point..going for one config file to another..searching the spots to change .
Anyways...

About chdkptp

I know you dont have the time to change/optimize something (GUI i mean) that does its job rather well ..or probably you have better things to do..
but i was looking around , and there are several gt/gtk/whaterver with lua extensions out there (e.g. http://wxlua.sourceforge.net/) with  "normal" dependencies than im/cd/iup.
Wish i knew stuff and how to do something about this , but i have no clue about these things :)

Just saying..

About standalone package.

This package i made , probably will work in different environments , although some subfolders there ,are messy..just throwing the files in the places programs were expecting to find them...
But in bottom line..maybe at some point , you can try standalone packages for more flexibility :)


*

Offline reyalp

  • ******
  • 14079
Re: Multi-camera setup project.
« Reply #344 on: 27 / December / 2015, 18:07:40 »
I am just saying , there is only one source file for each package (either im , cd , iup) and multiple pre-built binaries.
I don't understand the point then? Of course there is only one source package per release ???

What I think waterwingz was trying to say is that you might avoid some problems by using library versions that are already known to work, e.g. IUP 3.10.1 and CD 5.7. You are welcome to try to use newer versions, but you are a far more likely to run into problems.
Quote
You advised against that alot of times..but i have bleeding edge hardcoded in my dna..its a bad thing sometimes..but...i cant help it :)
OK. It's more than a little frustrating for me that you come here and complain about how difficult it is, and then repeatedly ignore advice on how to minimize the difficulty.

I know you've said you are just messing around, but at the same time you keep suggesting I redo the GUI from scratch, which would probably be hundreds of hours of work :blink:
Quote
They could easily distribute pre-built binaries packages (rpm,deb etc) , so at some point distros can put them in official repos.
If you try to compile them from source , you see that even if these packages can be compiled for lua5.3 , config files are still written to search previous versions.
Maybe for someone who knows his way around config files its easy task..i was lost at some point..going for one config file to another..searching the spots to change .
Again, I specifically recommended against trying to build them yourself.

Maybe I've just been lucky, but all I've ever had to do with the IUP/CD pre-built binaries is download, unpack, and adjust the chdkptp makefile and LD_LIBRARY_PATH to point at them. Sometimes adjustments are needed between versions, which is why I recommend using specific versions I've tested.

I will consider making full packages for future releases.
Don't forget what the H stands for.

Re: Multi-camera setup project.
« Reply #345 on: 03 / March / 2016, 07:06:10 »
@reyalp

1. Zoom -
So an idea popped to issue a set_aflock(1) before set_zoom..and TAAA-DAAA ..lens moved!
And i created another button in the GUI , with exactly what you said.. !mc:cmd('call ... your lua code').Worked like a charm.

I've been following this thread but I can't understand this...
can you tell me what you did step by step for this zoom command, I really dont understand how to zoom all cameras with chdkptp multicam



Hi elizabeth.m
Can you share the lua scripts for CHDKPTP GUI and if possible, how to create buttons and link them to commands.


I'm testing multiple camera setup through command line (Windows) and would be happy if I can create a GUI.
« Last Edit: 03 / March / 2016, 07:08:51 by Kam_mim »

*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #346 on: 19 / June / 2016, 20:40:32 »
Hey all ,


@reyalp


We are facing a tiny problem in our project..not exactly a problem but we'd like something to be done differently and i'd like your input on it.


We have set the cameras to shoot twice in a 5sec time frame with the command


Code: [Select]
mc:shoot{shots=2,interval=5000,synctime=100}

We tried to lower the time as much as possible , but from a point and beyond cameras are losing their sync.So the lower it can go is 5 secs (for the Canon A2500)


We are experiencing with some Canon ixus 160 , and while we dont have many , so we cant be sure about our test results -one thing to test times in 2-3 cameras and another in >60)..we noticed that ixus 160 can shoot "faster"


So my question is , how can we lower the multiple shooting times ?
I am guessing that at some point its all about hardware...but i noticed and correct me if i am wrong that the above command , does a "preshoot" before every shoot...so maybe somewhere there time is lost.


Is it possible to issue only one preshoot to all cameras and a "shoot" command that does simply that...shooting..without checking anything...just...shoots?
Can it be done by putting cameras into continuous mode and do something like :


1. preshoot
2. shoot_pressed_on (continuous mode will force cameras to shoot as fast as possible as this state is on)
3. shoot_pressed_off (cameras stops shooting)


We just want multiple shoots..synced in as little possible time...


Thanks in advanced for any input on this matter.

*

Offline reyalp

  • ******
  • 14079
Re: Multi-camera setup project.
« Reply #347 on: 19 / June / 2016, 21:55:15 »
We have set the cameras to shoot twice in a 5sec time frame with the command

Code: [Select]
mc:shoot{shots=2,interval=5000,synctime=100}
We tried to lower the time as much as possible , but from a point and beyond cameras are losing their sync.So the lower it can go is 5 secs (for the Canon A2500)


We are experiencing with some Canon ixus 160 , and while we dont have many , so we cant be sure about our test results -one thing to test times in 2-3 cameras and another in >60)..we noticed that ixus 160 can shoot "faster"


So my question is , how can we lower the multiple shooting times ?
I am guessing that at some point its all about hardware...but i noticed and correct me if i am wrong that the above command , does a "preshoot" before every shoot...so maybe somewhere there time is lost.
If it's working correctly, the mc:shoot() command should only pre-shoot once, not for every exposure. If shots is more than 1, it should keep half shoot held down and click shoot_full_only for each shot.

It could be modified to use continuous mode (holding down shoot_full_only and using hooks to control interval), but on low end cameras like a2500 I suspect this would not make much difference.

5 seconds seems very slow, unless you are shooting raw.

It really shouldn't matter how many cameras there are, because after the first shot each camera is just running on it's own: The first shot is synced, the remaining shots are just at the previous shot time +interval

It seems like we had a discussion like this before https://chdk.setepontos.com/index.php?topic=11667.msg124809#msg124809 without any real solution.

It's possible there are bugs in the shoot_burst logic. It seems to work for me with one camera, but really testing it probably requires adding some debug code.
Don't forget what the H stands for.


*

Offline mphx

  • ***
  • 210
Re: Multi-camera setup project.
« Reply #348 on: 19 / June / 2016, 22:20:28 »
@reyalp


First of all we are not shooting raw.
5secs is slow...and if we lower it , we hear the shooting clicks getting out of sync.At 5secs the "clicks" are all synced.Someone could think that "hearing" isn't a sure confirmation.But it is..photos are not synced judging from the result since in some of them the person has moved....so the photos were not synced.


Thing is that in between the two shots we project a pattern to the person being shot (pattern from projectors).And i wonder if the change in brightness produced by this pattern causes the cameras to re-focus or re-adjust iso/exposure and stuff like this (although we setup these values before every shoot)..so it wastes time..I may saying stupid things here...


And as i mentioned  before , ixus 160 shoots faster than a2500 ..maybe its partially a hardware limitation...of how fast can the camera shoot.


Anyways if we can't find a solution to lead us to shoot only once (not going to happen any time soon as long as we have cheap compact cameras) , fast multiple shooting will be always an issue.


EDIT : now that i am thinking of it , you are right ...preshoots only once and then shoots as many times as it has been set up.I have seen that camera struggles during multiple shots.What i mean by struggle is that shoots-photo taken remains for msecs in display-it goes back to rec mode display-shoots the next one.Something like that.
So its all going down to how fast the 2 steps (photo taken remains-go back to rec mode display) are happening.
I saw that in ixus 160 , this whole thing goes down faster than a2500 , thats why i said that partially maybe its a hardware thing/limitation since as you said after the first shot camera is running on its own...
« Last Edit: 19 / June / 2016, 22:22:54 by mphx »

*

Offline reyalp

  • ******
  • 14079
Re: Multi-camera setup project.
« Reply #349 on: 19 / June / 2016, 22:52:21 »
Thing is that in between the two shots we project a pattern to the person being shot (pattern from projectors).And i wonder if the change in brightness produced by this pattern causes the cameras to re-focus or re-adjust iso/exposure and stuff like this (although we setup these values before every shoot)..so it wastes time..I may saying stupid things here...
If the script is working, half press is held down and none of these things should be updated between shots.

Quote
And as i mentioned  before , ixus 160 shoots faster than a2500 ..maybe its partially a hardware limitation...of how fast can the camera shoot.
It is extremely unlikely that a2500 can only sustain 1 shot every 5 seconds.
According to the specs, it can do 0.8 FPS in continuous mode. On most low end cams, holding half shoot and clicking full gives similar performance. It might be a bit slower, but should not be ~4x worse.

As I mentioned before, having multiple cameras should not affect performance. Testing what rate a single a2500 can sustain would be a good place to start. I'll see if I can come up with a simple script to check this.

Quote
I have seen that camera struggles during multiple shots.What i mean by struggle is that shoots-photo taken remains for msecs in display-it goes back to rec mode display-shoots the next one.Something like that.
Is "review" enabled in the canon menu?

Don't forget what the H stands for.

 

Related Topics