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
f73ccf27
Commit
f73ccf27
authored
2 years ago
by
Markus Höschle
Browse files
Options
Downloads
Patches
Plain Diff
update function and comments
parent
f90264ad
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
+35
-20
35 additions, 20 deletions
BaslerChangeParameter.py
with
35 additions
and
20 deletions
BaslerChangeParameter.py
+
35
−
20
View file @
f73ccf27
...
@@ -17,7 +17,7 @@ Function
...
@@ -17,7 +17,7 @@ Function
"""
"""
#
#
#
First step is to
list all the connected cameras at the system:
# list all the connected cameras at the system:
#
#
def
listcam
():
def
listcam
():
...
@@ -42,7 +42,7 @@ def listcam():
...
@@ -42,7 +42,7 @@ def listcam():
listcam
()
listcam
()
#
#
#
Second step is
open camara device
# open camara device
#
#
def
opencam
():
def
opencam
():
...
@@ -57,12 +57,31 @@ def opencam():
...
@@ -57,12 +57,31 @@ def opencam():
#opencam()
#opencam()
#
# close camera interface
#
def
closecam
():
"""
close interface to camera
"""
# close camera
## camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice())
print
(
"
closeDevice:
"
,
"
\n
"
)
return
camera
.
Close
()
#closecam()
#
# read parameters in camara
#
def
readcam
():
def
readcam
():
"""
"""
read out current settings from camera via interface
read out current settings from camera via interface
"""
"""
# open camera interface:
# open camera interface:
opencam
()
opencam
()
# Read Gain value in Camera:
# Read Gain value in Camera:
print
(
"
Gain in (dB):
"
)
print
(
"
Gain in (dB):
"
)
# Gain value
# Gain value
...
@@ -73,28 +92,19 @@ def readcam():
...
@@ -73,28 +92,19 @@ def readcam():
# TriggerDelay value
# TriggerDelay value
print
(
camera
.
TriggerDelay
.
Value
,
"
\n
"
)
print
(
camera
.
TriggerDelay
.
Value
,
"
\n
"
)
# for chaning the value uncomment the comment in the next line (camera.TriggerDelay.Value = YourValue)
# Exposure parameter
#camera.TriggerDelay.Value = 0
oldexposure
=
camera
.
ExposureTime
.
GetValue
()
print
(
f
'
exposure:
{
oldexposure
}
'
,
"
\n
"
)
oldfps
=
camera
.
AcquisitionFrameRate
.
GetValue
()
print
(
f
'
fps:
{
oldfps
}
'
)
# Gamma value:
# Gamma value:
print
(
"
Camera gamma value:
"
)
print
(
"
Camera gamma value:
"
)
print
(
camera
.
Gamma
.
GetValue
(),
"
\n
"
)
print
(
camera
.
Gamma
.
GetValue
(),
"
\n
"
)
closecam
()
closecam
()
readcam
()
#
# close camera interface
#
def
closecam
():
"""
close interface to camera
"""
# close camera
## camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice())
print
(
"
closeDevice:
"
,
"
\n
"
)
return
camera
.
Close
()
#closecam()
#
#
# Funktion for changing the value (uncomment the comment in the next line (camera.Gain = YourValue))
# Funktion for changing the value (uncomment the comment in the next line (camera.Gain = YourValue))
...
@@ -104,8 +114,13 @@ def gaincam():
...
@@ -104,8 +114,13 @@ def gaincam():
changes the gain in (dB)
changes the gain in (dB)
"""
"""
opencam
()
opencam
()
gainvalue
=
input
(
"
Please enter the new gain in (dB):
"
)
# Read Gain value in Camera:
camera
.
Gain
=
float
(
gainvalue
)
print
(
"
Gain in (dB):
"
)
# Gain value
print
(
camera
.
Gain
.
Value
,
"
\n
"
)
# Input new gain value
gainvalue
=
float
(
input
(
"
Please enter the new gain in (dB):
"
))
camera
.
Gain
=
(
gainvalue
)
# Read Gain value in Camera:
# Read Gain value in Camera:
print
(
"
New Gain in (dB):
"
)
print
(
"
New Gain in (dB):
"
)
# Gain value
# Gain value
...
...
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