Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
soundofwood
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Geisler
soundofwood
Commits
d341f88f
Commit
d341f88f
authored
3 years ago
by
dronus
Browse files
Options
Downloads
Patches
Plain Diff
v1 show version, presumably.
parent
2205adcf
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
conf.json
+2
-1
2 additions, 1 deletion
conf.json
linescan.py
+4
-3
4 additions, 3 deletions
linescan.py
run.sh
+3
-1
3 additions, 1 deletion
run.sh
with
9 additions
and
5 deletions
conf.json
+
2
−
1
View file @
d341f88f
{
"camera_warmup_time"
:
2.5
,
"resolution"
:
[
640
,
480
],
"fps"
:
20
,
"fps"
:
40
,
"shutter_milliseconds"
:
25
,
"contrast_limit"
:
3.0
,
"threshold"
:
3
,
"bins"
:
14
,
...
...
This diff is collapsed.
Click to expand it.
linescan.py
+
4
−
3
View file @
d341f88f
...
...
@@ -127,7 +127,8 @@ client = None
camera
=
PiCamera
()
camera
.
resolution
=
tuple
(
conf
[
"
resolution
"
])
camera
.
framerate
=
conf
[
"
fps
"
]
camera
.
shutter_speed
=
1000000
camera
.
exposure_mode
=
'
off
'
camera
.
shutter_speed
=
conf
[
"
shutter_milliseconds
"
]
*
1000
rawCapture
=
PiRGBArray
(
camera
,
size
=
tuple
(
conf
[
"
resolution
"
]))
# allow the camera to warmup, then initialize the average frame, last
...
...
@@ -176,7 +177,7 @@ for f in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True
index
=
0
for
pixel
in
np
.
nditer
(
histogram
[
1
:
-
1
]):
for
pixel
in
np
.
nditer
(
histogram
[
0
:
-
conf
[
'
removed_top_bins
'
]
]):
last_pixel
=
last_histogram
[
index
]
if
pixel
>=
threshold
and
last_pixel
<
threshold
:
...
...
@@ -197,7 +198,7 @@ for f in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True
cv2
.
imshow
(
"
Security Feed
"
,
crop_frame
)
cv2
.
imshow
(
"
Security Feed 2
"
,
histogram
)
#
cv2.imshow("Security Feed 2", histogram)
key
=
cv2
.
waitKey
(
1
)
&
0xFF
# if the `q` key is pressed, break from the lop
...
...
This diff is collapsed.
Click to expand it.
run.sh
+
3
−
1
View file @
d341f88f
...
...
@@ -2,7 +2,7 @@
cd
`
dirname
$0
`
export
DISPLAY
=
:0
export
DISPLAY
=
:0
.0
...
...
@@ -11,3 +11,5 @@ startBristol -mini -voices 6 &
sleep
5
qjackctl &
sleep
5
/usr/bin/calfjackhost
--load
calf_setup_for301 &
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