Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
commul
Zeit.shift
Quack
Commits
6cd336b0
Commit
6cd336b0
authored
11 years ago
by
Toke Eskildsen
Browse files
Options
Downloads
Patches
Plain Diff
Closes #39 (Fussy dark percentage is off)
parent
374bdfb4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
analyze.sh
+35
-9
35 additions, 9 deletions
analyze.sh
with
35 additions
and
9 deletions
analyze.sh
+
35
−
9
View file @
6cd336b0
...
@@ -63,23 +63,49 @@ function grey_stats() {
...
@@ -63,23 +63,49 @@ function grey_stats() {
# local VALUES="$INFO"
# local VALUES="$INFO"
local
SAVEIFS
=
$IFS
local
SAVEIFS
=
$IFS
IFS
=
$(
echo
-en
"
\n
"
)
IFS
=
$(
echo
-en
$
"
\n
"
)
local
UNIQUE
=
`
echo
$RAW_VALUES
|
wc
-l
`
local
UNIQUE
=
`
echo
"
$RAW_VALUES
"
|
wc
-l
`
# local FIRST_GREY=`echo "$RAW_VALUES" | head -n 1 | grep -o ": \\+([^0-9]*[0-9]\\+," | grep -o "[0-9]\\+"`
export
BLOWN_BLACK_BT
=
3,3,3
if
[
!
"1,1,1"
==
".
$BLOWN_BLACK_BT
"
]
;
then
# TODO: Add skipping based on BLOWN_BLACK_WT
local
FIRST_COUNT
=
0
local
MAXG
=
`
echo
"
$BLOWN_BLACK_BT
"
|
grep
-o
"^[^,]
\+
"
`
# echo "$RAW_VALUES" | head -n $MAXG
IFS
=
$(
echo
-en
$"
\n\b
"
)
for
E
in
`
echo
"
$RAW_VALUES
"
|
head
-n
$MAXG
`
;
do
# echo "e:$E"
# 81422: ( 0, 0, 0) #000000 black
local
C
=
`
echo
"
$E
"
|
grep
-o
" [0-9]
\\
+:"
|
grep
-o
"[0-9]
\\
+"
`
local
G
=
`
echo
"
$E
"
|
grep
-o
":
\\
+([^0-9]*[0-9]
\\
+,"
|
grep
-o
"[0-9]
\\
+"
`
# echo "c:$C g:$G t:$MAXG"
if
[
"
$G
"
-lt
"
$MAXG
"
]
;
then
local
FIRST_COUNT
=
$((
FIRST_COUNT+
$C
))
local
LAST_VALID
=
$G
fi
done
local
FIRST_GREY
=
"0-
$LAST_VALID
"
#local FIRST_GREY=`echo "$E" | head -n 1 | grep -o " ([0-9 ,]*)" | sed 's/ //g'`
else
local
FIRST_GREY
=
`
echo
"
$RAW_VALUES
"
|
head
-n
1 |
grep
-o
" ([0-9 ,]*)"
|
sed
's/ //g'
`
local
FIRST_COUNT
=
`
echo
"
$RAW_VALUES
"
|
head
-n
1 |
grep
-o
" [0-9]
\\
+:"
|
grep
-o
"[0-9]
\\
+"
`
fi
IFS
=
$(
echo
-en
$"
\n
"
)
local
FIRST_COUNT
=
`
echo
$RAW_VALUES
|
head
-n
1 |
grep
-o
" [0-9]
\\
+:"
|
grep
-o
"[0-9]
\\
+"
`
local
LAST_COUNT
=
`
echo
"
$RAW_VALUES
"
|
tail
-n
1 |
grep
-o
" [0-9]
\\
+:"
|
grep
-o
"[0-9]
\\
+"
`
local
FIRST_GREY
=
`
echo
$RAW_VALUES
|
head
-n
1 |
grep
-o
" ([0-9 ,]*)"
|
sed
's/ //g'
`
local
LAST_GREY
=
`
echo
"
$RAW_VALUES
"
|
tail
-n
1 |
grep
-o
" ([0-9 ,]*)"
|
sed
's/ //g'
`
local
LAST_COUNT
=
`
echo
$RAW_VALUES
|
tail
-n
1 |
grep
-o
" [0-9]
\\
+:"
|
grep
-o
"[0-9]
\\
+"
`
local
LAST_GREY
=
`
echo
$RAW_VALUES
|
tail
-n
1 |
grep
-o
" ([0-9 ,]*)"
|
sed
's/ //g'
`
local
ZEROES
=
$((
256
-
UNIQUE
))
local
ZEROES
=
$((
256
-
UNIQUE
))
local
SPAN
=
$((
LAST_GREY-FIRST_GREY+1
))
local
SPAN
=
$((
LAST_GREY-FIRST_GREY+1
))
local
EDGE
=
$((
256
-
SPAN
))
local
EDGE
=
$((
256
-
SPAN
))
local
HOLES
=
$((
ZEROES-EDGE
))
local
HOLES
=
$((
ZEROES-EDGE
))
local
SPIKE_COUNT
=
`
echo
$RAW_VALUES
|
sort
-n
|
tail
-n
1 |
grep
-o
" [0-9]
\\
+:"
|
grep
-o
"[0-9]
\\
+"
`
local
SPIKE_COUNT
=
`
echo
"
$RAW_VALUES
"
|
sort
-n
|
tail
-n
1 |
grep
-o
" [0-9]
\\
+:"
|
grep
-o
"[0-9]
\\
+"
`
local
SPIKE_GREY
=
`
echo
$RAW_VALUES
|
sort
-n
|
tail
-n
1 |
grep
-o
" ([0-9 ,]*)"
|
sed
's/ //g'
`
local
SPIKE_GREY
=
`
echo
"
$RAW_VALUES
"
|
sort
-n
|
tail
-n
1 |
grep
-o
" ([0-9 ,]*)"
|
sed
's/ //g'
`
local
GEOMETRY
=
`
echo
$INFO
|
grep
"Geometry: [0-9]
\\
+x[0-9]
\\
+"
|
grep
-o
"[0-9]
\\
+x[0-9]
\\
+"
`
local
GEOMETRY
=
`
echo
$INFO
|
grep
"Geometry: [0-9]
\\
+x[0-9]
\\
+"
|
grep
-o
"[0-9]
\\
+x[0-9]
\\
+"
`
local
X
=
`
echo
$GEOMETRY
|
grep
-o
"[0-9]
\\
+x"
|
grep
-o
"[0-9]
\\
+"
`
local
X
=
`
echo
$GEOMETRY
|
grep
-o
"[0-9]
\\
+x"
|
grep
-o
"[0-9]
\\
+"
`
...
...
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