Skip to content

Commit

Permalink
-opencv option for testing; opencv 2.4.9 build
Browse files Browse the repository at this point in the history
  • Loading branch information
firepick1 committed Apr 18, 2014
1 parent a6bae82 commit e09035b
Show file tree
Hide file tree
Showing 42 changed files with 126 additions and 43 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project( firesight )

SET(PROJECT_VERSION_MAJOR 0)
SET(PROJECT_VERSION_MINOR 9)
set(PROJECT_VERSION_PATCH 6)
set(PROJECT_VERSION_PATCH 7)
set(PROJECT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})

IF(WIN32)
Expand Down
7 changes: 6 additions & 1 deletion FireSight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ static void help() {
cout << " -o output-image-file" << endl;
cout << " File for saving pipeline image " << endl;
cout << " -p JSON-pipeline-file" << endl;
cout << " JSON file for piepline specification. If omitted, input and output images must be specified." << endl;
cout << " JSON pipeline specification file. If omitted, input and output images must be specified." << endl;
cout << endl;
cout << "Diagnostic parameters:" << endl;
cout << " -opencv " << endl;
cout << " OpenCV version for FireSight test compatibility" << endl;
cout << " -debug " << endl;
cout << " Start logging at DEBUG log level" << endl;
cout << " -error " << endl;
Expand Down Expand Up @@ -75,6 +77,9 @@ bool parseArgs(int argc, char *argv[],
for (int i = 1; i < argc; i++) {
if (argv[i][0] == 0) {
// empty argument
} else if (strcmp("-opencv",argv[i]) == 0) {
cout << CV_MAJOR_VERSION << "." << CV_MINOR_VERSION << endl;
exit(0);
} else if (strcmp("-p",argv[i]) == 0) {
if (i+1>=argc) {
LOGERROR("expected pipeline path after -p");
Expand Down
1 change: 1 addition & 0 deletions bgSub.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cassert>
#include <string.h>
#include <math.h>
#include <iostream>
Expand Down
51 changes: 38 additions & 13 deletions build
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#! /bin/bash

if [ "$SUDO_USER" == "" ]; then
echo "This script must be run with sudo command from a non-root user"
exit -1
fi

installPrefix=/usr

if [ `uname -o` == "Solaris" ]; then
Expand Down Expand Up @@ -65,24 +70,43 @@ if [ ! -e /usr/local/include/jansson.h ] ; then
popd
fi

if [ ! -e /usr/lib/libopencv_features2d.so ] && [ ! -e /usr/local/lib/libopencv_features2d.so ] ; then
if [ "$(type -p apt-get)" == "" ]; then
echo "apt-get: UNAVAILABLE"
else
echo "apt-get: Installing openexr for libIlmImf.so.6"
apt-get -y install openexr
apt-get -y install libavcodec-dev
apt-get -y install libavformat-dev
apt-get -y install libswscale-dev
apt-get -y install libdc1394-22
apt-get -y install libz-dev
fi

if [ -e /usr/lib/libopencv_core.so ]; then
echo "OpenCV found in /usr/lib:"
ls /usr/lib/libopencv_core.so.*
elif [ -e /usr/local/lib/libopencv_core.so ]; then
echo "OpenCV found in /usr/local/lib:"
ls /usr/local/lib/libopencv_core.so.*
else
echo "++++++++++++++++++ INSTALLING OPENCV C++ LIBRARIES ++++++++++++"
if [ `uname -o` == "Solaris" ]; then
#if [ `uname -o` == "Solaris" ]; then
# pkgin -y install opencv
if [ ! -e opencv ] ; then
git clone https://github.com/firepick1/opencv -b 2.4
fi
mkdir opencv/build
pushd opencv/build
cmake \
-D WITH_OPENEXR=OFF \
-D CMAKE_BUILD_TYPE=DEBUG \
-D CMAKE_INSTALL_PREFIX=/usr/local \
..
make install
popd
else
apt-get -y install libopencv-dev
fi
#else
# apt-get -y install libopencv-dev
#fi
fi

if [ -e CMakeFiles ] ; then
Expand All @@ -96,13 +120,14 @@ if [ -e CMakeFiles ] ; then
fi


echo creating makefiles
if [ "$SUDO_USER" == "" ]; then
cmake -DCMAKE_INSTALL_PREFIX:PATH=$installPrefix "$@" .
else
sudo -u $SUDO_USER cmake -DCMAKE_INSTALL_PREFIX:PATH=$installPrefix "$@" .
fi
echo creating makefile
sudo -u $SUDO_USER cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$installPrefix "$@" \
.
echo building and installing FireSight...
make install

echo HAPPINESS AND JOY...
if [ $? -eq 0 ]; then
echo HAPPINESS AND JOY...
else
echo SADNESS AND TEARS...
fi
Binary file added img/calcOffset-0a-cv2.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/calcOffset-0a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/calcOffset-1-cv2.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/calcOffset-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/calcOffset-1BGR-cv2.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/calcOffset-1BGR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/kodak_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions json/diff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
{"op":"absdiff", "path":"{{img}}"},
{"op":"calcHist"},
{"op":"normalize", "domain":"{{domain}}"}
]
2 changes: 1 addition & 1 deletion test/absdiff-model.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"FireSight":{"version":"0.9.6","url":"https://github.com/firepick1/FireSight"},"s1":{},"s2":{"hist":{"0":[28983,40751,35947],"1":[44643,60157,53446],"2":[32218,31629,31239],"3":[20703,14917,17986],"4":[12443,6458,9634],"5":[7446,2721,4950],"6":[4537,945,2461],"7":[2722,355,1248],"8":[1747,126,596],"9":[1134,59,307],"10":[734,39,165],"11":[471,35,67],"12":[314,53,30],"13":[206,45,38],"14":[138,44,27],"15":[94,45,20],"16":[86,34,24],"17":[60,42,34],"18":[55,43,21],"19":[51,35,24],"20":[48,18,24],"21":[52,22,37],"22":[38,16,41],"23":[44,17,40],"24":[39,24,34],"25":[36,31,40],"26":[32,25,25],"27":[31,41,34],"28":[30,26,24],"29":[30,30,24],"30":[48,22,13],"31":[34,34,17],"32":[33,32,11],"33":[35,18,13],"34":[30,20,13],"35":[26,26,9],"36":[27,19,19],"37":[22,16,23],"38":[16,21,18],"39":[18,23,16],"40":[17,31,21],"41":[16,28,27],"42":[17,26,22],"43":[18,23,23],"44":[17,21,29],"45":[14,30,35],"46":[14,14,24],"47":[10,13,26],"48":[7,18,29],"49":[5,7,27],"50":[9,10,13],"51":[8,10,15],"52":[9,14,19],"53":[14,4,22],"54":[10,12,13],"55":[6,3,14],"56":[6,13,8],"57":[7,6,13],"58":[7,4,21],"59":[8,8,12],"60":[11,4,21],"61":[6,4,18],"62":[11,6,19],"63":[4,6,30],"64":[6,0,20],"65":[3,6,16],"66":[4,1,17],"67":[3,0,21],"68":[1,1,23],"69":[1,1,23],"70":[2,1,28],"71":[2,2,17],"72":[5,4,12],"73":[2,1,14],"74":[0,0,10],"75":[3,0,13],"76":[2,1,14],"77":[0,3,9],"78":[3,0,15],"79":[3,3,7],"80":[1,1,14],"81":[1,2,10],"82":[2,3,10],"83":[5,0,10],"84":[2,1,7],"85":[3,1,13],"86":[3,2,12],"87":[2,0,12],"88":[2,0,7],"89":[5,0,3],"90":[10,0,7],"91":[2,0,5],"92":[6,1,3],"93":[5,2,8],"94":[6,0,6],"95":[8,3,9],"96":[5,1,3],"97":[9,2,8],"98":[5,2,5],"99":[5,1,6],"100":[10,0,3],"101":[5,0,1],"102":[4,2,4],"103":[5,1,3],"104":[7,1,3],"105":[7,4,2],"106":[11,1,3],"107":[5,4,3],"108":[5,6,5],"109":[5,2,3],"110":[8,3,1],"111":[7,0,2],"112":[10,3,2],"113":[9,3,1],"114":[4,1,1],"115":[7,0,4],"116":[3,2,3],"117":[7,2,3],"118":[7,2,5],"119":[6,2,2],"120":[7,2,1],"121":[5,3,1],"122":[2,4,0],"123":[1,4,2],"124":[5,4,3],"125":[6,1,0],"126":[2,1,3],"127":[2,7,2],"128":[1,1,1],"129":[1,6,2],"130":[1,5,3],"131":[0,5,2],"132":[0,1,1],"133":[0,4,0],"134":[1,6,4],"135":[1,2,1],"136":[1,2,0],"137":[0,5,1],"138":[0,3,1],"139":[0,4,3],"140":[0,4,3],"141":[0,4,0],"142":[0,4,2],"143":[0,5,4],"144":[0,6,4],"145":[0,12,2],"146":[0,9,0],"147":[0,11,2],"148":[0,8,0],"149":[0,12,0],"150":[0,8,1],"151":[0,14,0],"152":[0,7,3],"153":[0,8,0],"154":[0,10,2],"155":[0,7,1],"156":[0,8,4],"157":[0,8,5],"158":[0,7,3],"159":[0,7,3],"160":[0,9,3],"161":[0,6,1],"162":[0,10,5],"163":[0,12,5],"164":[0,12,5],"165":[0,9,5],"166":[0,11,8],"167":[0,11,2],"168":[0,14,3],"169":[0,8,2],"170":[0,10,6],"171":[0,10,4],"172":[0,11,8],"173":[0,8,2],"174":[0,10,3],"175":[0,16,2],"176":[0,9,2],"177":[0,3,1],"178":[0,10,5],"179":[0,8,4],"180":[0,9,4],"181":[0,15,3],"182":[0,5,2],"183":[0,9,0],"184":[0,7,1],"185":[0,8,7],"186":[0,7,4],"187":[0,6,6],"188":[0,8,5],"189":[0,3,0],"190":[0,4,4],"191":[0,3,2],"192":[0,5,2],"193":[0,6,2],"194":[0,5,2],"195":[0,5,4],"196":[0,4,3],"197":[0,6,5],"198":[0,3,2],"199":[0,4,1],"200":[0,2,1],"201":[0,4,2],"202":[0,4,2],"203":[0,8,1],"204":[0,3,3],"205":[0,4,6],"206":[0,2,2],"207":[0,1,1],"208":[0,1,4],"209":[0,0,4],"210":[0,1,7],"211":[0,0,3],"212":[0,0,4],"213":[0,3,0],"214":[0,1,6],"215":[0,2,4],"216":[0,2,3],"217":[0,0,6],"218":[0,0,1],"219":[0,0,1],"220":[0,0,3],"221":[0,0,3],"223":[0,0,3],"224":[0,0,2],"225":[0,0,1],"226":[0,0,1],"227":[0,0,1],"228":[0,0,1],"229":[0,0,1],"232":[0,0,1],"233":[0,0,2],"234":[0,0,3],"236":[0,0,1]}}}
{"FireSight":{"version":"0.9.7","url":"https://github.com/firepick1/FireSight"},"s1":{},"s2":{"hist":{"0":[28983,40751,35947],"1":[44643,60157,53446],"2":[32218,31629,31239],"3":[20703,14917,17986],"4":[12443,6458,9634],"5":[7446,2721,4950],"6":[4537,945,2461],"7":[2722,355,1248],"8":[1747,126,596],"9":[1134,59,307],"10":[734,39,165],"11":[471,35,67],"12":[314,53,30],"13":[206,45,38],"14":[138,44,27],"15":[94,45,20],"16":[86,34,24],"17":[60,42,34],"18":[55,43,21],"19":[51,35,24],"20":[48,18,24],"21":[52,22,37],"22":[38,16,41],"23":[44,17,40],"24":[39,24,34],"25":[36,31,40],"26":[32,25,25],"27":[31,41,34],"28":[30,26,24],"29":[30,30,24],"30":[48,22,13],"31":[34,34,17],"32":[33,32,11],"33":[35,18,13],"34":[30,20,13],"35":[26,26,9],"36":[27,19,19],"37":[22,16,23],"38":[16,21,18],"39":[18,23,16],"40":[17,31,21],"41":[16,28,27],"42":[17,26,22],"43":[18,23,23],"44":[17,21,29],"45":[14,30,35],"46":[14,14,24],"47":[10,13,26],"48":[7,18,29],"49":[5,7,27],"50":[9,10,13],"51":[8,10,15],"52":[9,14,19],"53":[14,4,22],"54":[10,12,13],"55":[6,3,14],"56":[6,13,8],"57":[7,6,13],"58":[7,4,21],"59":[8,8,12],"60":[11,4,21],"61":[6,4,18],"62":[11,6,19],"63":[4,6,30],"64":[6,0,20],"65":[3,6,16],"66":[4,1,17],"67":[3,0,21],"68":[1,1,23],"69":[1,1,23],"70":[2,1,28],"71":[2,2,17],"72":[5,4,12],"73":[2,1,14],"74":[0,0,10],"75":[3,0,13],"76":[2,1,14],"77":[0,3,9],"78":[3,0,15],"79":[3,3,7],"80":[1,1,14],"81":[1,2,10],"82":[2,3,10],"83":[5,0,10],"84":[2,1,7],"85":[3,1,13],"86":[3,2,12],"87":[2,0,12],"88":[2,0,7],"89":[5,0,3],"90":[10,0,7],"91":[2,0,5],"92":[6,1,3],"93":[5,2,8],"94":[6,0,6],"95":[8,3,9],"96":[5,1,3],"97":[9,2,8],"98":[5,2,5],"99":[5,1,6],"100":[10,0,3],"101":[5,0,1],"102":[4,2,4],"103":[5,1,3],"104":[7,1,3],"105":[7,4,2],"106":[11,1,3],"107":[5,4,3],"108":[5,6,5],"109":[5,2,3],"110":[8,3,1],"111":[7,0,2],"112":[10,3,2],"113":[9,3,1],"114":[4,1,1],"115":[7,0,4],"116":[3,2,3],"117":[7,2,3],"118":[7,2,5],"119":[6,2,2],"120":[7,2,1],"121":[5,3,1],"122":[2,4,0],"123":[1,4,2],"124":[5,4,3],"125":[6,1,0],"126":[2,1,3],"127":[2,7,2],"128":[1,1,1],"129":[1,6,2],"130":[1,5,3],"131":[0,5,2],"132":[0,1,1],"133":[0,4,0],"134":[1,6,4],"135":[1,2,1],"136":[1,2,0],"137":[0,5,1],"138":[0,3,1],"139":[0,4,3],"140":[0,4,3],"141":[0,4,0],"142":[0,4,2],"143":[0,5,4],"144":[0,6,4],"145":[0,12,2],"146":[0,9,0],"147":[0,11,2],"148":[0,8,0],"149":[0,12,0],"150":[0,8,1],"151":[0,14,0],"152":[0,7,3],"153":[0,8,0],"154":[0,10,2],"155":[0,7,1],"156":[0,8,4],"157":[0,8,5],"158":[0,7,3],"159":[0,7,3],"160":[0,9,3],"161":[0,6,1],"162":[0,10,5],"163":[0,12,5],"164":[0,12,5],"165":[0,9,5],"166":[0,11,8],"167":[0,11,2],"168":[0,14,3],"169":[0,8,2],"170":[0,10,6],"171":[0,10,4],"172":[0,11,8],"173":[0,8,2],"174":[0,10,3],"175":[0,16,2],"176":[0,9,2],"177":[0,3,1],"178":[0,10,5],"179":[0,8,4],"180":[0,9,4],"181":[0,15,3],"182":[0,5,2],"183":[0,9,0],"184":[0,7,1],"185":[0,8,7],"186":[0,7,4],"187":[0,6,6],"188":[0,8,5],"189":[0,3,0],"190":[0,4,4],"191":[0,3,2],"192":[0,5,2],"193":[0,6,2],"194":[0,5,2],"195":[0,5,4],"196":[0,4,3],"197":[0,6,5],"198":[0,3,2],"199":[0,4,1],"200":[0,2,1],"201":[0,4,2],"202":[0,4,2],"203":[0,8,1],"204":[0,3,3],"205":[0,4,6],"206":[0,2,2],"207":[0,1,1],"208":[0,1,4],"209":[0,0,4],"210":[0,1,7],"211":[0,0,3],"212":[0,0,4],"213":[0,3,0],"214":[0,1,6],"215":[0,2,4],"216":[0,2,3],"217":[0,0,6],"218":[0,0,1],"219":[0,0,1],"220":[0,0,3],"221":[0,0,3],"223":[0,0,3],"224":[0,0,2],"225":[0,0,1],"226":[0,0,1],"227":[0,0,1],"228":[0,0,1],"229":[0,0,1],"232":[0,0,1],"233":[0,0,2],"234":[0,0,3],"236":[0,0,1]}}}
2 changes: 1 addition & 1 deletion test/bgsub-absdiff-64-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/bgsub-absdiff-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/bgsub-mog2-64-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/bgsub-mog2-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/calcOffset-0a-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"calcOffset-stage":{
Expand Down
2 changes: 1 addition & 1 deletion test/calcOffset-1-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"calcOffset-stage":{
Expand Down
2 changes: 1 addition & 1 deletion test/calcOffset-1BGR-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"calcOffset-stage":{
Expand Down
2 changes: 1 addition & 1 deletion test/calcOffset-1roi-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"calcOffset-stage":{
Expand Down
2 changes: 1 addition & 1 deletion test/dft-spectrum-64-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{},
Expand Down
2 changes: 1 addition & 1 deletion test/match45-64-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{},
Expand Down
2 changes: 1 addition & 1 deletion test/match45-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{},
Expand Down
2 changes: 1 addition & 1 deletion test/matchAngle-64-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{},
Expand Down
2 changes: 1 addition & 1 deletion test/matchAngle-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{},
Expand Down
2 changes: 1 addition & 1 deletion test/matchCCOEFF_NORMED-64-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{},
Expand Down
2 changes: 1 addition & 1 deletion test/matchCCOEFF_NORMED-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{},
Expand Down
37 changes: 37 additions & 0 deletions test/norm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#! /bin/bash

function help() {
echo help
}

args=
domain=
outdir=~/Downloads
prefix=kodak_test
y=-10

while getopts "a:o:p:d:" flag
do
case "$flag" in
a) args="$OPTARG";;
d) domain="$OPTARG";;
p) prefix="$OPTARG";;
o) outdir="$OPTARG";;
*) help ; exit 0;;
esac
done

echo " Directory : $outdir"
echo " Prefix : $prefix"
echo " Domain : $domain"

image=$outdir/$prefix.png

target/firesight -i $image -p json/normalize.json -o $outdir/$prefix-inf.png -DnormType=NORM_INF -ji 0 $args
target/firesight -i $image -p json/normalize.json -o $outdir/$prefix-l1.png -DnormType=NORM_L1 -ji 0 $args
target/firesight -i $image -p json/normalize.json -o $outdir/$prefix-l2.png -DnormType=NORM_L2 -ji 0 $args
target/firesight -i $image -p json/normalize.json -o $outdir/$prefix-minmax.png -DnormType=NORM_MINMAX -ji 0 $args
target/firesight -i $image -p json/normalize.json -o $outdir/$prefix-inf-dom.png -DnormType=NORM_INF -ji 0 -Ddomain=$domain $args
target/firesight -i $image -p json/normalize.json -o $outdir/$prefix-l1-dom.png -DnormType=NORM_L1 -ji 0 -Ddomain=$domain $args
target/firesight -i $image -p json/normalize.json -o $outdir/$prefix-l2-dom.png -DnormType=NORM_L2 -ji 0 -Ddomain=$domain $args
target/firesight -i $image -p json/normalize.json -o $outdir/$prefix-minmax-dom.png -DnormType=NORM_MINMAX -ji 0 -Ddomain=$domain $args
2 changes: 1 addition & 1 deletion test/normalize-inf-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/normalize-l1-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/normalize-l2-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/normalize-minmax-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/normalize-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/putText-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/resize-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/samePSNR.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{
Expand Down
9 changes: 8 additions & 1 deletion test/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#! /bin/bash

if [ `target/firesight -opencv` == "2.3" ]; then
echo "OpenCV Test version: 2.3"
ocvtest = "-cv2.3"
else
echo "OpenCV Test version: current"
ocvtest = ""
fi

echo ========== TEST lib_firesight.so =============
echo target/test
Expand Down Expand Up @@ -47,7 +54,7 @@ suffix="-64"
test/test-one whiterect.png dft-spectrum "$suffix"
if [ $? -ne 0 ] ; then exit 1 ; fi

suffix=""
suffix="$ocvtest"
test/test-one headcam1.png calcOffset "-1$suffix" -Dtemplate=img/headcam0.png
if [ $? -ne 0 ] ; then exit 1 ; fi
test/test-one headcam0a.png calcOffset "-0a$suffix" -Dtemplate=img/headcam0.png
Expand Down
3 changes: 3 additions & 0 deletions test/test-one
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ then
echo diff -b target/samePSNR.json test/samePSNR.json
echo target/firesight.exe -i img/$2$3.png -p json/PSNR.json -Dthreshold=50 -Dpath=target/$2$3.png
echo FAILED: PSNR detected a difference between: target/$2$3.png img/$2$3.png
echo "#! /bin/bash" > target/diff.sh
chmod +x target/diff.sh
echo "target/firesight -i target/$2$3.png -p json/diff.json -Dimg=img/$2$3.png -o ~/Downloads/diff.png -ji 0" >> target/diff.sh
exit 1
fi
echo "verifying JSON output..."
Expand Down
2 changes: 1 addition & 1 deletion test/threshold64-color-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
2 changes: 1 addition & 1 deletion test/threshold64-inv-model.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FireSight":{
"version":"0.9.6",
"version":"0.9.7",
"url":"https://github.com/firepick1/FireSight"
},
"s1":{}
Expand Down
Loading

0 comments on commit e09035b

Please sign in to comment.