Depósito de investigación de la Universidad de Sevilla https://idus.us.es/ “This is an Accepted Manuscript of an article published by Elsevier in Food Control on July 2021, available at: https://doi.org/10.1016/j.foodcont.2021.108038”.
Manu sc r ipt 1 CIELA B – Sp ec t ra l i ma g e MATCHING: An a pp fo r mer ging c olo r i me t r i c a nd 2 spe c t r al i ma g es fo r g ra p es a nd d er i va ti ves 3 4 Ro d rí g uez-P u li do , Fr an cisc o J.; r pu li do@u s. e s 5 htt p s://o r ci d . o r g / 0000 - 0002 - 8230 - 2015 ; 6 Gor d illo, B e l én ; bgo r d ill o @ u s. e s 7 htt p s://o r ci d . o r g / 0000 - 0003 - 2986 - 7911 ; 8 Go n z á lez-Mir e t, M. Lou r de s * ; m i r e t @u s. e s 9 htt p s://o r ci d . o r g / 0000 - 0003 - 0572 - 051 X; 1 0 Her ed ia, Fr an cisc o J.; he r ed i a @ u s. e s 1 1 htt p s://o r ci d . o r g / 0000 - 0002 - 3849 - 8284 ; 1 2 1 3 Fo o d C o l ou r and Q ua lity Lab ., Ár ea de N u trici ón y Br o m a t o l og í a , F a c u lt ad de 1 4 Farmac ia , U n iv e rsi dad de S e villa, 41012 S e vill a , S pa i n . 1 5 1 6 1 7 * C o rresp ond i ng au t ho r: 1 8 Go n z á lez-Mir e t, M. Lou r de s 1 9 Fo o d C o l ou r & Q ua lity Labo r a t o ry, D ep t. N u triti on & F ood Sci en c e . F a c u lt ad de 2 0 Farmac ia . U n iv e rsi dad de S e vill a . 41012 -S e vill a , S pa i n 2 1 T e l.: +34 955420938 2 2 e-mail:
[email protected] 2 3 1
2 4 ABSTRACT 2 5 Im a gin g t e c hn i que s ha v e r e v o l u ti on is ed t he w a y qua lity is a ss e ss ed i n f ood 2 6 pro d ucts. Usi ng c a m e r a s, it is po ssi b l e t o e stim a t e no t on ly t he c he mic a l 2 7 com p os i ti on o f a p r odu ct bu t a ls o its geo m e tric d istri bu ti on . H o w e v e r, t he limit ed 2 8 ra n ge o f de t e ct o rs im p li e s t h e u s e o f d iff e r en t m ea s u ri ng equ i p m en t. T he 2 9 pres e nc e o f sm a ll and d iscr e t e sa m p l e s o r v e ry he t e r ogeneou s s a m p l e s m a k e s 3 0 joi n in g bo t h s e ts o f da t a a c o mplic a t ed t a sk. T h is w o rk a ris e s fr o m t he need t o 3 1 m e rg e i mage s wit h c o l ou r i n f o rm a ti on and NIR s pe ctr a l i n f o rm a ti on on g r ape 3 2 sam p le s and de riv a tiv e s. A n app lic a ti on ha s been cr ea t ed unde r MAT L AB t o j o i n 3 3 this ty p e o f im age s s o t ha t it i s po ssi b l e t o sim u lt aneou sly e xtr a ct t he c o l ou r 3 4 and/ o r spe ctr a l i n f o rm a ti on o f ea c h p ix e l o r ob j e ct p r e s en t i n t he im age . Alt hough 3 5 th e soft wa r e c an be u s ed i n a wi de r ange o f app lic a ti on s, it ha s been s u cc e ssf u lly 3 6 appli e d t o g r ape and g r ape s ee d s a m p l e s. I n r ed g r ape bun c he s, it w a s po ssi b l e 3 7 to ev a lu a t e i nd ivi dua lly g r ape s and no tic e d iff e r en c e s due t o c hange s i n visi b l e 3 8 and infrar ed r eg i on s a t t he s a m e tim e . I n t he c a s e o f w h it e g r ape s eed s, it w a s 3 9 prov e d t ha t m e r ged im age s w ere be tt e r t o d iscrimi na t e be tw een v a ri e ti e s t han 4 0 th e sing le CIE L AB o r s pe ctr a l i mage s. 4 1 KEYWORDS 4 2 CIELAB; NIR; S pe ctr a l Im ag i ng ; Im age M a tc h i ng ; MAT L AB. 4 3 2
4 4 1. INTRODUCTION 4 5 C o lo u r and appea r an c e , a s t he first a ttri bu t e s t ha t c on s u m e rs pe rc e iv e , ha v e 4 6 been t h e f ea t u r e s m o st c ha r a ct e riz ed i n f ood p r odu cts (F e r nánde z-V á z que z e t 4 7 al., 2 011). Hist o ric a lly, t he s e an alys e s ha v e been done t h r ough s en s o ry ana lysis, 4 8 which ov e r t he y ea rs ha s been r ep l a c ed b y i n str u m en t a l m ea s u r e m en ts, m a i n ly 4 9 due t o th e need t o au t o m a t e i n s pe cti on p r o c e ss e s i n t he f ood i ndu stry. A d v an c e s 5 0 in tec h nol og y ha v e l ed t o t he e m e r gen c e o f de vic e s c apab l e o f ana lysi ng i n r ea l- 5 1 tim e and tr an smitti ng t he r e s u lts on li ne f o r r ap i d de cisi on m a ki ng . S o m u c h s o 5 2 th a t, the u s e o f Pr e cisi on A g ric ul t u r e is t he on ly vi ab l e w a y t o m anage t he need s 5 3 of suc h a n o v e r popu l a t ed w o rl d ( Si ngh and Si ngh , 2020 ). 5 4 Of a ll th e de vic e s a v a il ab l e f or r ap i d ana lysis i n ag ric u lt u r e , t ho s e ba s ed on 5 5 Computer Visi on a r e w o rt h m en ti on i ng (M a e t a l., 2016 ). T he r e is an ad ho c 5 6 applic a t ion f o r t he e v a l ua ti on o f an y ty pe o f p r odu ct. M angoe s (W ende l e t a l., 5 7 2018), gr ape s (N oga l e s-B ueno et a l., 2015b ), a s pa r agu s (D on is-G on z á l e z and 5 8 Guyer, 2016 ), c o ff ee bean s ( de Oliv e ir a e t a l., 2016 ), o r fi g s (B ena li a e t a l., 2016 ) 5 9 are g oo d e x a m p l e s o f p r od ucts w ho s e ag r o l og ic a l and ph ysic o c he mic a l 6 0 charact e ristics a r e qu it e d iff e r en t and w h ic h a lr ead y ha v e a s o l u ti on o f im ag i ng 6 1 tec h niqu e s t o be e v a l ua t ed . 6 2 1.1. I ma ging T ec hniqu es 6 3 Sinc e t he cr ea ti on o f t he first c o m pu t e r, hu m an be i ng s ha v e d r ea m ed o f cr ea ti ng 6 4 m a chines c apab l e o f r e l a ti ng t o t he ir en vir on m en t i n t he s a m e w a y t he ir s en s e s 6 5 do. M a k ing a m a c h i ne c apab l e of s ee i ng ha s been one o f t he g r ea t c ha ll enge s o f 6 6 electro ni cs. Sim p ly cr ea ti ng c a mer a s w a s no t enough . W e needed m a c h i ne s t ha t 6 7 could un de rst and w ha t t he y wer e s ee i ng . All t he ad v an c e s i n op tic a l syst e ms 6 8 hav e m ade C o m pu t e r Visi on o n e o f t he t e c hn i que s wit h t he g r ea t e st fi e l d o f 3
6 9 applic a t ion i n t he f ood i ndu stry. D epend i ng on t he m ea s u r e m en t geo m e try and 7 0 th e type o f i n f o rm a ti on ob t a i ned w e will d iff e r en ti a t e be tw een c on v en ti ona l RGB 7 1 im a ges a nd s pe ctr a l im age s. 7 2 R GB im ag i ng 7 3 Co n venti ona l RGB c a m e r a s a r e u s ua lly bu ilt wit h silic on - ba s ed de t e ct o rs wit h 7 4 filt e rs s o t ha t ea c h po i n t on ly r e c e iv e s i n f o rm a ti on fr o m one o f t he t h r ee p rim a ry 7 5 colo u rs. T he b i g p r ob l e m wit h th e s e c a m e r a s is t ha t RGB o r HSI c o l ou r s pa c e s 7 6 are devic e - dependen t, s o i n p ri n ci p l e , t he y c anno t be u s ed f o r ab s o l u t e c o l ou r 7 7 m e as u rem en ts (Y a m and P ap a da kis, 2004 ). D e s p it e t he s e limit a ti on s, m an y 7 8 authors still u s e t he s e c o l ou r s p ac e s. By c on tr o lli ng a ll en vir on m en t a l f a ct o rs and 7 9 thr ou gh c he m o m e trics t oo ls it is po ssi b l e t o p r ed ict ph ysic o c he mic a l 8 0 charact e ristics i n f ood p r odu cts fr o m t he s e c o l ou r da t a . Ot he r au t ho rs u s e t he 8 1 CIELAB tr an sf o rm a ti on t ha t g r aph ic ed iti ng p r og r a ms o ff e r. T h is tr an sf o rm a ti on 8 2 only dep end s on t he o ri g i na l v a l ue s o f RGB, t hu s t he y a lw a ys m a k e a syst e m a tic 8 3 err o r. If t he fi na l a im is no t t he c olo rim e tric m ea s u r e m en t bu t t he ph ysic o c he mic a l 8 4 analysi s t h r ough c he m o m e trics, t h is e rr o r ha s no f u rt he r im po rt an c e . T he m o st 8 5 orth o do x m e t hod is t o f o ll o w t h e r e c o mm enda ti on s o f CIE and u s e no t de vic e - 8 6 depende n t c o l ou r s pa c e s (CIE, 2004 ). T he m o st u s ed c o l ou r s pa c e i n f ood 8 7 pro d ucts ana lysis is CIE 1976 ( L*a*b* ) o r sim p ly: CIE L AB. H o w e v e r, c on v e rsi on 8 8 betw e en RGB and CIE L AB r equ ir e s l ong c a li b r a ti on p r o c e ss e s u tilizi ng st anda r d 8 9 ill u min a ti on and r e f e r en c e m a t e ri a ls ( León e t a l., 2006 ). T h is is t he on ly m e t hod 9 0 when th e goa l is t o ge t ab s o l u t e c o l o rim e tric m ea s u r e m en ts b y m ean s o f RGB 9 1 cam e r a s. 4
9 2 S pe ctr a l im ag i ng 9 3 Spectral im ag i ng t e c hno l og y a p pea r ed i n t he mi d - 1980 s. T h is r e v o l u ti on , t ha t 9 4 began wit h a ir bo r ne im age s an d w h ic h c ou l d be app li ed t o s e v e r a l fi e l d s, w a s 9 5 appointe d a s “ h y pe rs pe ctr a l im ag i ng ”. Alm o st f o rty y ea rs l a t e r, t h is t e c hno l og y 9 6 cannot b e l onge r m en ti oned a s g r oundb r ea ki ng , bu t its app lic a ti on s c on ti nue 9 7 growin g no w ada ys. N o w t ha t t he t e c hn i que is w e ll im p l e m en t ed , e x pe rts 9 8 r e c o m mend t he u s e o f m o r e app r op ri a t ed t e rms s u c h a s “im ag i ng s pe ctr o sc op y” 9 9 o r “s pe ctr a l im ag i ng ” (P o l de r a n d G o w en , 2020 ). S pe ctr a l im age s a r e t h r ee - 10 0 dim e nsio na l da t a m a trix w he r e th e first tw o a x e s (x and y) o f t he m a trix r ep r e s en t 10 1 th e s p ati a l c oo r d i na t e s, w h il e th e t h ir d ( λ ) a xis dep icts t he s pe ctr a l d im en si on . 10 2 T h ey ca n be vis ua lis ed a s hund r ed s o f si ng l e g r a ysc a l e im age s o f t he s a m e 10 3 scene, whe r e ea c h im age r ep r e s en ts a si ng l e band t ha t m a y be a s na rr o w a s t he 10 4 equipme n t a ll o ws. 10 5 1.2. I ma g e An a l ys i s a nd Viti c ultu re 10 6 T h e win e i ndu stry ha s r e l e v an t i mpo rt an c e wit h i n f ood sci en c e . T o ob t a i n qua lity 10 7 win e s it is ne c e ss a ry t o c on tr o l t he c u ltiv a ti on a t a ll l e v e ls. F o r t h is r ea s on , t he r e 10 8 are meth od s f o r e v a l ua ti ng vi ne s, s o il, f o li age , and fr u it, a m ong o t he rs. Ev en 10 9 within t he fr u it o f t he vi ne , it is n ec e ss a ry t o c on tr o l d iff e r en t pa rts s u c h a s s eed , 11 0 pulp, a nd ski n . Im ag i ng t e c hn i qu es ha v e been s u cc e ssf u lly app li ed t o t he s e pa rts 11 1 ov e r th e l a st t en y ea rs. D e t e cti on o f fl o w e ri ng (P a l a ci o s e t a l., 2020 ), 11 2 determi na ti on o f s o il qua lity (R e tzl a ff e t a l., 2015 ), l ea f c ha r a ct e riz a ti on (Di ago e t 11 3 al., 2 013), g r ape m a rc c o m po siti on (J a r a -P a l a ci o s e t a l., 2016 ), ri pene ss o f 11 4 berri e s and s eed s (R od rí guez -P u li do e t a l., 2012 ), o r g r ape c o m po siti on 11 5 (Nogales-B ueno e t a l., 2015a ) are s o m e e x a m p l e s o f t he s e app lic a ti on s. 5
11 6 1.3. Co m pl eme nt ar it y of t ec hniqu es a nd obj ec ti ve of th e wo rk 11 7 T h ere is no t a un iv e rs a l op tic al s en s o r c apab l e o f r e c o r d i ng i n f o rm a ti on fr o m 11 8 m a ny r eg i on s o f t he e l e ctr o ma gne tic s pe ctr u m a t t he s a m e tim e . T he r e f o r e , 11 9 dependin g on t he c ha r a ct e ristics t o be m ea s u r ed on t he s a m p l e s, t he ty pe o f 12 0 sensor m u st be c ho s en c o rr e ctly. T he m o st c o mm on de t e ct o rs a r e CCD, w ho s e 12 1 spectral r ange depend s on w he th e r it is c oo l ed o r no t, CMOS o r I n G a As. Silic on - 12 2 based d e t e ct o rs s u c h a s CCD and CMOS ha v e s en sitiviti e s up t o 1000 n m. 12 3 T h ose b a s ed on I n G a As ha v e n o s en sitivity i n t he visi b l e bu t r ea c h w a v e l eng t h s 12 4 of 1 700 n m (H uang e t a l., 2017) . B e si de s, de t e ct o rs c an be m a trix o r li nea r, t he 12 5 latter need i ng a b r oo mi ng syst em t o a c qu ir e a c o m p l e t e im age . 12 6 In many st ud i e s, it is c o mm on t o sim u lt aneou sly de t e rmi ne c ha r a ct e ristics b y 12 7 differ en t op tic a l t e c hn i que s. W h e n u si ng po i n t s pe ctr o sc op y t h is t a sk is a s sim p l e 12 8 as m e a su ri ng t he s a m e s a m p le b y d iff e r en t t e c hn i que s and t hen j o i n i ng t he 12 9 inform a ti on ob t a i ned . T h is t a sk is m o r e c ha ll eng i ng w hen it r e f e rs t o im ag i ng 13 0 tec h niqu e s. Im ag i ng t e c hn i q u e s a r e p r e f e r ab ly u s ed w hen t he op tic a l 13 1 charact e ristics o f t he im age v a ry a cc o r d i ng t o t he a r ea o f t he s a m p l e be i ng 13 2 m e as u re d . I n t h is c a s e , it is d iffic u lt t o j o i n t he i n f o rm a ti on fr o m d iff e r en t 13 3 tec h niqu e s, si n c e t he op tic a l c h ar a ct e ristics v a ry d r a stic a lly, and it is no t po ssi b l e 13 4 to simply s upe rim po s e t he ma tric e s t ha t c o m p ris e ea c h ty pe o f im age . 13 5 Furt he r mo r e , t h is t a sk w ou l d be limit ed f o r r ea s on s a s sim p l e a s d iff e r en c e s i n 13 6 res o lutio n and fr a mi ng . 13 7 When us i ng RGB im age s, t he task o f j o i n i ng im age s wit h c o mm on e l e m en ts is 13 8 com p letely s o lv ed . T he p r o c e ss b y w h ic h tw o im age s wit h c o mm on e l e m en ts a r e 13 9 m e rg e d is c a ll ed "im age m a tchi ng " o r "im age stitc h i ng ". T he r e a r e nu m e r ou s 14 0 com p uter p r og r a ms c apab l e o f pe rf o rmi ng t h is p r o c e ss qu ickly and r e li ab ly. I n 6
14 1 fact, r e s ea rc h is still unde rw a y t o im p r o v e t he a l go rit h ms, w h ic h a r e i n cr ea si ng ly 14 2 ro b ust t o c hange s i n li gh t and p ers pe ctiv e , and t o im p r o v e t he r e s u lti ng im age s 14 3 (L a ra qui e t a l., 2015 ; W ang and Y ang , 2020 ). All syst e ms o f a ir bo r ne o r s a t e llit e 14 4 spectral im age s i n cl ude t he ir o w n stitc h i ng p r o c edu r e t o m e r ge t he ir c ap t u r e s f o r 14 5 obtai n in g a w ho l e c o m p l e t e ima ge o f t he sc anned r eg i on . T he p r ob l e m a ris e s 14 6 when it is ne c e ss a ry t o m e rg e da t a ob t a i ned fr o m v e ry d iff e r en t im ag i ng 14 7 tec h niqu e s. 14 8 T h is w or k st e ms fr o m t he nee d f o r e v a l ua ti ng j o i n tly NIR s pe ctr a l im age s and 14 9 im a ges o b t a i ned fr o m a c on v en ti ona l im ag i ng syst e m. T o ou r k no wl edge , t he r e 15 0 is not an a v a il ab l e app lic a ti on to m a k e t h is t a sk. T he r e f o r e , t h is w o rk ha s a im ed 15 1 to dev e lo p a sim p l e app lic a ti on th a t a ll o ws r e s ea rc he rs t o ge t i n a si ng l e s pe ctr a l 15 2 im a ge bot h c o l o rim e tric and NI R da t a . 15 3 2. MATERIALS AND METHODS 15 4 2.1. P r og ramm ing l a ngu a g e 15 5 T h e A p p D e si gne r t oo l i n cl uded in MAT L AB R 2020a ha s been u s ed f o r t h is w o rk 15 6 (The Mat h w o rks, 2020 ). MAT L AB (s ho rt f o r M a trix Labo r a t o ry) is a m a t he m a tic a l 15 7 softw a re t oo l wi de ly u s ed i n t he sci en tific fi e l d and is c ha r a ct e ris ed b y its u s e o f 15 8 a fri e ndly l anguage f o r t ho s e r e s ea rc he rs wit hou t e xt en siv e p r og r a mmi ng 15 9 ex p erienc e . Its m a i n f ea t u r e is t he ea s e wit h w h ic h t he p r og r a m m an i pu l a t e s 16 0 m a tric e s. T h is is v e ry u s e f u l i n im age ana lysis si n c e bo t h d i g it a l im age s and 16 1 spectral im age s c an be c on si de r ed t h r ee - d im en si ona l m a tric e s. 16 2 2.2. St ar ting i ma g es 16 3 C IE L AB im age s 16 4 T h ese i mage s w e r e a c qu ir ed w i t h t he Di g iEy e ® im ag i ng Syst e m (V e rivi de , UK) 16 5 (L u o et a l., 2001 ). T h is equ i p m en t is s pe ci a lly de si gned f o r c o l ou r m ea s u r e m en t 7
16 6 accordi ng t o CIE gu i de li ne s an d t he e v a l ua ti on o f appea r an c e . T he equ i p m en t 16 7 consists o f a do m e li gh ti ng boo t h wit h tw o D 65 st anda r d ill u mi nan t e m u l a t o rs 16 8 lamps, a Nik on ® D 80 r e fl e x c a m e r a and a c o m pu t e r t ha t c on tr o ls t he equ i p m en t. 16 9 T h e o utp u t im age s a r e st o r ed in TIF fil e s ( 57 . 4 MB) t ha t ha v e a r e s o l u ti on o f 17 0 3872×25 92 p ix e ls w h ic h ea c h c on t a i n s L*a*b* c o l ou r c oo r d i na t e s st o r ed i n 16 - b it 17 1 data p er c hanne l. 17 2 S pe ctr a l Im age s 17 3 T h e syst e m c o m p ris ed a X en ics® XEVA-USB I n G a As c a m e r a ( 320 × 256 p ix e ls; 17 4 Xenics I n fr a r ed S o l u ti on s, I n c., Leu v en , B e l g i u m), a s pe ctr og r aph (S pe cim 17 5 ImS p ect o r N 17 E E nhan c ed ; S p ectr a l Im ag i ng L t d ., O u l u , Fi n l and ) c o v e ri ng t he 17 6 spectral r ange be tw een 884 and 1717 n m (s pe ctr a l r e s o l u ti on o f 3 . 25 n m), tw o 17 7 70 W tu ng st en i od i ne ha l ogen l a m p s (Pril u x®, B a rc e l ona , S pa i n ) u s ed a s li gh t 17 8 source, a mirr o r sc anne r (S pe ct ra l Im ag i ng L t d ., O u l u , Fi n l and ), and a c o m pu t e r 17 9 syst e m. Im age s w e r e r e c o r ded u si ng a 50 Hz fr a m e r a t e and an e x po s u r e tim e 18 0 of 9 ms u si ng t he i n str u m en t a c qu isiti on s o ftw a r e S pe ctr a lDAQ 3 . 62 (S pe ctr a l 18 1 Im a gin g L t d ., O u l u , Fi n l and ). O nce t he im age s a r e a c qu ir ed , ‘w h it e r e f e r en c e ’ and 18 2 ‘ da rk r e f e r en c e ’ im age s w e r e a ls o r e c o r ded t o c a li b r a t e t he si gna l a cc o r d i ng t o 18 3 th e e quati on R=(R0 – D)/(W – D), b e i ng D t he da rk si gna l, W t he w h it e r e f e r en c e 18 4 signal a nd R0 t he RAW da t a . I n t h is w o rk, t he r e l a tiv e r e fl e ct an c e s pe ctr u m 18 5 obtai n ed a ft e r c a li b r a ti on was u s ed f o r t he c a li b r a ti on p r o c e ss e s. N o 18 6 spectrosc op ic tr an sf o rm a ti on tr ea tm en ts o r o t he r s pe ctr a l p r e -tr ea tm en ts w e r e 18 7 perf o rm ed . E a c h c a li b r a t ed s pe ctr a l im age is c o m po s ed o f tw o fil e s. First one is 18 8 a DAT f i l e ( 75 MB) t ha t c on t a i n s t he b i na ry da t a o f t he c ube . F o r its r ead i ng , a 18 9 header H DR fil e ( 3 KB) is a ls o n e eded . T h is heade r ha s t he m e t ada t a a ss o ci a t ed 8
33 9 for 8 0 % o f t he s a m p l e s, app r o xi ma t e ly. M o r eo v e r, t h is pe rc en t age is a lm o st t he 34 0 sam e f o r t he tw o cl a ss e s. I n t he l a st c a s e , w he r e bo t h ki nd s o f da t a w e r e 34 1 sim u ltan eou sly c on si de r ed , t he pe rc en t age o f c o rr e ct cl a ssific a ti on r ea c hed 34 2 93.6 % . T he cl a ssific a ti on w a s be tt e r f o r bo t h unde rri pe and f u llyri pe g r ape s w hen 34 3 com p arin g wit h p r e vi ou s L DA r e s u lts. It is w o rt h m en ti on i ng t ha t t he sy ne r g y 34 4 dem o nstr a t ed be tw een t he tw o tec hn i que s ha s been m ade po ssi b l e b y t he po i n t- 34 5 top oint c o m pa ris on wit h i n t he im age s, w h ic h w ou l d be v e ry d iffic u lt t o ob t a i n wit h 34 6 conv e nt iona l s pe ctr o sc op ic t e c h ni que s o r wit h t he s epa r a t e im ag i ng t e c hn i que s. 34 7 34 8 4. CON C LUSIONS 34 9 T h e s o ftw a r e de v e l oped i n t h is st ud y s o lv e s an ana lytic a l p r ob l e m w hen w an ti ng 35 0 to c o m bine c o l o rim e tric and s pe ctr a l da t a u si ng im ag i ng t e c hn i que s. Alt hough t he 35 1 sy n ergy be tw een op tic a l t e c hn i que s w a s a lr ead y de m on str a t ed , t h is ne w t oo l 35 2 all o ws th e e v a l ua ti on o f d iscr e te s a m p l e s and t ho s e i n w h ic h t he r e is a c e rt a i n 35 3 optical he t e r ogene ity. T he sim u lt aneou s a v a il ab ility o f da t a a ll o ws c he m o m e tric 35 4 tec h niqu e s t o d isc e r n i n ea c h c a s e t he w e i gh t o f t he v a ri ab l e s i n t he p r ed icti on 35 5 m o dels. T h is app lic a ti on ha s pro v ed u s e f u l w hene v e r im age s ob t a i ned i n t he 35 6 la bo rat o ry a r e c on si de r ed , unde r c on tr o ll ed en vir on m en t a l c ond iti on s and a lw a ys 35 7 usin g sm oo t h and ho m ogeneou s s u rf a c e s a s a s a m p l e ba ck g r ound . Alt hough 35 8 th e se co nd iti on s c an be ea sily r ep r odu c ed i n i ndu stri a l f ood c on tr o l p r o c e ss e s, 35 9 the f u t ure o f t he app lic a ti on s ho ul d f o c u s on t he po ssi b ility o f p r o c e ssi ng im age s 36 0 acquired i n m o r e c o m p l e x en viro n m en ts. 36 1 ACKNOWLEDGMENTS 36 2 We a re indeb t ed t o Pr og r a m a Op e r a tiv o FEDER A nda l u cí a 2014 - 2020 [R e f: US- 36 3 1261752] and Mi n ist e ri o de Ec ono mí a y C o m pe titivi dad , S pa i n [Pr o j e ct 15
36 4 AGL 2 01 7 - 84793 -C 2 ] f o r fi nan cial s uppo rt. Als o , au t ho rs a r e g r a t e f u l t o C on s e j o 36 5 Re g ula do r C ondado de H ue lv a (B o ll u ll o s P a r de l C ondado , H ue lv a , S pa i n ) f o r 36 6 th e supply o f s a m p l e s, and t e c hn ic a l st a ff o f Bi o l og y S e rvic e (SGI, U n iv e rsi dad 36 7 de S e vil la ) f o r t e c hn ic a l a ssist an c e . Fr an cisc o J. R od rí gue z-P u li do a ls o w an ts t o 36 8 th a nk t o t he UX de si gne r, C h rist ian C ab r e r a , f o r t he ad visi ng du ri ng t he de si gn o f 36 9 th e Gr aph ic a l Us e r I n t e rf a c e . 37 0 REFERENCES 37 1 Benali a , S., C ube r o , S., Pr a ts - M on t a l bán , J.M., B e r na r d i, B., Zim ba l a tti, G., 37 2 Blasc o , J., 2016 . C o m pu t e r visi on f o r au t o m a tic qua lity i n s pe cti on o f d ri ed fi g s 37 3 (Fic u s c a ric a L .) i n r ea l-tim e . C o m pu t. El e ctr on . A g ric. 120 , 17–25 . 37 4 htt p s:// do i. o r g / 10 . 1016 /j.c o m pag . 2015 . 11 . 002 37 5 CIE (Ed.), 2004 . C o l o rim e try, 3. ed . ed , T e c hn ic a l r epo rt / CIE. CIE, C en tr a l 37 6 Bure au , Vi enna . 37 7 de Oliveir a , E.M., Le m e , D.S., Bar bo s a , B.H.G., R oda rt e , M.P., P e r e ir a , R.G.F.A., 37 8 2016. A c o m pu t e r visi on syst e m f o r c o ff ee bean s cl a ssific a ti on ba s ed on 37 9 com p ut a ti ona l i n t e lli gen c e t e c hn i que s. J. F ood E ng . 171 , 22–27 . 38 0 htt p s:// do i. o r g / 10 . 1016 /j.jf oode n g . 2015 . 10 . 009 38 1 Di a go, M .P., F e r nande s, A.M., Mill an , B., T a r dagu il a , J., M e l o -Pi n t o , P., 2013 . 38 2 Id e ntific a ti on o f g r ape vi ne v a r ie ti e s u si ng l ea f s pe ctr o sc op y and pa rti a l l ea st 38 3 squares. C o m pu t. El e ctr on . A g ric. 99 , 7–13 . 38 4 htt p s:// do i. o r g / 10 . 1016 /j.c o m pag . 2013 . 08 . 021 38 5 Do n is-G on z á l e z, I.R., G u y e r, D.E., 2016 . Cl a ssific a ti on o f p r o c e ssi ng a s pa r agu s 38 6 sections u si ng c o l o r im ages . C o m pu t. El e ctr on . A g ric. 127 , 236–241 . 38 7 htt p s:// do i. o r g / 10 . 1016 /j.c o m p a g . 2016 . 06 . 018 38 8 Fer ná nd e z-V á z que z, R., Sti n c o , C.M., M e l énde z-M a rtí ne z, A.J., H e r ed i a , F.J., 38 9 Vicario, I.M., 2011 . Vis ua l and I n str u m en t a l Ev a l ua ti on o f Or ange J u ic e C o l o r: 39 0 A Co n s u m e rs’ Pr e f e r en c e St ud y. J. S en s. St ud . 26 , 436–444 . 39 1 https:// do i. o r g / 10 . 1111 /j. 1745 - 459 X. 2011 . 00360 .x 16
39 2 Her ná nd e z-Hi e rr o , J.M., N oga les-B ueno , J., R od rí gue z-P u li do , F.J., H e r ed i a , 39 3 F.J., 20 13 . F ea si b ility St ud y on t he Us e o f N ea r-I n fr a r ed Hy pe rs pe ctr a l Im ag i ng 39 4 for t h e Scr een i ng o f A n t ho cy a ni n s i n I n t a ct Gr ape s du ri ng Ri pen i ng . J. A g ric. 39 5 Fo o d Che m. 61 , 9804–9809 . h tt p s:// do i. o r g / 10 . 1021 /jf 4021637 39 6 Hu an g, L., Z hou , Y., M eng , L .,W u , D., H e , Y., 2017 . C o m pa ris on o f d iff e r en t CCD 39 7 detectors and c he m o m e trics f o r p r ed icti ng t o t a l an t ho cy an i n c on t en t and 39 8 antioxi dan t a ctivity o f m u l be rry fr u it u si ng visi b l e and nea r i n fr a r ed h y pe rs pe ctr a l 39 9 im a gin g t e c hn i que . F ood C he m. 224 , 1–10 . 40 0 htt p s:// do i. o r g / 10 . 1016 /j.f ood ch e m. 2016 . 12 . 037 40 1 Jara-Pa la ci o s, M.J., R od rí gue z-P u li do , F.J., H e r nan z, D., Esc ude r o -Gil e t e , M. L ., 40 2 Her ed ia, F.J., 2016 . D e t e rmi na ti on o f pheno lic s ub st an c e s o f s eed s, ski n s and 40 3 stems fr o m w h it e g r ape m a rc b y nea r-i n fr a r ed h y pe rs pe ctr a l im ag i ng : 40 4 Hypers pe ctr a l m a rc ana lysis. A u st. J. Gr ape Wi ne R e s. 22 , 11–15 . 40 5 htt p s:// do i. o r g / 10 . 1111 / a j g w. 12165 40 6 Lara qu i, M., S aa i d i, A., M ouh i b , A., A ba rk an , M., 2015 . Im age s M a tc h i ng Usi ng 40 7 Voro no ï R eg i on s Pr opaga ti on . 3 D R e s. 6 , 27 . h tt p s:// do i. o r g / 10 . 1007 /s 13319 - 40 8 015- 0 0 56 - 5 40 9 León, K., M e ry, D., P ed r e sc h i, F., León , J., 2006 . C o l o r m ea s u r e m en t i n L*a*b* 41 0 units f r om RGB d i g it a l im age s. F ood R e s. I n t., P h ysic a l Pr ope rti e s VI 39 , 1084– 41 1 1091. h tt p s:// do i. o r g / 10 . 1016 /j.f ood r e s. 2006 . 03 . 006 41 2 Luo, M.R., C u i, G.H., L i.C;, 2001 . Britis h P a t en t en titl ed A ppa r a t u s and m e t hod 41 3 for meas u ri ng c o l ou r (Di g iEy e Syst e m), D e r b y U n iv e rsity E n t e r p ris e s L imit ed . 41 4 M a , J., S un , D.-W., Q u , J.-H., L i u , D., P u , H., G ao , W.-H., Z eng , X.-A., 2016 . 41 5 Applic a ti on s o f C o m pu t e r Visi on f o r Ass e ssi ng Q ua lity o f A g ri-f ood Pr odu cts: A 41 6 Review o f R e c en t R e s ea rc h A d v an c e s. Crit. R e v. F ood Sci. N u tr. 56 , 113–127 . 41 7 htt p s:// do i. o r g / 10 . 1080 / 104083 9 8 . 2013 . 873885 41 8 No g ales-B ueno , J., Ay a l a , F., H e r nánde z-Hi e rr o , J.M., R od rí gue z-P u li do , F.J., 41 9 Echáv a rri, J.F., H e r ed i a , F.J., 2015a . Sim p lifi ed M e t hod f o r t he Scr een i ng o f 42 0 T e c h nol og ic a l M a t u rity o f R ed Gr ape and T o t a l P heno lic C o m pound s o f R ed 42 1 Gra p e Ski n : A pp lic a ti on o f t h e C ha r a ct e ristic V e ct o r M e t hod t o N ea r-I n fr a r ed 42 2 Spectra. J. A g ric. F ood C he m. 63 , 4284–4290 . 42 3 htt p s:// do i. o r g / 10 . 1021 /jf 505870 s 17
42 4 No g ales-B ueno , J., B a c a -B o c a n eg r a , B., R od rí gue z-P u li do , F.J., H e r ed i a , F.J., 42 5 Her ná n de z-Hi e rr o , J.M., 2015 b. Us e o f nea r i n fr a r ed h y pe rs pe ctr a l t oo ls f o r t he 42 6 scre e ni ng o f e xtr a ct ab l e po ly p h eno ls i n r ed g r ape ski n s. F ood C he m. 172 , 559– 42 7 564. h tt p s:// do i. o r g / 10 . 1016 /j.f ood c he m. 2014 . 09 . 112 42 8 No g ales-B ueno , J., R od rí gue z - P u li do , F.J., H e r ed i a , F.J., H e r nánde z-Hi e rr o , 42 9 J.M., 2015 c. C o m pa r a tiv e st ud y on t he u s e o f an t ho cy an i n p r o fil e , c o l o r im age 43 0 analys i s and nea r-i n fr a r ed hype rs pe ctr a l im ag i ng a s t oo ls t o d iscrimi na t e 43 1 betw e e n f ou r au t o c h t honou s re d g r ape c u ltiv a rs fr o m La Ri o j a (S pa i n ). T a l an t a 43 2 131, 412–416 . h tt p s:// do i. o r g / 10 . 1016 /j.t a l an t a . 2014 . 07 . 086 43 3 Palaci os , F., B ueno , G., S a li do , J., Di ago , M.P., H e r nánde z, I., T a r dagu il a , J., 43 4 2020. A u t o m a t ed g r ape vi ne flow e r de t e cti on and quan tific a ti on m e t hod ba s ed 43 5 on c ompu t e r visi on and deep l ea r n i ng fr o m on -t he - go im ag i ng u si ng a m ob il e 43 6 sensin g p l a tf o rm unde r fi e l d c ond iti on s. C o m pu t. El e ctr on . A g ric. 178 . 43 7 htt p s:// do i. o r g / 10 . 1016 /j.c o m pag . 2020 . 105796 43 8 Pold e r, G., G o w en , A., 2020 . Th e h y pe i n s pe ctr a l im ag i ng . J. S pe ctr. Im ag i ng . 43 9 htt p s:// do i. o r g / 10 . 1255 /jsi. 202 0. a4 44 0 Quijada - M o rí n , N., G a rcí a -Estév e z, I., N oga l e s-B ueno , J., R od rí gue z-P u li do , 44 1 F.J., He r ed i a , F.J., Riv a s-G on z a l o , J.C., Escri bano -B a il ón , M.T., H e r nánde z- 44 2 Hi e rr o , J.M., 2016 . Tryi ng t o s e t up t he fl a v ano lic pha s e s du ri ng g r ape s eed 44 3 ripenin g : A s pe ctr a l and c he mic a l app r oa c h . T a l an t a 160 , 556–561 . 44 4 htt p s:// do i. o r g / 10 . 1016 /j.t a l an t a . 2016 . 07 . 064 44 5 Retzl a ff, R., M o lit o r, D., B eh r, M ., B o ss ung , C., R o ck, G., H o ffm ann , L ., Ev e rs, 44 6 D., Ud e l ho v en , T., 2015 . UAS- ba s ed m u ltiangu l a r r e m o t e s en si ng o f t he e ff e cts 44 7 of s o il manage m en t str a t eg i e s on g r ape vi ne . J. I n t. Sci. Vi gne Vi n 49 , 85–102 . 44 8 htt p s:// do i. o r g / 10 . 20870 / oeno - one . 2015 . 49 . 2 . 91 44 9 Ristic, R., Il and , P.G., 2005 . R e lati on s h i p s be tw een s eed and be rry de v e l op m en t 45 0 of Vitis Vi n if e r a L . cv S h ir a z: De v e l op m en t a l c hange s i n s eed m o r pho l og y and 45 1 pheno l ic c o m po siti on . A u st. J. Gr ape Wi ne R e s. 11 , 43–58 . 45 2 htt p s:// do i. o r g / 10 . 1111 /j. 1755 - 0238 . 2005 .t b00278 .x 45 3 Ro d rí g uez-P u li do , F.J., B a r b i n , D.F., S un , D.-W., G o r d ill o , B., G on z á l e z-Mir e t, 45 4 M. L ., H e r ed i a , F.J., 2013 . Gr ape s eed c ha r a ct e riz a ti on b y NIR h y pe rs pe ctr a l 18
45 5 im a gin g . P o st ha rv e st Bi o l. T e c hno l. 76 , 74–82 . 45 6 htt p s:// do i. o r g / 10 . 1016 /j. po st h arv b i o . 2012 . 09 . 007 45 7 Ro d rí g uez-P u li do , F.J., G ó m e z- Rob l edo , L ., M e l go s a , M., G o r d ill o , B., G on z á l e z- 45 8 Mir e t, M. L ., H e r ed i a , F.J., 2012 . Ri pene ss e stim a ti on o f g r ape be rri e s and s eed s 45 9 by im age ana lysis. C o m pu t. El e ctr on . A g ric. 82 , 128–133 . 46 0 htt p s:// do i. o r g / 10 . 1016 /j.c o m pag . 2012 . 01 . 004 46 1 Roll e , L., T o rc h i o , F., Gi a c o s a , S., G e r b i, V., 2009 . M od ific a ti on s o f m e c han ic a l 46 2 charact e ristics and pheno lic c o m po siti on i n be rry ski n s and s eed s o f M ondeu s e 46 3 win eg ra pe s t h r oughou tt he on -vi ne d ryi ng p r o c e ss. J. Sci. F ood A g ric. 89 , 1973– 46 4 1980. h tt p s:// do i. o r g / 10 . 1002 /jsf a . 3686 46 5 Sin g h, N., Si ngh , A.N., 202 0. O d yss e ys o f ag ric u lt u r e s en s o rs: C u rr en t 46 6 chall e n ge s and f o rt h c o mi ng p ros pe cts. C o m pu t. El e ctr on . A g ric. 171 , 105328 . 46 7 htt p s:// do i. o r g / 10 . 1016 /j.c o m pag . 2020 . 105328 46 8 T h e Mat h w o rks, 2020 . MAT L AB. T he M a t h w o rks I n c., N a tik, USA. 46 9 Wang, Z., Y ang , Z., 2020 . R e vi ew on im age -stitc h i ng t e c hn i que s. M u ltim ed . Syst. 47 0 26, 4 13 –430 . h tt p s:// do i. o r g / 10 . 1007 /s 00530 - 020 - 00651 -y 47 1 Wendel, A., U nde rw ood , J., Wals h , K., 2018 . M a t u rity e stim a ti on o f m angoe s 47 2 usin g h y pe rs pe ctr a l im ag i ng f ro m a g r ound ba s ed m ob il e p l a tf o rm. C o m pu t. 47 3 Electro n . A g ric. 155 , 298–313 . h tt p s:// do i. o r g / 10 . 1016 /j.c o m pag . 2018 . 10 . 021 47 4 Yam, K.L., P apada kis, S.E., 2004 . A sim p l e d i g it a l im ag i ng m e t hod f o r m ea s u ri ng 47 5 and a n a lyzi ng c o l o r o f f ood s u rf a c e s. J. F ood E ng ., A pp lic a ti on s o f c o m pu t e r 47 6 vision i n t he f ood i ndu stry 61 , 137–142 . h tt p s:// do i. o r g / 10 . 1016 /S 0260 - 47 7 8774(0 3 ) 00195 -X 47 8 Zsófi, Zs., Vill angó , Sz., P á lfi, Z., T ó t h , E., B á l o , B., 2014 . T e xt u r e c ha r a ct e ristics 47 9 of t h e g r ape be rry ski n and s eed (Vitis vi n if e r a L . cv. K é kfr an k o s) unde r 48 0 postv era is on w a t e r de ficit. Sci. H o rtic. 172 , 176–182 . 48 1 htt p s:// do i. o r g / 10 . 1016 /j.sci en ta. 2014 . 04 . 008 48 2 19
48 3 FIGURE CAPTIONS 48 4 Figu r e 1. La y ou t o f t he Gr aph ical Us e r I n t e rf a c e (GUI). 48 5 Figu r e 2 . RGB im age s o f g r ape s eed s. T he tw o uppe r one s a r e M o sc a t e l (MO) 48 6 and t he l o w e r one s a r e P ed r o Xim éne z (PX). 48 7 Figu r e 3 . T op , t he a ct ua l appea r an c e o f g r ape bun c he s; mi dd l e , PCA o f 48 8 colorim e tric da t a ; and bo tt o m, P C A o f NIR s pe ctr a l da t a . 48 9 Figu r e 4. D e t a il o f an im age o f a gr ape bun c h and t he 21 - p ix e l g ri d u s ed t o e xtr a ct 49 0 both c olou rim e tric and s pe ctr a l i n f o rm a ti on fr o m t he m e r ged im age s. I n g r een , 49 1 pixels of un ri pe g r ape s and , i n r ed , p ix e ls o f o v e rri pe g r ape s. 49 2 20
Hi ghlig hts ( for r e vi e w) HIGHLIGHTS A new s o ftw a r e w a s de v e lo ped f o r m e r g i ng c o l o rim e tric and NIR s pe ctr a l im a g e s. New r e s u lti ng im age s a ll o w ge tti ng t he CIE L AB i n f o rm a ti on and NIR spe c tr u m fr o m an y p ix e l a t t he s a m e tim e . T h is p r og r a m ha s been s u cc e ssf u lly app li ed t o g r ape bun c he s and g r ape seeds im age s
Fig ur e 1 Click here to a cc e ss/ download ; Figu r e ; F J RP -Im age _ M a tc hing - Figu r e1 .t i f
Fig ur e 2 Click here to access/download;Figure;FJRP-Image _ Matching- Figure2.tif
Fig ur e 3 Click here to access/download;Figure;FJRP-Image _ Matching- Figure3.jpg