View Javadoc

1   /**
2    * Copyright (c) 2011, The University of Southampton and the individual contributors.
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without modification,
6    * are permitted provided that the following conditions are met:
7    *
8    *   * 	Redistributions of source code must retain the above copyright notice,
9    * 	this list of conditions and the following disclaimer.
10   *
11   *   *	Redistributions in binary form must reproduce the above copyright notice,
12   * 	this list of conditions and the following disclaimer in the documentation
13   * 	and/or other materials provided with the distribution.
14   *
15   *   *	Neither the name of the University of Southampton nor the names of its
16   * 	contributors may be used to endorse or promote products derived from this
17   * 	software without specific prior written permission.
18   *
19   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
23   * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26   * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27   * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28   * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29   */
30  package org.openimaj.image.feature.global;
31  
32  import static org.junit.Assert.assertArrayEquals;
33  import static org.junit.Assert.assertEquals;
34  
35  import java.io.IOException;
36  
37  import org.junit.Test;
38  import org.openimaj.feature.FloatFV;
39  import org.openimaj.feature.FloatFVComparison;
40  import org.openimaj.image.FImage;
41  import org.openimaj.image.ImageUtilities;
42  
43  /**
44   * Tests for the {@link Gist} feature
45   * 
46   * @author Jonathon Hare (jsh2@ecs.soton.ac.uk)
47   * 
48   */
49  public class GistTest {
50  	static FloatFV F1_EXPECTED_256 = new FloatFV(new float[] {
51  			0.096198723f, 0.14142783f, 0.092999659f, 0.015102349f, 0.054749325f, 0.18631063f, 0.10006931f, 0.013637486f,
52  			0.0072567095f, 0.089582652f, 0.058332283f, 0.021648441f, 0.047820698f, 0.064396143f, 0.075573958f,
53  			0.017873939f, 0.066148415f, 0.064717077f, 0.051554471f, 0.014540516f, 0.064409763f, 0.10883542f,
54  			0.063061051f, 0.012662572f, 0.0063112918f, 0.065020390f, 0.057861179f, 0.020487783f, 0.033445574f,
55  			0.042678338f, 0.044695243f, 0.024509815f, 0.074017048f, 0.035760015f, 0.030875653f, 0.014937495f,
56  			0.037236329f, 0.064958811f, 0.042545557f, 0.015167510f, 0.0048409104f, 0.042705789f, 0.047748197f,
57  			0.019120703f, 0.026338927f, 0.027142487f, 0.030231485f, 0.033637326f, 0.052273959f, 0.038165901f,
58  			0.038421899f, 0.022824399f, 0.022875832f, 0.051715527f, 0.052388512f, 0.019702913f, 0.0043250890f,
59  			0.048235778f, 0.051032901f, 0.027162129f, 0.025408903f, 0.031610597f, 0.042850174f, 0.050530195f,
60  			0.046806872f, 0.034607191f, 0.049424741f, 0.046313401f, 0.025531817f, 0.048190244f, 0.080965556f,
61  			0.026815567f, 0.0052035106f, 0.055121634f, 0.060102295f, 0.037902176f, 0.031605635f, 0.048800021f,
62  			0.043963064f, 0.057726819f, 0.035178956f, 0.028559150f, 0.042949345f, 0.037850309f, 0.022986168f,
63  			0.042727228f, 0.065619022f, 0.023590794f, 0.0050169970f, 0.047420859f, 0.048057895f, 0.029610446f,
64  			0.028105404f, 0.047105607f, 0.027327465f, 0.033368580f, 0.029471992f, 0.025247704f, 0.030378368f,
65  			0.017604819f, 0.020635128f, 0.038072765f, 0.047270447f, 0.018444922f, 0.0044970238f, 0.041575503f,
66  			0.043061554f, 0.018917618f, 0.032360006f, 0.041380052f, 0.021228606f, 0.019630831f, 0.052440125f,
67  			0.064693943f, 0.051602744f, 0.014293334f, 0.029913932f, 0.091856398f, 0.064278424f, 0.014808991f,
68  			0.0076770466f, 0.064135335f, 0.049021900f, 0.019680724f, 0.051093385f, 0.044489235f, 0.039521158f,
69  			0.017224368f, 0.11550237f, 0.14563295f, 0.10168361f, 0.010948794f, 0.056410123f, 0.16154031f, 0.094864123f,
70  			0.010968635f, 0.010099699f, 0.094420627f, 0.051833544f, 0.017393969f, 0.055602603f, 0.065541625f,
71  			0.079191267f, 0.015350847f, 0.063922405f, 0.067393340f, 0.057676509f, 0.011139895f, 0.080759101f,
72  			0.098161645f, 0.061080914f, 0.0093953628f, 0.0054243263f, 0.067971028f, 0.057100475f, 0.016119506f,
73  			0.031782545f, 0.044518668f, 0.046413776f, 0.029956982f, 0.047905959f, 0.032339979f, 0.032173883f,
74  			0.012440396f, 0.045578361f, 0.066145599f, 0.038009968f, 0.010091031f, 0.0036179544f, 0.039468467f,
75  			0.052059561f, 0.015582377f, 0.019935599f, 0.027606398f, 0.030414961f, 0.042168062f, 0.040264152f,
76  			0.031610835f, 0.038086697f, 0.020437658f, 0.025296748f, 0.042459931f, 0.050047271f, 0.015125060f,
77  			0.0043275394f, 0.036199871f, 0.051220134f, 0.021558121f, 0.023908488f, 0.028029522f, 0.043085694f,
78  			0.054681797f, 0.041200534f, 0.024752451f, 0.049873326f, 0.048309073f, 0.022466151f, 0.034132332f,
79  			0.077650055f, 0.023621771f, 0.0064337943f, 0.042234212f, 0.058762085f, 0.036081735f, 0.029185221f,
80  			0.036313891f, 0.045306411f, 0.058721527f, 0.032697052f, 0.021458006f, 0.044796098f, 0.041035056f,
81  			0.018865744f, 0.035646237f, 0.068751343f, 0.021192430f, 0.0060882461f, 0.036897808f, 0.045829114f,
82  			0.026991708f, 0.026499080f, 0.038533002f, 0.027467899f, 0.030959304f, 0.027451877f, 0.019684402f,
83  			0.029752487f, 0.015114918f, 0.019886481f, 0.035413165f, 0.053886551f, 0.016998880f, 0.0057933875f,
84  			0.036588337f, 0.048175231f, 0.014275045f, 0.035625666f, 0.036120355f, 0.024653759f, 0.018249594f,
85  			0.062256541f, 0.066222191f, 0.055329058f, 0.011291362f, 0.028825607f, 0.086778991f, 0.064832069f,
86  			0.013066497f, 0.011415320f, 0.064845748f, 0.046514731f, 0.014692369f, 0.062355563f, 0.041709881f,
87  			0.042214487f, 0.015428864f, 0.10446151f, 0.17937668f, 0.095389351f, 0.0095331138f, 0.068508081f, 0.13804485f,
88  			0.075750761f, 0.0089111943f, 0.017507169f, 0.077072501f, 0.044987909f, 0.016290929f, 0.081897326f,
89  			0.058815241f, 0.082167983f, 0.015640007f, 0.060685322f, 0.088911690f, 0.060277160f, 0.0093928352f,
90  			0.10241364f, 0.097836874f, 0.054865137f, 0.0083698612f, 0.0081831953f, 0.061134785f, 0.051970284f,
91  			0.018681750f, 0.037675269f, 0.040630963f, 0.055019088f, 0.034780238f, 0.049559530f, 0.030929532f,
92  			0.038999509f, 0.011335915f, 0.059835508f, 0.070262119f, 0.043204229f, 0.010112322f, 0.0062562176f,
93  			0.037473395f, 0.052789710f, 0.018155478f, 0.025256813f, 0.024581747f, 0.033427149f, 0.056742582f,
94  			0.034223948f, 0.028312556f, 0.041506916f, 0.021203069f, 0.025936145f, 0.041303877f, 0.059155576f,
95  			0.017005630f, 0.0072355969f, 0.027291914f, 0.047724001f, 0.020905776f, 0.035467941f, 0.028630983f,
96  			0.037815467f, 0.079767756f, 0.037681662f, 0.022026228f, 0.057297591f, 0.053978175f, 0.024579240f,
97  			0.022316556f, 0.086853109f, 0.028040033f, 0.011462901f, 0.030730957f, 0.053329922f, 0.040627658f,
98  			0.032443948f, 0.037443954f, 0.034377534f, 0.074707411f, 0.030513745f, 0.019011058f, 0.045131113f,
99  			0.044377167f, 0.018995941f, 0.027402449f, 0.090617165f, 0.028514232f, 0.010469370f, 0.029884635f,
100 			0.057102341f, 0.030009709f, 0.031177938f, 0.037842747f, 0.027068719f, 0.031185333f, 0.033981670f,
101 			0.023744840f, 0.036383398f, 0.014296676f, 0.023514096f, 0.032435186f, 0.059164431f, 0.018671703f,
102 			0.011011193f, 0.038932264f, 0.059952494f, 0.013762262f, 0.041585848f, 0.031741474f, 0.022219460f,
103 			0.016175767f, 0.056906343f, 0.084976621f, 0.057435218f, 0.010471284f, 0.034502238f, 0.074152656f,
104 			0.070962317f, 0.011339025f, 0.022156404f, 0.078051552f, 0.049927477f, 0.014317687f, 0.080686800f,
105 			0.040462468f, 0.045617785f, 0.015080716f, 0.11186741f, 0.20426024f, 0.060513183f, 0.010476152f, 0.11225390f,
106 			0.077742361f, 0.072043791f, 0.013325306f, 0.033872768f, 0.088241652f, 0.062588558f, 0.025723692f,
107 			0.099388190f, 0.059586637f, 0.097264774f, 0.016014259f, 0.056694452f, 0.088718489f, 0.042319845f,
108 			0.010203361f, 0.16234197f, 0.081540860f, 0.061598502f, 0.011028200f, 0.015181708f, 0.063109390f,
109 			0.053238254f, 0.026953939f, 0.042586997f, 0.043891110f, 0.069812261f, 0.028818293f, 0.034412075f,
110 			0.037375670f, 0.036900192f, 0.014921831f, 0.089079015f, 0.076868184f, 0.051889341f, 0.016416807f,
111 			0.013057522f, 0.033294510f, 0.046031296f, 0.025649477f, 0.031917561f, 0.028383760f, 0.047110867f,
112 			0.061227638f, 0.052393064f, 0.033711378f, 0.052196730f, 0.026734201f, 0.026468627f, 0.038842987f,
113 			0.052697934f, 0.022608377f, 0.014126607f, 0.027068255f, 0.047787704f, 0.027074195f, 0.037166063f,
114 			0.035019524f, 0.041415069f, 0.099047698f, 0.054110698f, 0.023951501f, 0.057764690f, 0.046926331f,
115 			0.030209050f, 0.015523357f, 0.095209658f, 0.044792917f, 0.020908942f, 0.024585087f, 0.063024625f,
116 			0.048416629f, 0.034198940f, 0.036490258f, 0.032968774f, 0.099536031f, 0.032356802f, 0.016915172f,
117 			0.056648780f, 0.042025570f, 0.019042498f, 0.015037887f, 0.11744430f, 0.039354153f, 0.019232148f,
118 			0.027833534f, 0.085626058f, 0.033888493f, 0.034026600f, 0.032164980f, 0.029232003f, 0.037153389f,
119 			0.031591926f, 0.026027171f, 0.038305819f, 0.019974958f, 0.030111406f, 0.028217193f, 0.072229616f,
120 			0.030699752f, 0.022671519f, 0.040712651f, 0.064822800f, 0.022265140f, 0.049488939f, 0.027908966f,
121 			0.023040991f, 0.014598127f, 0.046962097f, 0.10581308f, 0.051630609f, 0.015267688f, 0.041755002f,
122 			0.039096136f, 0.052581567f, 0.017811375f, 0.041781303f, 0.077722602f, 0.058795866f, 0.023143817f,
123 			0.11747333f, 0.040879622f, 0.058432367f, 0.011999181f
124 	});
125 	static FloatFV F2_EXPECTED_256 = new FloatFV(new float[] {
126 			0.0038026988f, 0.0098138675f, 0.0069257827f, 0.012590957f, 0.028134594f, 0.043819178f, 0.0079895435f,
127 			0.020943899f, 0.065874137f, 0.033608928f, 0.016341481f, 0.022539800f, 0.086543076f, 0.076130264f,
128 			0.039856948f, 0.015384405f, 0.0030165028f, 0.0076820245f, 0.0070791077f, 0.012059467f, 0.028133361f,
129 			0.039855964f, 0.0081099579f, 0.020994544f, 0.054162718f, 0.028216030f, 0.017596964f, 0.024088681f,
130 			0.089334778f, 0.070868380f, 0.036782611f, 0.014849583f, 0.0026837783f, 0.0064421692f, 0.0090913447f,
131 			0.016291440f, 0.033530664f, 0.041107319f, 0.010392534f, 0.028858459f, 0.038206141f, 0.032549340f,
132 			0.035133887f, 0.029431408f, 0.063626789f, 0.067956738f, 0.038982905f, 0.015554088f, 0.0032948777f,
133 			0.012873929f, 0.019853709f, 0.025593726f, 0.027558608f, 0.040773120f, 0.019731252f, 0.052120447f,
134 			0.026969263f, 0.042759575f, 0.046330359f, 0.047192510f, 0.047130637f, 0.056805294f, 0.057041284f,
135 			0.023020687f, 0.0034563984f, 0.027988978f, 0.043024961f, 0.040314768f, 0.020941747f, 0.047473498f,
136 			0.033603691f, 0.074803345f, 0.022633009f, 0.049189981f, 0.059940018f, 0.070470415f, 0.048671670f,
137 			0.053408824f, 0.087949730f, 0.038351808f, 0.0029349481f, 0.016635137f, 0.027833614f, 0.038501821f,
138 			0.021274690f, 0.047198649f, 0.026875691f, 0.055662170f, 0.032827582f, 0.037482288f, 0.043023046f,
139 			0.058585856f, 0.061834749f, 0.054179579f, 0.062132690f, 0.033611640f, 0.0026616254f, 0.0097797774f,
140 			0.010376876f, 0.022024931f, 0.034433112f, 0.052829925f, 0.013356565f, 0.034311015f, 0.054393798f,
141 			0.034832250f, 0.021532582f, 0.034031797f, 0.067399696f, 0.064107522f, 0.035545751f, 0.020848133f,
142 			0.0027953705f, 0.0094878878f, 0.0074068969f, 0.013087797f, 0.038201556f, 0.052620683f, 0.0083467523f,
143 			0.024541711f, 0.073971584f, 0.036727197f, 0.016655020f, 0.024900734f, 0.079230972f, 0.074233733f,
144 			0.035153814f, 0.016587546f, 0.0050005340f, 0.011917979f, 0.0078218915f, 0.016128544f, 0.034720503f,
145 			0.054088295f, 0.010155551f, 0.027240695f, 0.078012571f, 0.048165694f, 0.018469751f, 0.028447604f,
146 			0.094261907f, 0.084905490f, 0.036232911f, 0.018414617f, 0.0035716619f, 0.0088583678f, 0.0074737812f,
147 			0.014650555f, 0.036793269f, 0.053552747f, 0.0098980358f, 0.026359040f, 0.050541945f, 0.041425049f,
148 			0.023586361f, 0.030951591f, 0.10427056f, 0.093381912f, 0.041234050f, 0.016727295f, 0.0031704656f,
149 			0.0074216984f, 0.010293650f, 0.020745261f, 0.044353385f, 0.054101188f, 0.012378944f, 0.030193772f,
150 			0.036708307f, 0.043903306f, 0.054950178f, 0.035270873f, 0.069853649f, 0.094057381f, 0.046486665f,
151 			0.017852748f, 0.0040746126f, 0.018338704f, 0.021941444f, 0.030825743f, 0.032292005f, 0.049456090f,
152 			0.023991883f, 0.055539858f, 0.027616132f, 0.055789735f, 0.065759286f, 0.052680593f, 0.050192066f,
153 			0.066962525f, 0.076382622f, 0.023708692f, 0.0046938262f, 0.043130133f, 0.053273931f, 0.047031362f,
154 			0.024458034f, 0.068650678f, 0.044074737f, 0.074053787f, 0.023707218f, 0.067298189f, 0.080740340f,
155 			0.069585487f, 0.049369279f, 0.061505362f, 0.11517283f, 0.037926044f, 0.0035616332f, 0.024840824f,
156 			0.034693558f, 0.052136078f, 0.028733555f, 0.065090112f, 0.037851125f, 0.060842577f, 0.041592348f,
157 			0.050978042f, 0.061782233f, 0.061665524f, 0.062808618f, 0.059362598f, 0.078095019f, 0.036502004f,
158 			0.0033038780f, 0.013846943f, 0.010395261f, 0.031023880f, 0.051697589f, 0.065927714f, 0.018403057f,
159 			0.046254806f, 0.071292497f, 0.048812810f, 0.029964410f, 0.039651271f, 0.064233877f, 0.060878776f,
160 			0.040318657f, 0.024688857f, 0.0034101836f, 0.012744213f, 0.0076407799f, 0.015397622f, 0.047206197f,
161 			0.060478445f, 0.010369522f, 0.032684084f, 0.10075013f, 0.050345220f, 0.020172169f, 0.030228835f,
162 			0.083317801f, 0.068082079f, 0.034492727f, 0.018872008f, 0.0085337078f, 0.020007147f, 0.0077328859f,
163 			0.021391155f, 0.041938629f, 0.080419295f, 0.012326146f, 0.028666316f, 0.11394993f, 0.067991294f,
164 			0.021907052f, 0.028483439f, 0.097954735f, 0.097937904f, 0.039042853f, 0.020743404f, 0.0051229056f,
165 			0.013472466f, 0.0080669280f, 0.019925889f, 0.037505787f, 0.077935360f, 0.013645086f, 0.031511202f,
166 			0.057727139f, 0.064485498f, 0.029238191f, 0.027594484f, 0.11999246f, 0.11378540f, 0.055494823f, 0.016375817f,
167 			0.0037197671f, 0.010701302f, 0.012325925f, 0.021848144f, 0.041084588f, 0.075690724f, 0.015423958f,
168 			0.030644055f, 0.041085891f, 0.067101084f, 0.080963537f, 0.035946041f, 0.093588293f, 0.10016552f,
169 			0.062406700f, 0.015991621f, 0.0051430650f, 0.020113274f, 0.018722136f, 0.030679844f, 0.038231459f,
170 			0.067074247f, 0.025189016f, 0.046626229f, 0.031456586f, 0.074941471f, 0.094541095f, 0.043518655f,
171 			0.061000973f, 0.073092282f, 0.10194506f, 0.024147367f, 0.0065730391f, 0.044399936f, 0.040634785f,
172 			0.043380417f, 0.034014750f, 0.097119562f, 0.045352288f, 0.050197296f, 0.027722247f, 0.085757956f,
173 			0.099213690f, 0.054761380f, 0.052755591f, 0.074795321f, 0.15348274f, 0.033041522f, 0.0048891399f,
174 			0.029152036f, 0.032321323f, 0.076206014f, 0.044552207f, 0.084244065f, 0.050488532f, 0.067471325f,
175 			0.058484975f, 0.059663147f, 0.080343544f, 0.048233874f, 0.074455641f, 0.073399767f, 0.10320414f,
176 			0.031791434f, 0.0040005017f, 0.022178823f, 0.012346494f, 0.051569782f, 0.074762285f, 0.085888311f,
177 			0.026840372f, 0.060056921f, 0.11754924f, 0.061738439f, 0.041993301f, 0.033308111f, 0.069027752f,
178 			0.062083367f, 0.040036894f, 0.021705318f, 0.0053809285f, 0.017918000f, 0.0070806770f, 0.018077049f,
179 			0.061945841f, 0.070811331f, 0.014092621f, 0.036721636f, 0.14581580f, 0.067185126f, 0.024978468f,
180 			0.031696357f, 0.089413479f, 0.070212759f, 0.037604861f, 0.016922850f, 0.018143965f, 0.035894170f,
181 			0.010854657f, 0.025356691f, 0.042001080f, 0.087903976f, 0.013209487f, 0.024779940f, 0.11435723f,
182 			0.096671775f, 0.024441438f, 0.029109938f, 0.11381348f, 0.084080607f, 0.046526160f, 0.025066292f,
183 			0.0097108763f, 0.020094581f, 0.0087864427f, 0.017984867f, 0.031417049f, 0.084405556f, 0.014440752f,
184 			0.025947653f, 0.084639907f, 0.066951215f, 0.028494352f, 0.016633917f, 0.13165030f, 0.10488884f, 0.061864864f,
185 			0.018782400f, 0.0050915396f, 0.013445336f, 0.011942014f, 0.022692047f, 0.034125600f, 0.089505993f,
186 			0.018753238f, 0.031834979f, 0.056737684f, 0.098310038f, 0.082164794f, 0.025480745f, 0.093597062f,
187 			0.068399638f, 0.073157638f, 0.014659788f, 0.0088924458f, 0.025413100f, 0.017455552f, 0.030792672f,
188 			0.043776650f, 0.092555568f, 0.020337854f, 0.031947549f, 0.040407568f, 0.096544258f, 0.096088856f,
189 			0.027738210f, 0.072170466f, 0.060153484f, 0.094922967f, 0.024260866f, 0.0086489674f, 0.055146985f,
190 			0.038271856f, 0.047473706f, 0.054018464f, 0.13112946f, 0.041223601f, 0.036754634f, 0.027309161f, 0.10322884f,
191 			0.087099537f, 0.045174990f, 0.071290828f, 0.058157634f, 0.13741876f, 0.034201700f, 0.0079926755f,
192 			0.035438817f, 0.029708017f, 0.13521019f, 0.054835916f, 0.070133053f, 0.053651217f, 0.087274686f,
193 			0.059275106f, 0.059668157f, 0.069664411f, 0.044379033f, 0.10396621f, 0.055742010f, 0.095128052f,
194 			0.026643716f, 0.0085416697f, 0.023893630f, 0.014278234f, 0.094576612f, 0.092471264f, 0.060680896f,
195 			0.031778544f, 0.085589007f, 0.12375094f, 0.079233281f, 0.040589139f, 0.028737243f, 0.076783165f,
196 			0.041484818f, 0.031960353f, 0.020109612f, 0.012700555f, 0.025701161f, 0.0093460791f, 0.025048085f,
197 			0.084710129f, 0.063166283f, 0.017373998f, 0.034417756f, 0.12995252f, 0.091876157f, 0.022917463f,
198 			0.029610610f, 0.063783191f, 0.054517299f, 0.028383728f, 0.020019136f
199 	});
200 	FImage demo1;
201 	FImage demo2;
202 
203 	/**
204 	 * Constructor
205 	 * 
206 	 * @throws IOException
207 	 */
208 	public GistTest() throws IOException {
209 		demo1 = ImageUtilities.readMBF(GistTest.class.getResource("demo1.jpg")).flatten();
210 		demo2 = ImageUtilities.readMBF(GistTest.class.getResource("demo2.jpg")).flatten();
211 	}
212 
213 	/**
214 	 * Test features and distance
215 	 * 
216 	 * @throws Exception
217 	 */
218 	@Test
219 	public void testFeaturesAndDistance() throws Exception {
220 		final Gist<FImage> fsg = new Gist<FImage>(256, 256);
221 		fsg.analyseImage(demo1);
222 		final FloatFV f1 = fsg.getResponse();
223 
224 		assertArrayEquals(f1.values, F1_EXPECTED_256.values, 0.01f);
225 
226 		fsg.analyseImage(demo2);
227 		final FloatFV f2 = fsg.getResponse();
228 		assertArrayEquals(f2.values, F2_EXPECTED_256.values, 0.05f);
229 
230 		final double d = FloatFVComparison.SUM_SQUARE.compare(f1, f2);
231 		assertEquals(d, 0.8960182, 0.005);
232 	}
233 }