Page 1 of 1
correct rect for "cameracontrol"
Posted: Thu Apr 29, 2021 6:56 pm
by Klaus
Hi all,
we have this wonderful "cameracontrol" in LC.
Is there a way to get the physical resolution of the
devices camera BEFORE we:
Code: Select all
cameracontrollset "el camera", tRect,...
Or at least its aspect ratio? Know what I mean?
We definitively need this info to be able to set up a correct
RECT for the control with no "cut off" sides.
Maybe I am just overlooking something?
Best
Klaus
Re: correct rect for "cameracontrol"
Posted: Thu Apr 29, 2021 8:00 pm
by richmond62
1. dunno what that double 'L' is doing there.
Reading THIS:
-
-
I see 'rect' . . .
"rect": the bounds of the control, relative to the top-left of the card. For example "0,0,100,100"."
Mind you, this in INDY does nix:
Code: Select all
on openCard
cameraControlCreate "RM"
cameraControlSet "RM", "rect", (100, 100, 500, 300)
cameraControlSet "RM", "visible", "true"
cameraControlSet "RM", "device", "default"
end openCard
Re: correct rect for "cameracontrol"
Posted: Thu Apr 29, 2021 8:22 pm
by Klaus
richmond62 wrote: ↑Thu Apr 29, 2021 8:00 pm
1. dunno what that double 'L' is doing there.
Just teasing you!
You need a camera (a cheap-o webcam or whatever) attached to your computer to make the script work, of course.
But that was not my question!
Re: correct rect for "cameracontrol"
Posted: Fri Apr 30, 2021 3:49 pm
by Klaus
Solution from the mailing list. We can:
Code: Select all
...
put CameraControlGet(”myCamera”, ”qualityPresets”) into tList
...
which gives me on my Mac:
photo,high,medium,low,352x288,640x480,1280x720,320x240,960x540,iFrame960x540,iFrame1280x720
So I can "pull" out the desired dimensions.