Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BaslerPypylonTools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Markus Höschle
BaslerPypylonTools
Commits
3297a1d2
Commit
3297a1d2
authored
1 year ago
by
mhoeschle
Browse files
Options
Downloads
Patches
Plain Diff
add function at the end, above __name__ == ... to run from command line
parent
db587b29
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
BaslerChangeParameter.py
+6
-8
6 additions, 8 deletions
BaslerChangeParameter.py
with
6 additions
and
8 deletions
BaslerChangeParameter.py
+
6
−
8
View file @
3297a1d2
...
...
@@ -25,7 +25,7 @@ if len(devices) == 0:
# Create an array of instant cameras for the found devices and avoid exceeding a maximum number of devices. -> Output-> Pylon::CInstantCameraArray
CAMERAS_ARRAY
=
pylon
.
InstantCameraArray
(
min
(
len
(
devices
),
MAX_CAMERAS_TO_USE
))
print
(
f
'
cameras:
{
CAMERAS_ARRAY
}
'
)
#
print(f'cameras: {CAMERAS_ARRAY}')
# for debug
l
=
CAMERAS_ARRAY
.
GetSize
()
...
...
@@ -47,17 +47,13 @@ def listcams():
for
i
,
camera_instantz
in
enumerate
(
CAMERAS_ARRAY
):
# cam is an instance Swig object of type Pylon::CInstantCamera on cluster on HD
camera_instantz
.
Attach
(
tlFactory
.
CreateDevice
(
devices
[
i
]))
print
(
f
'
camInstatnt:
{
type
(
camera_instantz
)
}
'
)
#
# list all the connected cameras at the system:
#
print
(
f
'
camera_instantz:
{
type
(
camera_instantz
)
}
'
)
# Print the serial number of the model of the camera. - by replacing .GetSerialNumber() with .GetModelName() outputs the Modelname
cam_ids
=
camera_instantz
.
GetDeviceInfo
().
GetSerialNumber
()
print
(
"
Using device
"
,
cam_ids
)
return
cam_ids
return
cam_ids
,
camera_instantz
# Open cameras:
...
...
@@ -243,6 +239,8 @@ def freeruncam():
# ---> ongoing, not yet in usage.
CAM_ID
,
CAM_INSTANT
=
listcams
()
if
__name__
==
'
__main__
'
:
CAM_ID
,
CAM_INSTANT
=
listcams
()
readcams
()
#
readcams()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment