34 #ifndef __INCLUDE_MIST_SALIENCY_MAP__
35 #define __INCLUDE_MIST_SALIENCY_MAP__
37 #ifndef __INCLUDE_MIST_H__
41 #ifndef __INCLUDE_MIST_COLOR_H__
45 #ifndef __INCLUDE_MIST_INTERPOLATE__
49 #ifndef __INCLUDE_FILTER_LINEAR_FILTER_H__
60 typedef double value_type;
64 value_type GABOR_KERNELS[ ][ 17 ][ 17 ] = { { { -0.000213458164049294360000, -0.000216644186888885490000, -0.000267420737091965140000, -0.000216644186888885440000, 0.000150241317361511160000, -0.000216644186888885630000, -0.00141849613025914330000, -0.000216644186888885380000, 0.00156829918464734320000, -0.000216644186888885380000, -0.00141849613025914330000, -0.000216644186888885630000, 0.000150241317361511160000, -0.000216644186888885440000, -0.000267420737091965140000, -0.000216644186888885490000, -0.000213458164049294360000 },
65 { -0.000202603142700600670000, -0.000216644186888885520000, -0.000440420293033059370000, -0.000216644186888885280000, 0.001400248044141730000, -0.000216644186888886090000, -0.00551329681440221750000, -0.000216644186888885060000, 0.0076497365690452760000, -0.000216644186888885060000, -0.00551329681440221750000, -0.000216644186888886090000, 0.001400248044141730000, -0.000216644186888885280000, -0.000440420293033059370000, -0.000216644186888885520000, -0.000202603142700600670000 },
66 { -0.000165867636685805850000, -0.00021664418688888560000, -0.00102588447810310350000, -0.000216644186888884760000, 0.00563051421821007290000, -0.000216644186888887630000, -0.019370899699708920000, -0.000216644186888883920000, 0.0282305049007476120000, -0.000216644186888883920000, -0.019370899699708920000, -0.000216644186888887630000, 0.00563051421821007290000, -0.000216644186888884760000, -0.00102588447810310350000, -0.00021664418688888560000, -0.000165867636685805850000 },
67 { -6.59695199285921010000e-005, -0.000216644186888885790000, -0.0026179891164260210000, -0.000216644186888883320000, 0.0171342518828273910000, -0.000216644186888891860000, -0.0570551071924256320000, -0.00021664418688888080000, 0.0841976119531329390000, -0.00021664418688888080000, -0.0570551071924256320000, -0.000216644186888891860000, 0.0171342518828273910000, -0.000216644186888883320000, -0.0026179891164260210000, -0.000216644186888885790000, -6.59695199285921010000e-005 },
68 { 0.000150241317361511160000, -0.00021664418688888620000, -0.00606380259198784420000, -0.000216644186888880180000, 0.0420319459852840570000, -0.0002166441868889010000, -0.138615544156578060000, -0.000216644186888874080000, 0.205327974259260050000, -0.000216644186888874080000, -0.138615544156578060000, -0.0002166441868889010000, 0.0420319459852840570000, -0.000216644186888880180000, -0.00606380259198784420000, -0.00021664418688888620000, 0.000150241317361511160000 },
69 { 0.000516406710280523270000, -0.000216644186888886870000, -0.0118994843784274890000, -0.000216644186888874870000, 0.0841976119531329390000, -0.000216644186888916470000, -0.276742799117225710000, -0.000216644186888862720000, 0.410469156191473670000, -0.000216644186888862720000, -0.276742799117225710000, -0.000216644186888916470000, 0.0841976119531329390000, -0.000216644186888874870000, -0.0118994843784274890000, -0.000216644186888886870000, 0.000516406710280523270000 },
70 { 0.000985207756481372430000, -0.000216644186888887770000, -0.019370899699708920000, -0.000216644186888868090000, 0.13818225578280030000, -0.000216644186888936290000, -0.45358693263348410000, -0.000216644186888848140000, 0.673111127738935560000, -0.000216644186888848140000, -0.45358693263348410000, -0.000216644186888936290000, 0.13818225578280030000, -0.000216644186888868090000, -0.019370899699708920000, -0.000216644186888887770000, 0.000985207756481372430000 },
71 { 0.001400248044141730000, -0.000216644186888888560000, -0.0259855145545702070000, -0.000216644186888862070000, 0.185976095591570160000, -0.000216644186888953820000, -0.610151088452771220000, -0.000216644186888835240000, 0.905634071759926610000, -0.000216644186888835240000, -0.610151088452771220000, -0.000216644186888953820000, 0.185976095591570160000, -0.000216644186888862070000, -0.0259855145545702070000, -0.000216644186888888560000, 0.001400248044141730000 },
72 { 0.00156829918464734320000, -0.000216644186888888850000, -0.0286637932745253820000, -0.000216644186888859660000, 0.205327974259260050000, -0.000216644186888960930000, -0.673544416112713430000, -0.000216644186888830040000, 0.999783355813111060000, -0.000216644186888830040000, -0.673544416112713430000, -0.000216644186888960930000, 0.205327974259260050000, -0.000216644186888859660000, -0.0286637932745253820000, -0.000216644186888888850000, 0.00156829918464734320000 },
73 { 0.001400248044141730000, -0.000216644186888888560000, -0.0259855145545702070000, -0.000216644186888862070000, 0.185976095591570160000, -0.000216644186888953820000, -0.610151088452771220000, -0.000216644186888835240000, 0.905634071759926610000, -0.000216644186888835240000, -0.610151088452771220000, -0.000216644186888953820000, 0.185976095591570160000, -0.000216644186888862070000, -0.0259855145545702070000, -0.000216644186888888560000, 0.001400248044141730000 },
74 { 0.000985207756481372430000, -0.000216644186888887770000, -0.019370899699708920000, -0.000216644186888868090000, 0.13818225578280030000, -0.000216644186888936290000, -0.45358693263348410000, -0.000216644186888848140000, 0.673111127738935560000, -0.000216644186888848140000, -0.45358693263348410000, -0.000216644186888936290000, 0.13818225578280030000, -0.000216644186888868090000, -0.019370899699708920000, -0.000216644186888887770000, 0.000985207756481372430000 },
75 { 0.000516406710280523270000, -0.000216644186888886870000, -0.0118994843784274890000, -0.000216644186888874870000, 0.0841976119531329390000, -0.000216644186888916470000, -0.276742799117225710000, -0.000216644186888862720000, 0.410469156191473670000, -0.000216644186888862720000, -0.276742799117225710000, -0.000216644186888916470000, 0.0841976119531329390000, -0.000216644186888874870000, -0.0118994843784274890000, -0.000216644186888886870000, 0.000516406710280523270000 },
76 { 0.000150241317361511160000, -0.00021664418688888620000, -0.00606380259198784420000, -0.000216644186888880180000, 0.0420319459852840570000, -0.0002166441868889010000, -0.138615544156578060000, -0.000216644186888874080000, 0.205327974259260050000, -0.000216644186888874080000, -0.138615544156578060000, -0.0002166441868889010000, 0.0420319459852840570000, -0.000216644186888880180000, -0.00606380259198784420000, -0.00021664418688888620000, 0.000150241317361511160000 },
77 { -6.59695199285921010000e-005, -0.000216644186888885790000, -0.0026179891164260210000, -0.000216644186888883320000, 0.0171342518828273910000, -0.000216644186888891860000, -0.0570551071924256320000, -0.00021664418688888080000, 0.0841976119531329390000, -0.00021664418688888080000, -0.0570551071924256320000, -0.000216644186888891860000, 0.0171342518828273910000, -0.000216644186888883320000, -0.0026179891164260210000, -0.000216644186888885790000, -6.59695199285921010000e-005 },
78 { -0.000165867636685805850000, -0.00021664418688888560000, -0.00102588447810310350000, -0.000216644186888884760000, 0.00563051421821007290000, -0.000216644186888887630000, -0.019370899699708920000, -0.000216644186888883920000, 0.0282305049007476120000, -0.000216644186888883920000, -0.019370899699708920000, -0.000216644186888887630000, 0.00563051421821007290000, -0.000216644186888884760000, -0.00102588447810310350000, -0.00021664418688888560000, -0.000165867636685805850000 },
79 { -0.000202603142700600670000, -0.000216644186888885520000, -0.000440420293033059370000, -0.000216644186888885280000, 0.001400248044141730000, -0.000216644186888886090000, -0.00551329681440221750000, -0.000216644186888885060000, 0.0076497365690452760000, -0.000216644186888885060000, -0.00551329681440221750000, -0.000216644186888886090000, 0.001400248044141730000, -0.000216644186888885280000, -0.000440420293033059370000, -0.000216644186888885520000, -0.000202603142700600670000 },
80 { -0.000213458164049294360000, -0.000216644186888885490000, -0.000267420737091965140000, -0.000216644186888885440000, 0.000150241317361511160000, -0.000216644186888885630000, -0.00141849613025914330000, -0.000216644186888885380000, 0.00156829918464734320000, -0.000216644186888885380000, -0.00141849613025914330000, -0.000216644186888885630000, 0.000150241317361511160000, -0.000216644186888885440000, -0.000267420737091965140000, -0.000216644186888885490000, -0.000213458164049294360000 } },
81 { { -0.000214134630995543680000, -0.000223776723112709650000, -0.000265786932032037330000, -0.000260486197811391280000, 4.97134655875106870000e-005, 0.000473356818591131160000, -8.17539241526291530000e-005, -0.00157541215951787070000, -0.00174750913491093460000, -8.81425456724273390000e-005, 0.000899967028943327880000, 0.000330813391145330870000, -0.000313327068380500440000, -0.000363588772779722020000, -0.000246397192664999550000, -0.00020940739692195480000, -0.000212455820116682450000 },
82 { -0.000223776723112709650000, -0.000276752245330171990000, -0.000282242920061493450000, 0.000264630954308320160000, 0.00130408425975803420000, 0.000144252542662046390000, -0.00467000861014636990000, -0.00633109010842272490000, 0.000404658013336243150000, 0.00639879059704404240000, 0.00373276550870103390000, -0.00107580924696983940000, -0.00180326268368728290000, -0.000617847560383964750000, -0.000116281707141739880000, -0.000153761896758942150000, -0.000209407396921954830000 },
83 { -0.000265786932032037330000, -0.000282242920061493450000, 0.000369653036981674190000, 0.00204139576350936950000, 0.000435739447470087230000, -0.0100406499670049570000, -0.0166541339484946040000, 0.00181635064276655070000, 0.0261901829988486910000, 0.0189938484443885790000, -0.00531556469607083990000, -0.0116869818686263660000, -0.00375726491171347180000, 0.000850593343845249870000, 0.000593598448257943650000, -0.000116281707141740460000, -0.000246397192664999660000 },
84 { -0.000260486197811391280000, 0.000264630954308320160000, 0.00204139576350936650000, 0.00057817812008419990000, -0.0148073585873103630000, -0.0299680542957719880000, 0.00426632915846320620000, 0.0707639371444771930000, 0.0627112466972920560000, -0.020575313029809510000, -0.0560251303734258590000, -0.0212138851397783850000, 0.0074884308558516030000, 0.00691012479671693210000, 0.000850593343845247050000, -0.000617847560383965940000, -0.000363588772779721920000 },
85 { 4.97134655875090610000e-005, 0.00130408425975803520000, 0.000435739447470087230000, -0.0148073585873103630000, -0.036474065750403670000, 0.00644080571244505780000, 0.128251963105421830000, 0.138582356490498270000, -0.0549429945321079360000, -0.183037643453210440000, -0.0840438371584509430000, 0.0372656250325677850000, 0.042032948329216710000, 0.00748843085585157960000, -0.00375726491171348220000, -0.00180326268368728250000, -0.000313327068380500060000 },
86 { 0.000473356818591131590000, 0.000144252542662051760000, -0.0100406499670049570000, -0.0299680542957719880000, 0.00644080571244505780000, 0.156344196320753580000, 0.205921701841042190000, -0.0992679611922332730000, -0.403466596458147640000, -0.225548122324692350000, 0.122566351210613960000, 0.168447184789459910000, 0.0372656250325676670000, -0.0212138851397784230000, -0.0116869818686263630000, -0.00107580924696983480000, 0.000330813391145331730000 },
87 { -8.17539241526270390000e-005, -0.00467000861014636990000, -0.0166541339484945930000, 0.0042663291584632080000, 0.128251963105421670000, 0.205921701841042190000, -0.120927903064719770000, -0.599108144764422870000, -0.408050183798901730000, 0.270604912971661450000, 0.453154646603639020000, 0.122566351210613680000, -0.0840438371584510820000, -0.0560251303734258170000, -0.0053155646960708260000, 0.00373276550870103650000, 0.000899967028943327010000 },
88 { -0.00157541215951787070000, -0.00633109010842273020000, 0.00181635064276650390000, 0.0707639371444771380000, 0.138582356490498380000, -0.0992679611922332730000, -0.599108144764422650000, -0.497232067982842470000, 0.401996425008270990000, 0.820349877738402070000, 0.270604912971661280000, -0.225548122324692460000, -0.183037643453210440000, -0.020575313029809510000, 0.0189938484443886170000, 0.00639879059704402940000, -8.81425456724330850000e-005 },
89 { -0.00174750913491093460000, 0.000404658013336229270000, 0.0261901829988486730000, 0.0627112466972920970000, -0.0549429945321079360000, -0.403466596458147590000, -0.408050183798901730000, 0.401996425008270990000, 0.99978435815704370000, 0.401996425008270990000, -0.408050183798901730000, -0.403466596458147590000, -0.0549429945321079360000, 0.0627112466972920970000, 0.0261901829988486730000, 0.000404658013336229270000, -0.00174750913491093460000 },
90 { -8.81425456724330850000e-005, 0.00639879059704402940000, 0.0189938484443886170000, -0.020575313029809510000, -0.183037643453210440000, -0.225548122324692460000, 0.270604912971661280000, 0.820349877738402070000, 0.401996425008270990000, -0.497232067982842470000, -0.599108144764422650000, -0.0992679611922332730000, 0.138582356490498380000, 0.0707639371444771380000, 0.00181635064276650390000, -0.00633109010842273020000, -0.00157541215951787070000 },
91 { 0.000899967028943327010000, 0.00373276550870103650000, -0.0053155646960708260000, -0.0560251303734258170000, -0.0840438371584510820000, 0.122566351210613680000, 0.453154646603639020000, 0.270604912971661450000, -0.408050183798901730000, -0.599108144764422870000, -0.120927903064719770000, 0.205921701841042190000, 0.128251963105421670000, 0.0042663291584632080000, -0.0166541339484945930000, -0.00467000861014636990000, -8.17539241526270390000e-005 },
92 { 0.000330813391145331730000, -0.00107580924696983480000, -0.0116869818686263630000, -0.0212138851397784230000, 0.0372656250325676670000, 0.168447184789459910000, 0.122566351210613960000, -0.225548122324692350000, -0.403466596458147640000, -0.0992679611922332730000, 0.205921701841042190000, 0.156344196320753580000, 0.00644080571244505780000, -0.0299680542957719880000, -0.0100406499670049570000, 0.000144252542662051760000, 0.000473356818591131590000 },
93 { -0.000313327068380500060000, -0.00180326268368728250000, -0.00375726491171348220000, 0.00748843085585157960000, 0.042032948329216710000, 0.0372656250325677850000, -0.0840438371584509430000, -0.183037643453210440000, -0.0549429945321079360000, 0.138582356490498270000, 0.128251963105421830000, 0.00644080571244505780000, -0.036474065750403670000, -0.0148073585873103630000, 0.000435739447470087230000, 0.00130408425975803520000, 4.97134655875090610000e-005 },
94 { -0.000363588772779721920000, -0.000617847560383965940000, 0.000850593343845247050000, 0.00691012479671693210000, 0.0074884308558516030000, -0.0212138851397783850000, -0.0560251303734258590000, -0.020575313029809510000, 0.0627112466972920560000, 0.0707639371444771930000, 0.00426632915846320620000, -0.0299680542957719880000, -0.0148073585873103630000, 0.00057817812008419990000, 0.00204139576350936650000, 0.000264630954308320160000, -0.000260486197811391280000 },
95 { -0.000246397192664999660000, -0.000116281707141740460000, 0.000593598448257943650000, 0.000850593343845249870000, -0.00375726491171347180000, -0.0116869818686263660000, -0.00531556469607083990000, 0.0189938484443885790000, 0.0261901829988486910000, 0.00181635064276655070000, -0.0166541339484946040000, -0.0100406499670049570000, 0.000435739447470087230000, 0.00204139576350936950000, 0.000369653036981674190000, -0.000282242920061493450000, -0.000265786932032037330000 },
96 { -0.000209407396921954830000, -0.000153761896758942150000, -0.000116281707141739880000, -0.000617847560383964750000, -0.00180326268368728290000, -0.00107580924696983940000, 0.00373276550870103390000, 0.00639879059704404240000, 0.000404658013336243150000, -0.00633109010842272490000, -0.00467000861014636990000, 0.000144252542662046390000, 0.00130408425975803420000, 0.000264630954308320160000, -0.000282242920061493450000, -0.000276752245330171990000, -0.000223776723112709650000 },
97 { -0.000212455820116682450000, -0.00020940739692195480000, -0.000246397192664999550000, -0.000363588772779722020000, -0.000313327068380500440000, 0.000330813391145330870000, 0.000899967028943327880000, -8.81425456724273390000e-005, -0.00174750913491093460000, -0.00157541215951787070000, -8.17539241526291530000e-005, 0.000473356818591131160000, 4.97134655875106870000e-005, -0.000260486197811391280000, -0.000265786932032037330000, -0.000223776723112709650000, -0.000214134630995543680000 } },
98 { { -0.000213458164049299130000, -0.000202603142700605410000, -0.000165867636685810620000, -6.59695199285968710000e-005, 0.000150241317361506390000, 0.00051640671028051850000, 0.000985207756481367660000, 0.00140024804414172520000, 0.00156829918464733840000, 0.00140024804414172520000, 0.000985207756481367660000, 0.00051640671028051850000, 0.000150241317361506390000, -6.59695199285971420000e-005, -0.00016586763668581070000, -0.000202603142700605470000, -0.000213458164049299130000 },
99 { -0.000216644186888890240000, -0.000216644186888890290000, -0.000216644186888890370000, -0.000216644186888890560000, -0.000216644186888890970000, -0.000216644186888891650000, -0.000216644186888892540000, -0.000216644186888893330000, -0.000216644186888893620000, -0.000216644186888893330000, -0.000216644186888892540000, -0.000216644186888891650000, -0.000216644186888890970000, -0.000216644186888890560000, -0.000216644186888890370000, -0.000216644186888890290000, -0.000216644186888890290000 },
100 { -0.000267420737091969860000, -0.000440420293033064140000, -0.00102588447810310820000, -0.00261798911642602580000, -0.00606380259198784860000, -0.0118994843784274940000, -0.0193708996997089270000, -0.0259855145545702140000, -0.0286637932745253880000, -0.0259855145545702140000, -0.0193708996997089270000, -0.0118994843784274940000, -0.00606380259198784860000, -0.00261798911642602580000, -0.00102588447810310820000, -0.000440420293033064140000, -0.000267420737091969910000 },
101 { -0.000216644186888890480000, -0.000216644186888890050000, -0.000216644186888889530000, -0.000216644186888888090000, -0.000216644186888884950000, -0.000216644186888879640000, -0.000216644186888872860000, -0.000216644186888866840000, -0.000216644186888864430000, -0.000216644186888866840000, -0.000216644186888872860000, -0.000216644186888879640000, -0.000216644186888884950000, -0.000216644186888888090000, -0.000216644186888889530000, -0.000216644186888890050000, -0.000216644186888889940000 },
102 { 0.000150241317361506390000, 0.00140024804414172520000, 0.00563051421821006860000, 0.0171342518828273840000, 0.0420319459852840780000, 0.0841976119531329250000, 0.13818225578280030000, 0.185976095591570160000, 0.205327974259260050000, 0.185976095591570160000, 0.13818225578280030000, 0.0841976119531328840000, 0.0420319459852840780000, 0.0171342518828273840000, 0.00563051421821006860000, 0.00140024804414172520000, 0.000150241317361506390000 },
103 { -0.000216644186888889750000, -0.000216644186888887990000, -0.000216644186888882020000, -0.000216644186888865840000, -0.000216644186888830790000, -0.000216644186888921240000, -0.000216644186888941060000, -0.000216644186888958590000, -0.00021664418688896570000, -0.000216644186888958590000, -0.000216644186888941060000, -0.000216644186888921240000, -0.000216644186888980740000, -0.000216644186888927420000, -0.000216644186888902790000, -0.000216644186888893730000, -0.000216644186888891050000 },
104 { -0.00141849613025914810000, -0.00551329681440222190000, -0.0193708996997089270000, -0.0570551071924256320000, -0.138615544156578060000, -0.276742799117225710000, -0.453586932633484150000, -0.610151088452771220000, -0.673544416112713430000, -0.610151088452771220000, -0.453586932633484150000, -0.276742799117225710000, -0.138615544156578060000, -0.0570551071924256320000, -0.0193708996997089270000, -0.00551329681440222190000, -0.00141849613025914810000 },
105 { -0.000216644186888891240000, -0.000216644186888894570000, -0.000216644186888905850000, -0.000216644186888919540000, -0.000216644186888961550000, -0.00021664418688903270000, -0.000216644186889123770000, -0.000216644186888840010000, -0.000216644186888834810000, -0.000216644186888657810000, -0.00021664418688871750000, -0.000216644186888702260000, -0.000216644186888796180000, -0.000216644186888851610000, -0.000216644186888877250000, -0.000216644186888885090000, -0.00021664418688888910000 },
106 { 0.00156829918464733840000, 0.00764973656904527170000, 0.0282305049007476050000, 0.0841976119531329250000, 0.205327974259260050000, 0.410469156191473670000, 0.673111127738935560000, 0.905634071759926610000, 0.999783355813111060000, 0.905634071759926610000, 0.673111127738935560000, 0.410469156191473670000, 0.205327974259260050000, 0.0841976119531329250000, 0.0282305049007476050000, 0.00764973656904527170000, 0.00156829918464733840000 },
107 { -0.00021664418688888910000, -0.000216644186888885090000, -0.000216644186888877250000, -0.000216644186888851610000, -0.000216644186888796180000, -0.000216644186888702260000, -0.00021664418688871750000, -0.000216644186888657810000, -0.000216644186888834810000, -0.000216644186888840010000, -0.000216644186889123770000, -0.00021664418688903270000, -0.000216644186888961550000, -0.000216644186888919540000, -0.000216644186888905850000, -0.000216644186888894570000, -0.000216644186888891240000 },
108 { -0.00141849613025914810000, -0.00551329681440222190000, -0.0193708996997089270000, -0.0570551071924256320000, -0.138615544156578060000, -0.276742799117225710000, -0.453586932633484150000, -0.610151088452771220000, -0.673544416112713430000, -0.610151088452771220000, -0.453586932633484150000, -0.276742799117225710000, -0.138615544156578060000, -0.0570551071924256320000, -0.0193708996997089270000, -0.00551329681440222190000, -0.00141849613025914810000 },
109 { -0.000216644186888891050000, -0.000216644186888893730000, -0.000216644186888902790000, -0.000216644186888927420000, -0.000216644186888980740000, -0.000216644186888921240000, -0.000216644186888941060000, -0.000216644186888958590000, -0.00021664418688896570000, -0.000216644186888958590000, -0.000216644186888941060000, -0.000216644186888921240000, -0.000216644186888830790000, -0.000216644186888865840000, -0.000216644186888882020000, -0.000216644186888887990000, -0.000216644186888889750000 },
110 { 0.000150241317361506390000, 0.00140024804414172520000, 0.00563051421821006860000, 0.0171342518828273840000, 0.0420319459852840780000, 0.0841976119531328840000, 0.13818225578280030000, 0.185976095591570160000, 0.205327974259260050000, 0.185976095591570160000, 0.13818225578280030000, 0.0841976119531329250000, 0.0420319459852840780000, 0.0171342518828273840000, 0.00563051421821006860000, 0.00140024804414172520000, 0.000150241317361506390000 },
111 { -0.000216644186888889940000, -0.000216644186888890050000, -0.000216644186888889530000, -0.000216644186888888090000, -0.000216644186888884950000, -0.000216644186888879640000, -0.000216644186888872860000, -0.000216644186888866840000, -0.000216644186888864430000, -0.000216644186888866840000, -0.000216644186888872860000, -0.000216644186888879640000, -0.000216644186888884950000, -0.000216644186888888090000, -0.000216644186888889530000, -0.000216644186888890050000, -0.000216644186888890480000 },
112 { -0.000267420737091969910000, -0.000440420293033064140000, -0.00102588447810310820000, -0.00261798911642602580000, -0.00606380259198784860000, -0.0118994843784274940000, -0.0193708996997089270000, -0.0259855145545702140000, -0.0286637932745253880000, -0.0259855145545702140000, -0.0193708996997089270000, -0.0118994843784274940000, -0.00606380259198784860000, -0.00261798911642602580000, -0.00102588447810310820000, -0.000440420293033064140000, -0.000267420737091969860000 },
113 { -0.000216644186888890290000, -0.000216644186888890290000, -0.000216644186888890370000, -0.000216644186888890560000, -0.000216644186888890970000, -0.000216644186888891650000, -0.000216644186888892540000, -0.000216644186888893330000, -0.000216644186888893620000, -0.000216644186888893330000, -0.000216644186888892540000, -0.000216644186888891650000, -0.000216644186888890970000, -0.000216644186888890560000, -0.000216644186888890370000, -0.000216644186888890290000, -0.000216644186888890240000 },
114 { -0.000213458164049299130000, -0.000202603142700605470000, -0.00016586763668581070000, -6.59695199285971420000e-005, 0.000150241317361506390000, 0.00051640671028051850000, 0.000985207756481367660000, 0.00140024804414172520000, 0.00156829918464733840000, 0.00140024804414172520000, 0.000985207756481367660000, 0.00051640671028051850000, 0.000150241317361506390000, -6.59695199285968710000e-005, -0.000165867636685810620000, -0.000202603142700605410000, -0.000213458164049299130000 } },
115 { { -0.000212455820116683020000, -0.00020940739692195540000, -0.000246397192665000250000, -0.000363588772779722510000, -0.000313327068380500610000, 0.000330813391145331190000, 0.000899967028943326470000, -8.81425456724336540000e-005, -0.00174750913491093520000, -0.00157541215951787130000, -8.17539241526276080000e-005, 0.000473356818591131050000, 4.97134655875084920000e-005, -0.000260486197811391870000, -0.000265786932032037870000, -0.000223776723112710220000, -0.000214134630995544250000 },
116 { -0.000209407396921955370000, -0.000153761896758942750000, -0.000116281707141741030000, -0.000617847560383966480000, -0.00180326268368728310000, -0.00107580924696983530000, 0.0037327655087010360000, 0.00639879059704402850000, 0.000404658013336228730000, -0.0063310901084227310000, -0.00467000861014637070000, 0.000144252542662051190000, 0.00130408425975803460000, 0.000264630954308319620000, -0.000282242920061493990000, -0.000276752245330172530000, -0.000223776723112710220000 },
117 { -0.000246397192665000140000, -0.000116281707141740450000, 0.000593598448257943110000, 0.000850593343845246510000, -0.00375726491171348270000, -0.0116869818686263640000, -0.00531556469607082690000, 0.0189938484443886170000, 0.0261901829988486730000, 0.00181635064276650320000, -0.0166541339484945930000, -0.0100406499670049570000, 0.000435739447470086680000, 0.00204139576350936610000, 0.000369653036981673640000, -0.000282242920061493990000, -0.000265786932032037870000 },
118 { -0.000363588772779722570000, -0.000617847560383965290000, 0.000850593343845249330000, 0.00691012479671693130000, 0.00748843085585157880000, -0.0212138851397784230000, -0.0560251303734258170000, -0.020575313029809510000, 0.0627112466972920970000, 0.0707639371444771380000, 0.00426632915846320710000, -0.0299680542957719880000, -0.0148073585873103630000, 0.000578178120084199360000, 0.00204139576350936910000, 0.000264630954308319620000, -0.000260486197811391870000 },
119 { -0.000313327068380500990000, -0.00180326268368728360000, -0.00375726491171347230000, 0.00748843085585160220000, 0.042032948329216710000, 0.0372656250325676670000, -0.0840438371584510820000, -0.183037643453210440000, -0.0549429945321079360000, 0.138582356490498380000, 0.128251963105421670000, 0.00644080571244505690000, -0.036474065750403670000, -0.0148073585873103630000, 0.000435739447470086680000, 0.00130408425975803350000, 4.97134655875101180000e-005 },
120 { 0.000330813391145330320000, -0.001075809246969840000, -0.0116869818686263680000, -0.0212138851397783850000, 0.0372656250325677850000, 0.168447184789459910000, 0.122566351210613680000, -0.225548122324692460000, -0.403466596458147590000, -0.0992679611922332730000, 0.205921701841042190000, 0.156344196320753580000, 0.00644080571244505690000, -0.0299680542957719880000, -0.0100406499670049570000, 0.000144252542662045820000, 0.000473356818591130620000 },
121 { 0.000899967028943327330000, 0.00373276550870103340000, -0.00531556469607084080000, -0.0560251303734258590000, -0.0840438371584509430000, 0.122566351210613960000, 0.453154646603639020000, 0.270604912971661280000, -0.408050183798901730000, -0.599108144764422650000, -0.120927903064719770000, 0.205921701841042190000, 0.128251963105421830000, 0.00426632915846320540000, -0.0166541339484946040000, -0.00467000861014637070000, -8.17539241526297220000e-005 },
122 { -8.81425456724279080000e-005, 0.00639879059704404150000, 0.0189938484443885790000, -0.020575313029809510000, -0.183037643453210440000, -0.225548122324692350000, 0.270604912971661450000, 0.820349877738402070000, 0.401996425008270990000, -0.497232067982842470000, -0.599108144764422870000, -0.0992679611922332730000, 0.138582356490498270000, 0.0707639371444771930000, 0.00181635064276655010000, -0.00633109010842272580000, -0.00157541215951787130000 },
123 { -0.00174750913491093520000, 0.000404658013336242610000, 0.0261901829988486910000, 0.0627112466972920560000, -0.0549429945321079360000, -0.403466596458147640000, -0.408050183798901730000, 0.401996425008270990000, 0.99978435815704370000, 0.401996425008270990000, -0.408050183798901730000, -0.403466596458147640000, -0.0549429945321079360000, 0.0627112466972920560000, 0.0261901829988486910000, 0.000404658013336242610000, -0.00174750913491093520000 },
124 { -0.00157541215951787130000, -0.00633109010842272580000, 0.00181635064276655010000, 0.0707639371444771930000, 0.138582356490498270000, -0.0992679611922332730000, -0.599108144764422870000, -0.497232067982842470000, 0.401996425008270990000, 0.820349877738402070000, 0.270604912971661450000, -0.225548122324692350000, -0.183037643453210440000, -0.020575313029809510000, 0.0189938484443885790000, 0.00639879059704404150000, -8.81425456724279080000e-005 },
125 { -8.17539241526297220000e-005, -0.00467000861014637070000, -0.0166541339484946040000, 0.00426632915846320540000, 0.128251963105421830000, 0.205921701841042190000, -0.120927903064719770000, -0.599108144764422650000, -0.408050183798901730000, 0.270604912971661280000, 0.453154646603639020000, 0.122566351210613960000, -0.0840438371584509430000, -0.0560251303734258590000, -0.00531556469607084080000, 0.00373276550870103340000, 0.000899967028943327330000 },
126 { 0.000473356818591130620000, 0.000144252542662045820000, -0.0100406499670049570000, -0.0299680542957719880000, 0.00644080571244505690000, 0.156344196320753580000, 0.205921701841042190000, -0.0992679611922332730000, -0.403466596458147590000, -0.225548122324692460000, 0.122566351210613680000, 0.168447184789459910000, 0.0372656250325677850000, -0.0212138851397783850000, -0.0116869818686263680000, -0.001075809246969840000, 0.000330813391145330320000 },
127 { 4.97134655875101180000e-005, 0.00130408425975803350000, 0.000435739447470086680000, -0.0148073585873103630000, -0.036474065750403670000, 0.00644080571244505690000, 0.128251963105421670000, 0.138582356490498380000, -0.0549429945321079360000, -0.183037643453210440000, -0.0840438371584510820000, 0.0372656250325676670000, 0.042032948329216710000, 0.00748843085585160220000, -0.00375726491171347230000, -0.00180326268368728360000, -0.000313327068380500990000 },
128 { -0.000260486197811391870000, 0.000264630954308319620000, 0.00204139576350936910000, 0.000578178120084199360000, -0.0148073585873103630000, -0.0299680542957719880000, 0.00426632915846320710000, 0.0707639371444771380000, 0.0627112466972920970000, -0.020575313029809510000, -0.0560251303734258170000, -0.0212138851397784230000, 0.00748843085585157880000, 0.00691012479671693130000, 0.000850593343845249330000, -0.000617847560383965290000, -0.000363588772779722570000 },
129 { -0.000265786932032037870000, -0.000282242920061493990000, 0.000369653036981673640000, 0.00204139576350936610000, 0.000435739447470086680000, -0.0100406499670049570000, -0.0166541339484945930000, 0.00181635064276650320000, 0.0261901829988486730000, 0.0189938484443886170000, -0.00531556469607082690000, -0.0116869818686263640000, -0.00375726491171348270000, 0.000850593343845246510000, 0.000593598448257943110000, -0.000116281707141740450000, -0.000246397192665000140000 },
130 { -0.000223776723112710220000, -0.000276752245330172530000, -0.000282242920061493990000, 0.000264630954308319620000, 0.00130408425975803460000, 0.000144252542662051190000, -0.00467000861014637070000, -0.0063310901084227310000, 0.000404658013336228730000, 0.00639879059704402850000, 0.0037327655087010360000, -0.00107580924696983530000, -0.00180326268368728310000, -0.000617847560383966480000, -0.000116281707141741030000, -0.000153761896758942750000, -0.000209407396921955370000 },
131 { -0.000214134630995544250000, -0.000223776723112710220000, -0.000265786932032037870000, -0.000260486197811391870000, 4.97134655875084920000e-005, 0.000473356818591131050000, -8.17539241526276080000e-005, -0.00157541215951787130000, -0.00174750913491093520000, -8.81425456724336540000e-005, 0.000899967028943326470000, 0.000330813391145331190000, -0.000313327068380500610000, -0.000363588772779722510000, -0.000246397192665000250000, -0.00020940739692195540000, -0.000212455820116683020000 } } };
133 const size_t orientations =
sizeof( gabor::GABOR_KERNELS ) /
sizeof( gabor::GABOR_KERNELS[ 0 ] );
135 template<
class T1,
class T2 >
138 if( in.
empty( ) || orientations <= theta )
143 const int kernel_width =
sizeof( GABOR_KERNELS[ theta ] ) /
sizeof( GABOR_KERNELS[ theta ][ 0 ] );
144 const int kernel_height =
sizeof( GABOR_KERNELS[ theta ][ 0 ] ) /
sizeof( GABOR_KERNELS[ theta ][ 0 ][ 0 ] );
145 kernel_type gabor_kernel( kernel_width, kernel_height, GABOR_KERNELS[ theta ][ 0 ], kernel_width * kernel_height );
148 out.
fill( static_cast< T2 >( 0 ) );
151 for(
int x = 0; x < static_cast< int >( in.
width( ) ); ++x )
153 for(
int y = 0; y < static_cast< int >( in.
height( ) ); ++y )
155 for(
int i = - kernel_width / 2; i <= kernel_width / 2; ++i )
157 for(
int j = - kernel_height / 2; j <= kernel_height / 2; ++j )
159 if( 0 <= x + i && x + i < static_cast< int >( in.
width( ) ) && 0 <= y + j && y + j < static_cast< int >( in.
height( ) ) )
161 out( x, y ) += in( x + i, y + j ) * gabor_kernel( i + kernel_width / 2, j + kernel_height / 2 );
176 typedef double value_type;
182 inline bool build_gaussian_pyramid(
const map_type& in,
const double gauss_sigma,
const size_t scale_offset,
const size_t pyramid_scales, pyramid_type& out_pyr )
184 if( scale_offset >= pyramid_scales || pyramid_scales == 0 )
189 out_pyr.resize( pyramid_scales );
193 map_type temp1, temp2;
194 for( pyramid_type::size_type l = 1; l < out_pyr.size( ); ++l )
196 const map_type& src_map = ( l == 1 ? in : ( l <= scale_offset ? temp1 : out_pyr[ l - 1 ] ) );
197 map_type& dst_map = ( l < scale_offset ? temp1 : out_pyr[ l ] );
199 || !
mist::nearest::interpolate( temp2, dst_map, src_map.width( ) / 2 + ( src_map.width( ) % 2 ), src_map.height( ) / 2 + ( src_map.height( ) % 2 ) ) )
209 inline bool across_scale_difference(
const pyramid_type& in1_pyr,
const pyramid_type& in2_pyr,
const size_t scale_min_c,
const size_t scale_max_c,
const size_t scale_min_d,
const size_t scale_max_d, maps_type& out_fms )
211 out_fms.resize( ( scale_max_c - scale_min_c + 1 ) * ( scale_max_d - scale_min_d + 1 ) );
212 if( out_fms.empty( ) )
218 for(
size_t c = scale_min_c; c <= scale_max_c; ++c )
220 for(
size_t d = scale_min_d; d <= scale_max_d; ++d )
222 const size_t s = c + d;
223 const map_type& center = in1_pyr[ c ];
224 const map_type& surround = in2_pyr[ s ];
227 map_type ex_surround;
229 out_fms[ level ].resize( ex_surround.width( ), ex_surround.height( ) );
230 for(
size_t i = 0; i < center.size( ); ++i )
232 out_fms[ level ][ i ] = std::fabs( center[ i ] - ex_surround[ i ] );
242 inline bool across_scale_addition(
const maps_type& in_fms,
const map_type::size_type base_width,
const map_type::size_type base_height, map_type& out_fm )
246 || base_height == 0 )
251 out_fm.resize( base_width, base_height );
255 for( maps_type::size_type l = 0; l < in_fms.size( ); ++l )
257 map_type target_scale_in_fms;
259 for( map_type::size_type i = 0; i < target_scale_in_fms.size( ); ++i )
261 out_fm[ i ] += target_scale_in_fms[ i ];
269 template<
class T1,
class T2 >
274 if( in.
empty( ) || out_min > out_max )
281 for( size_type i = 1; i < in.
size( ); ++i )
283 const T1 val = in[ i ];
288 else if( in_min > val )
295 const T1 in_range = in_max - in_min;
296 const T2 out_range = out_max - out_min;
297 for( size_type i = 0; i < in.
size( ); ++i )
299 out[ i ] =
static_cast< T2
>( ( in[ i ] - in_min ) / in_range ) * out_range + out_min;
306 inline bool normalize_map_with_local_maxima(
const map_type& in,
const size_t step_local_maxima, map_type& out )
308 const value_type global_max = 1.0;
309 if( !normalize( in, out, 0.0, global_max ) )
314 size_t local_maxima_count = 0;
315 value_type local_maxima_sum = 0;
318 for( map_type::size_type x = 0; x < out.width( ) - step_local_maxima; x += step_local_maxima )
320 for( map_type::size_type y = 0; y < out.height( ) - step_local_maxima; y += step_local_maxima )
322 value_type local_max = 0;
323 for( map_type::size_type i = 0; i < step_local_maxima; ++i )
325 for( map_type::size_type j = 0; j < step_local_maxima; ++j )
327 if( local_max < out( x + i, y + j ) )
329 local_max = out( x + i, y + j );
333 if( global_max != local_max )
335 local_maxima_sum += local_max;
336 ++local_maxima_count;
341 const value_type normalize_factor = std::pow( global_max - local_maxima_sum / local_maxima_count, 2.0 );
342 for( map_type::size_type i = 0; i < out.size( ); ++i )
344 out[ i ] *= normalize_factor;
351 inline bool normalize_maps_with_local_maxima(
const maps_type& in_fms,
const size_t step_local_maxima, maps_type& out_fms )
353 if( in_fms.empty( ) )
358 out_fms.resize( in_fms.size( ) );
359 for( maps_type::size_type l = 0; l < in_fms.size( ); ++l )
361 if( !normalize_map_with_local_maxima( in_fms[ l ], step_local_maxima, out_fms[ l ] ) )
371 template<
class T,
class Allocator >
372 inline bool create_original_feature_maps(
const mist::array2<
mist::rgb< T >, Allocator >& in, map_type& i_fm, map_type& rg_fm, map_type& by_fm )
381 const size_type w = in.
width( );
382 const size_type h = in.height( );
383 const size_type size = in.size( );
387 value_type max_i = 0;
388 for( size_type i = 0; i < size; ++i )
390 i_fm[ i ] = in[ i ].get_average( );
391 if( max_i < i_fm[ i ] )
398 rg_fm.resize( w, h );
399 by_fm.resize( w, h );
400 for( size_type k = 0; k < size; ++k )
402 const value_type i = i_fm[ k ];
405 rg_fm[ k ] = by_fm[ k ] = 0;
409 const value_type r = in[ k ].r / i;
410 const value_type g = in[ k ].g / i;
411 const value_type b = in[ k ].b / i;
412 const value_type R = std::max< value_type >( 0.0, r - ( g + b ) / 2.0 );
413 const value_type G = std::max< value_type >( 0.0, g - ( r + b ) / 2.0 );
414 const value_type B = std::max< value_type >( 0.0, b - ( r + g ) / 2.0 );
415 const value_type Y = std::max< value_type >( 0.0, ( r + g ) / 2.0 - std::abs( r - g ) / 2.0 - b );
426 inline bool conspicuity_map_for_intensity(
const map_type& i_image,
const size_t step_local_maxima,
const double gauss_sigma,
const size_t scale_min_c,
const size_t scale_max_c,
const size_t scale_min_d,
const size_t scale_max_d,
const size_t base_scale, map_type& i_ncm )
428 if( scale_min_c > scale_max_c
429 || scale_min_d > scale_max_d
430 || scale_min_c > base_scale
431 || base_scale > scale_max_c + scale_max_d
432 || i_image.empty( ) )
436 const pyramid_type::size_type pyramid_size = scale_max_c + scale_max_d + 1;
440 map_type::size_type base_width, base_height;
444 if( !build_gaussian_pyramid( i_image, gauss_sigma, scale_min_c, pyramid_size, i_pyr ) )
450 if( !across_scale_difference( i_pyr, i_pyr, scale_min_c, scale_max_c, scale_min_d, scale_max_d, i_fms ) )
455 base_width = i_pyr[ base_scale ].width( );
456 base_height = i_pyr[ base_scale ].height( );
463 if( !normalize_maps_with_local_maxima( i_fms, step_local_maxima, i_nfms ) || !across_scale_addition( i_nfms, base_width, base_height, i_cm ) )
470 return normalize_map_with_local_maxima( i_cm, step_local_maxima, i_ncm );
474 inline bool conspicuity_map_for_color(
const map_type& rg_image,
const map_type& by_image,
const size_t step_local_maxima,
const double gauss_sigma,
const size_t scale_min_c,
const size_t scale_max_c,
const size_t scale_min_d,
const size_t scale_max_d,
const size_t base_scale, map_type& c_ncm )
476 if( scale_min_c > scale_max_c
477 || scale_min_d > scale_max_d
478 || scale_min_c > base_scale
479 || base_scale > scale_max_c + scale_max_d
481 || by_image.empty( ) )
485 const pyramid_type::size_type pyramid_size = scale_max_c + scale_max_d + 1;
489 map_type::size_type base_width, base_height;
493 if( !build_gaussian_pyramid( rg_image, gauss_sigma, scale_min_c, pyramid_size, rg_pyr ) )
499 if( !across_scale_difference( rg_pyr, -rg_pyr, scale_min_c, scale_max_c, scale_min_d, scale_max_d, rg_fms ) )
504 base_width = rg_pyr[ base_scale ].width( );
505 base_height = rg_pyr[ base_scale ].height( );
513 if( !build_gaussian_pyramid( by_image, gauss_sigma, scale_min_c, pyramid_size, by_pyr ) )
519 if( !across_scale_difference( by_pyr, -by_pyr, scale_min_c, scale_max_c, scale_min_d, scale_max_d, by_fms ) )
524 if( base_width != by_pyr[ base_scale ].width( ) || base_height != by_pyr[ base_scale ].height( ) )
533 pyramid_type rg_nfms, by_nfms;
534 if( !normalize_maps_with_local_maxima( rg_fms, step_local_maxima, rg_nfms )
535 || !normalize_maps_with_local_maxima( by_fms, step_local_maxima, by_nfms ) )
540 pyramid_type rg_by_nfms( rg_nfms.size( ) );
541 for( maps_type::size_type l = 0; l < rg_by_nfms.size( ); ++l )
543 rg_by_nfms[ l ].resize( rg_nfms[ l ].width( ), rg_nfms[ l ].height( ) );
544 for( map_type::size_type i = 0; i < rg_by_nfms[ l ].size( ); ++i )
546 rg_by_nfms[ l ][ i ] = rg_nfms[ l ][ i ] + by_nfms[ l ][ i ];
550 if( !across_scale_addition( rg_by_nfms, base_width, base_height, c_cm ) )
557 return normalize_map_with_local_maxima( c_cm, step_local_maxima, c_ncm );
561 inline bool conspicuity_map_for_orientation(
const map_type& i_image,
const size_t step_local_maxima,
const double gauss_sigma,
const size_t scale_min_c,
const size_t scale_max_c,
const size_t scale_min_d,
const size_t scale_max_d,
const size_t base_scale, map_type& o_ncm )
563 if( scale_min_c > scale_max_c
564 || scale_min_d > scale_max_d
565 || scale_min_c > base_scale
566 || base_scale > scale_max_c + scale_max_d
567 || i_image.empty( ) )
571 const pyramid_type::size_type pyramid_size = scale_max_c + scale_max_d + 1;
574 maps_type nneo_fms( gabor::orientations );
575 for( maps_type::size_type t = 0; t < nneo_fms.size( ); ++t )
579 map_type::size_type base_width, base_height;
585 if( !build_gaussian_pyramid( i_image, gauss_sigma, scale_min_c, pyramid_size, i_pyr ) )
590 o_pyr.resize( i_pyr.size( ) );
591 for( pyramid_type::size_type l = scale_min_c; l < o_pyr.size( ); ++l )
598 if( !across_scale_difference( o_pyr, o_pyr, scale_min_c, scale_max_c, scale_min_d, scale_max_d, o_fms ) )
603 base_width = o_pyr[ base_scale ].width( );
604 base_height = o_pyr[ base_scale ].height( );
610 if( !normalize_maps_with_local_maxima( o_fms, step_local_maxima, o_nfms )
611 || !across_scale_addition( o_nfms, base_width, base_height, neo_fm )
612 || !normalize_map_with_local_maxima( neo_fm, step_local_maxima, nneo_fms[ t ] ) )
619 map_type o_cm( nneo_fms[ 0 ].width( ), nneo_fms[ 0 ].height( ) );
620 for( maps_type::size_type t = 0; t < nneo_fms.size( ); ++t )
622 for( map_type::size_type i = 0; i < o_cm.size( ); ++i )
624 o_cm[ i ] += nneo_fms[ t ][ i ];
629 return normalize_map_with_local_maxima( o_cm, step_local_maxima, o_ncm );
633 template<
class T,
class Allocator >
634 inline bool create_comspicuity_maps(
const mist::array2<
mist::rgb< T >, Allocator >& in, map_type& i_cm, map_type& c_cm, map_type& o_cm,
const double gauss_sigma = 5,
const size_t step_local_maxima = 3,
const size_t scale_min_c = 2,
const size_t scale_max_c = 4,
const size_t scale_min_d = 3,
const size_t scale_max_d = 4,
const size_t base_scale = 4 )
642 map_type i_image, rg_image, by_image;
643 if( !create_original_feature_maps( in, i_image, rg_image, by_image ) )
649 return ( conspicuity_map_for_intensity( i_image, step_local_maxima, gauss_sigma, scale_min_c, scale_max_c, scale_min_d, scale_max_d, base_scale, i_cm )
650 && conspicuity_map_for_color( rg_image, by_image, step_local_maxima, gauss_sigma, scale_min_c, scale_max_c, scale_min_d, scale_max_d, base_scale, c_cm )
651 && conspicuity_map_for_orientation( i_image, step_local_maxima, gauss_sigma, scale_min_c, scale_max_c, scale_min_d, scale_max_d, base_scale, o_cm ) );
685 template<
class T1,
class Allocator1,
class T2,
class Allocator2 >
686 bool saliency_map(
const mist::array2<
mist::rgb< T1 >, Allocator1 >& in, __itti__::map_type& i_cm, __itti__::map_type& c_cm, __itti__::map_type& o_cm,
mist::array2< T2, Allocator2 >& sm,
const double intensity_weight = 1.0,
const double color_weight = 1.0,
const double orientation_weight = 1.0,
const double gauss_sigma = 5,
const size_t step_local_maxima = 3,
const size_t scale_min_c = 2,
const size_t scale_max_c = 4,
const size_t scale_min_d = 3,
const size_t scale_max_d = 4,
const size_t base_scale = 4 )
688 if( !__itti__::create_comspicuity_maps( in, i_cm, c_cm, o_cm, gauss_sigma, step_local_maxima, scale_min_c, scale_max_c, scale_min_d, scale_max_d, base_scale ) )
694 __itti__::map_type temp_sm( i_cm.width( ), i_cm.height( ) );
695 for( __itti__::map_type::size_type i = 0; i < temp_sm.size( ); ++i )
697 temp_sm[ i ] = intensity_weight * i_cm[ i ] + color_weight * c_cm[ i ] + orientation_weight * o_cm[ i ];
699 if( !__itti__::normalize( temp_sm, sm, static_cast< T2 >( 0 ), static_cast< T2 >( 255 ) ) )
705 __itti__::map_type temp;
706 return ( __itti__::normalize( i_cm, temp, __itti__::map_type::value_type( 0 ), __itti__::map_type::value_type( 255 ) )
708 && __itti__::normalize( c_cm, temp, __itti__::map_type::value_type( 0 ), __itti__::map_type::value_type( 255 ) )
710 && __itti__::normalize( o_cm, temp, __itti__::map_type::value_type( 0 ), __itti__::map_type::value_type( 255 ) )
731 template<
class T1,
class Allocator1,
class T2,
class Allocator2 >
732 bool saliency_map(
const mist::array2<
mist::rgb< T1 >, Allocator1 >& in,
mist::array2< T2, Allocator2 >& sm,
const double intensity_weight = 1.0,
const double color_weight = 1.0,
const double orientation_weight = 1.0,
const double gauss_sigma = 5,
const size_t step_local_maxima = 3,
const size_t scale_min_c = 2,
const size_t scale_max_c = 4,
const size_t scale_min_d = 3,
const size_t scale_max_d = 4,
const size_t base_scale = 4 )
735 if( !__itti__::create_comspicuity_maps( in, i_cm, c_cm, o_cm, gauss_sigma, step_local_maxima, scale_min_c, scale_max_c, scale_min_d, scale_max_d, base_scale ) )
741 __itti__::map_type temp_sm( i_cm.
width( ), i_cm.
height( ) );
742 for( __itti__::map_type::size_type i = 0; i < temp_sm.size( ); ++i )
744 temp_sm[ i ] = intensity_weight * i_cm[ i ] + color_weight * c_cm[ i ] + orientation_weight * o_cm[ i ];
746 return __itti__::normalize( temp_sm, sm, static_cast< T2 >( 0 ), static_cast< T2 >( 255 ) );
756 #endif // __INCLUDE_MIST_SALIENCY_MAP__