Commit 495c25f3 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

Update README.md, configs/histogram.toml files

parent 16a1886f
Pipeline #31431 failed with stages
in 1 minute and 27 seconds
# Histogram
erzeugt mit Hilfe von ImageMagick (convert) ein Histogramm
basierend auf einer Colormap, welche im Konfigurationsfile definiert wird.
## Installation
go get gitlab.switch.ch/memoriav/memobase-2020/services/histogram
go build gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/histogram
go build gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/webservice
## Start:
### Commandline Histogram
histogram -cfg histogram.toml -img bildchen.jpg
### Webservice
webservice -cfg histogram.toml
## Beispiel:
PS C:\temp> /daten/go/bin\histogram.exe -cfg /daten/go/src\gitlab.switch.ch\memoriav\memobase-2020\services\histogram\histogram.toml -img act_binde.png
{
"BlueViolet": 27,
"DimGray": 170,
"DustyRose": 60,
"Gray": 90,
"GreenCopper": 8906,
"Plum": 417,
"Thistle": 226,
"Violet": 104
}
## Webservice request
### Histogram
#curl http://localhost:83/histogram/mnt/c/temp/Icon_pudelrudel_video.png
{"Brown":600,"HotPink":401,"NeonPink":971,"Pink":62,"Plum":5225,"Scarlet":2034,"VioletRed":707}
### ValidateVideo
#curl http://localhost:83/validateav/mnt/c/temp/pudel.mp4
{"status":"error","message":""}
#curl http://localhost:83/validateav/mnt/c/Users/juergen.enge/Downloads/Tony%20Conrad%27s%20Art%20Show%20at%20Greene%20Naftali%20Gallery%20-%20Art%20Show.webm
{"status":"ok","message":"[matroska,webm @ 0x7fffca78dc40] Element at 0x951cfd ending at 0x951d0e exceeds containing master element ending at 0x951cf1"}
### ValidateImage
#curl http://localhost:83/validateimage/mnt/c/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/parliamentdefect.jpg
{"status":"error","message":"identify: Premature end of JPEG file `/mnt/c/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/parliamentdefect.jpg' @ warning/jpeg.c/JPEGWarningHandler/352."}
\ No newline at end of file
# IndexerHelper
Analyses media data in conjunction with the [Indexer](https://gitlab.switch.ch/memoriav/memobase-2020/services/indexer). It can be used to
- validate video and audio files (using [FFmpeg](https://ffmpeg.org/))
- generate a histogram of an image
- extract EXIF data out of an image (using [ExifTool](https://exiftool.org/))
## Installation
go get gitlab.switch.ch/memoriav/memobase-2020/services/histogram
go build gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/histogram
go build gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/webservice
## Start
### Commandline Histogram
histogram -cfg histogram.toml -img bildchen.jpg
### Webservice
webservice -cfg histogram.toml
## Example
PS C:\temp> /daten/go/bin\histogram.exe -cfg /daten/go/src\gitlab.switch.ch\memoriav\memobase-2020\services\histogram\histogram.toml -img act_binde.png
{
"BlueViolet": 27,
"DimGray": 170,
"DustyRose": 60,
"Gray": 90,
"GreenCopper": 8906,
"Plum": 417,
"Thistle": 226,
"Violet": 104
}
## Webservice request
### Histogram
#curl http://localhost:83/histogram/mnt/c/temp/Icon_pudelrudel_video.png
{"Brown":600,"HotPink":401,"NeonPink":971,"Pink":62,"Plum":5225,"Scarlet":2034,"VioletRed":707}
### ValidateVideo
#curl http://localhost:83/validateav/mnt/c/temp/pudel.mp4
{"status":"error","message":""}
#curl http://localhost:83/validateav/mnt/c/Users/juergen.enge/Downloads/Tony%20Conrad%27s%20Art%20Show%20at%20Greene%20Naftali%20Gallery%20-%20Art%20Show.webm
{"status":"ok","message":"[matroska,webm @ 0x7fffca78dc40] Element at 0x951cfd ending at 0x951d0e exceeds containing master element ending at 0x951cf1"}
### ValidateImage
#curl http://localhost:83/validateimage/mnt/c/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/parliamentdefect.jpg
{"status":"error","message":"identify: Premature end of JPEG file `/mnt/c/daten/go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/parliamentdefect.jpg' @ warning/jpeg.c/JPEGWarningHandler/352."}
logfile = "" # log file location
loglevel = "DEBUG" # CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG
accesslog = "" # http access log file
addr = "0.0.0.0:8083"
#certpem = "" # tls client certificate file in PEM format
#keypem = "" # tls client key file in PEM format
wsl = false # true, if executable is within linux subsystem on windows
[ImageMagick]
identify = "/usr/bin/identify"
convert = "/usr/bin/convert"
[FFMPEG]
ffmpeg = "/usr/bin/ffmpeg"
ffprobe = "/usr/bin/ffprobe"
[exiftool]
exiftool = "/usr/bin/exiftool"
[EXIF]
prefix = "exif"
timeout = "10s"
params = "-json [[PATH]]"
[ValidateImage]
prefix = "validateimage"
timeout = "10s"
[ValidateAV]
prefix = "validateav"
timeout = "300s"
[Histogram]
prefix = "histogram"
timeout = "10s"
remap = "/app/colormap/color.png" # das Bild mit der Zielfarbpalette. Wird erzeugt, falls nicht vorhanden. (Schreibrechte beachten)
colors = 10 # Anzahl der Farben im Histogramm
maxvalue = 10000
params = "[[path]] -resize 100x100! -dither Riemersma -colors 10 +dither -remap color.png -format %c histogram:info:"
resize = "100x100!"
[histogram.colormap]
AliceBlue = "#F0F8FE"
AntiqueWhite = "#FAEBD7"
Aqua = "#00FFFF"
Aquamarine = "#70DB93"
Azure = "#F0FFFF"
Beige = "#F5F5DC"
Black = "#000000"
Blue = "#0000FF"
BlueViolet = "#9F5F9F"
Brass = "#B5A642"
BrightGold = "#D9D919"
Bronze = "#8C7853"
Brown = "#A52A2A"
CadetBlue = "#5F9EA0"
Chocolate = "#D2691E"
Copper = "#B87333"
Coral = "#FF7F50"
Crimson = "#DC143C"
Cyan = "#00FFFF"
DarkBlue = "#00008B"
DarkBrown = "#5C4033"
DarkCyan = "#008B8B"
DarkGoldenRod = "#B8860B"
DarkGray = "#A9A9A9"
DarkGreen = "#006400"
DarkKhaki = "#BDB76B"
DarkMagenta = "#8B008B"
DarkOliveGreen = "#4F4F2F"
DarkOrange = "#FF8C00"
DarkOrchid = "#9932CD"
DarkPurple = "#871F78"
DarkSalmon = "#E9967A"
DarkSlateBlue = "#6B238E"
DarkSlateGray = "#2F4F4F"
DarkTan = "#97694F"
DarkTurquoise = "#7093DB"
DarkViolet = "#9400D3"
DarkWood = "#855E42"
DimGray = "#545454"
DustyRose = "#856363"
FeldSpar = "#D19275"
FireBrick = "#B22222"
ForestGreen = "#238E23"
Gold = "#CD7F32"
GoldenRod = "#DBDB70"
Gray = "#C0C0C0"
Green = "#00FF00"
GreenCopper = "#527F76"
GreenYellow = "#93DB70"
HotPink = "#FF69B4"
HunterGreen = "#215E21"
IndianRed = "#CD5C5C"
Indigo = "#4B0082"
Ivory = "#FFFFF0"
Khaki = "#9F9F5F"
Lavender = "#E6E6FA"
LightBlue = "#C0D9D9"
LightCoral = "#F08080"
LightCyan = "#E0FFFF"
LightGray = "#A8A8A8"
LightGreen = "#90EE90"
LightPink = "#FFB6C1"
LightSteelBlue = "#8F8FBD"
LightWood = "#E9C2A6"
Lime = "#00FF00"
LimeGreen = "#32CD32"
Magenta = "#FF00FF"
MandarinOrange = "#E47833"
Maroon = "#8E236B"
MediumAquaMarine = "#32CD99"
MediumBlue = "#3232CD"
MediumForestGreen = "#6B8E23"
MediumGoldenRod = "#EAEAAE"
MediumOrchid = "#9370DB"
MediumSeaGreen = "#426F42"
MediumSlateBlue = "#7F00FF"
MediumSpringGreen = "#7FFF00"
MediumTurquoise = "#70DBDB"
MediumVioletRed = "#DB7093"
MediumWood = "#A68064"
MidNightBlue = "#2F2F4F"
MintCream = "#F5FFFA"
MistyRose = "#FFE4E1"
NavyBlue = "#23238E"
NeonBlue = "#4D4DFF"
NeonPink = "#FF6EC7"
NewMidnightBlue = "#00009C"
NewTan = "#EBC79E"
OldGold = "#CFB53B"
Olive = "#808000"
Orange = "#FF7F00"
OrangeRed = "#FF2400"
Orchid = "#DB70DB"
PaleGoldenRod = "#EEE8AA"
PaleGreen = "#8FBC8F"
PaleTurquoise = "#AFEEEE"
Pink = "#BC8F8F"
Plum = "#EAADEA"
PowderBlue = "#B0E0E6"
Purple = "#800080"
Quartz = "#D9D9F3"
Red = "#FF0000"
RichBlue = "#5959AB"
RoyalBlue = "#4169E1"
SaddleBrown = "#8B4513"
Salmon = "#6F4242"
SandyBrown = "#F4A460"
Scarlet = "#8C1717"
SeaGreen = "#238E68"
Seinna = "#8E6B23"
Silver = "#E6E8FA"
SkyBlue = "#3299CC"
SlateBlue = "#007FFF"
Snow = "#FFFAFA"
SpicyPink = "#FF1CAE"
SpringGreen = "#00FF7F"
SteelBlue = "#236B8E"
SummerSky = "#38B0DE"
Tan = "#DB9370"
Teal = "#008080"
Thistle = "#D8BFD8"
Tomato = "#FF6347"
Turquoise = "#ADEAEA"
VeryDarkBrown = "#5C4033"
VeryDarkGray = "#5C4033"
Violet = "#422F4F"
VioletRed = "#CC3299"
Wheat = "#D8D8BF"
White = "#FFFFFF"
Yellow = "#FFFF00"
YellowGreen = "#99CC32"
logfile = "" # log file location
loglevel = "DEBUG" # CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG
accesslog = "" # http access log file
addr = "0.0.0.0:8083"
#certpem = "" # tls client certificate file in PEM format
#keypem = "" # tls client key file in PEM format
wsl = false # true, if executable is within linux subsystem on windows
[ImageMagick]
identify = "/usr/bin/identify"
convert = "/usr/bin/convert"
[FFMPEG]
ffmpeg = "/usr/bin/ffmpeg"
ffprobe = "/usr/bin/ffprobe"
[exiftool]
exiftool = "/usr/bin/exiftool"
[EXIF]
prefix = "exif"
timeout = "10s"
params = "-json [[PATH]]"
[ValidateImage]
prefix = "validateimage"
timeout = "10s"
[ValidateAV]
prefix = "validateav"
timeout = "300s"
[Histogram]
prefix = "histogram"
timeout = "10s"
remap = "/app/colormap/color.png" # das Bild mit der Zielfarbpalette. Wird erzeugt, falls nicht vorhanden. (Schreibrechte beachten)
colors = 10 # Anzahl der Farben im Histogramm
maxvalue = 10000
params = "[[path]] -resize 100x100! -dither Riemersma -colors 10 +dither -remap color.png -format %c histogram:info:"
resize = "100x100!"
[histogram.colormap]
AliceBlue = "#F0F8FE"
AntiqueWhite = "#FAEBD7"
Aqua = "#00FFFF"
Aquamarine = "#70DB93"
Azure = "#F0FFFF"
Beige = "#F5F5DC"
Black = "#000000"
Blue = "#0000FF"
BlueViolet = "#9F5F9F"
Brass = "#B5A642"
BrightGold = "#D9D919"
Bronze = "#8C7853"
Brown = "#A52A2A"
CadetBlue = "#5F9EA0"
Chocolate = "#D2691E"
Copper = "#B87333"
Coral = "#FF7F50"
Crimson = "#DC143C"
Cyan = "#00FFFF"
DarkBlue = "#00008B"
DarkBrown = "#5C4033"
DarkCyan = "#008B8B"
DarkGoldenRod = "#B8860B"
DarkGray = "#A9A9A9"
DarkGreen = "#006400"
DarkKhaki = "#BDB76B"
DarkMagenta = "#8B008B"
DarkOliveGreen = "#4F4F2F"
DarkOrange = "#FF8C00"
DarkOrchid = "#9932CD"
DarkPurple = "#871F78"
DarkSalmon = "#E9967A"
DarkSlateBlue = "#6B238E"
DarkSlateGray = "#2F4F4F"
DarkTan = "#97694F"
DarkTurquoise = "#7093DB"
DarkViolet = "#9400D3"
DarkWood = "#855E42"
DimGray = "#545454"
DustyRose = "#856363"
FeldSpar = "#D19275"
FireBrick = "#B22222"
ForestGreen = "#238E23"
Gold = "#CD7F32"
GoldenRod = "#DBDB70"
Gray = "#C0C0C0"
Green = "#00FF00"
GreenCopper = "#527F76"
GreenYellow = "#93DB70"
HotPink = "#FF69B4"
HunterGreen = "#215E21"
IndianRed = "#CD5C5C"
Indigo = "#4B0082"
Ivory = "#FFFFF0"
Khaki = "#9F9F5F"
Lavender = "#E6E6FA"
LightBlue = "#C0D9D9"
LightCoral = "#F08080"
LightCyan = "#E0FFFF"
LightGray = "#A8A8A8"
LightGreen = "#90EE90"
LightPink = "#FFB6C1"
LightSteelBlue = "#8F8FBD"
LightWood = "#E9C2A6"
Lime = "#00FF00"
LimeGreen = "#32CD32"
Magenta = "#FF00FF"
MandarinOrange = "#E47833"
Maroon = "#8E236B"
MediumAquaMarine = "#32CD99"
MediumBlue = "#3232CD"
MediumForestGreen = "#6B8E23"
MediumGoldenRod = "#EAEAAE"
MediumOrchid = "#9370DB"
MediumSeaGreen = "#426F42"
MediumSlateBlue = "#7F00FF"
MediumSpringGreen = "#7FFF00"
MediumTurquoise = "#70DBDB"
MediumVioletRed = "#DB7093"
MediumWood = "#A68064"
MidNightBlue = "#2F2F4F"
MintCream = "#F5FFFA"
MistyRose = "#FFE4E1"
NavyBlue = "#23238E"
NeonBlue = "#4D4DFF"
NeonPink = "#FF6EC7"
NewMidnightBlue = "#00009C"
NewTan = "#EBC79E"
OldGold = "#CFB53B"
Olive = "#808000"
Orange = "#FF7F00"
OrangeRed = "#FF2400"
Orchid = "#DB70DB"
PaleGoldenRod = "#EEE8AA"
PaleGreen = "#8FBC8F"
PaleTurquoise = "#AFEEEE"
Pink = "#BC8F8F"
Plum = "#EAADEA"
PowderBlue = "#B0E0E6"
Purple = "#800080"
Quartz = "#D9D9F3"
Red = "#FF0000"
RichBlue = "#5959AB"
RoyalBlue = "#4169E1"
SaddleBrown = "#8B4513"
Salmon = "#6F4242"
SandyBrown = "#F4A460"
Scarlet = "#8C1717"
SeaGreen = "#238E68"
Seinna = "#8E6B23"
Silver = "#E6E8FA"
SkyBlue = "#3299CC"
SlateBlue = "#007FFF"
Snow = "#FFFAFA"
SpicyPink = "#FF1CAE"
SpringGreen = "#00FF7F"
SteelBlue = "#236B8E"
SummerSky = "#38B0DE"
Tan = "#DB9370"
Teal = "#008080"
Thistle = "#D8BFD8"
Tomato = "#FF6347"
Turquoise = "#ADEAEA"
VeryDarkBrown = "#5C4033"
VeryDarkGray = "#5C4033"
Violet = "#422F4F"
VioletRed = "#CC3299"
Wheat = "#D8D8BF"
White = "#FFFFFF"
Yellow = "#FFFF00"
YellowGreen = "#99CC32"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment