Procesamiento de imagen
y visión hiperespectral
para el control de calidad
en la industria de la patata
Tesis Doctoral
para optar al grado de
Doctor por la Universidade de Vigo
Autor:
Ángel Dacal Nieto
Directores:
Dr. Arno Formella
Dra. Pilar Isabel Carrión Pardo
Dirección:
HACEN CONSTAR
Ourense, 2011
vii
viii
xi
xii
xiii
xiv
1. Introducción 1
1.1. Motivación . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1. El proyecto de I+D: VISIOCAL . . . . . . . . . . . . . . 2
1.1.2. Objetivos de VISIOCAL . . . . . . . . . . . . . . . . . . . 2
1.1.3. Equipos de proyecto . . . . . . . . . . . . . . . . . . . . . 4
1.1.4. Primera fase del proyecto (2008-2009) . . . . . . . . . . . 4
1.1.5. Colaboración LOMG-LIA (2010) . . . . . . . . . . . . . . 5
1.2. Objetivos y contexto . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1. Antecedentes . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.2. Objetivos principales . . . . . . . . . . . . . . . . . . . . . 6
1.2.3. Objetivos secundarios . . . . . . . . . . . . . . . . . . . . 7
1.2.4. Etapas de la tesis . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.5. Aplicabilidad . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.6. Interdisciplinaridad . . . . . . . . . . . . . . . . . . . . . . 9
1.2.7. Novedad . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.8. Impacto . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3. Producción cientı́fica . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4. Investigaciones relacionadas . . . . . . . . . . . . . . . . . . . . . 10
1.4.1. Otros proyectos de investigación . . . . . . . . . . . . . . 10
1.4.2. Colaboraciones . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5. Evolución temporal . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.6. Organización de la memoria . . . . . . . . . . . . . . . . . . . . . 15
2. Visión artificial 17
2.1. Etapas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
xv
xvi ÍNDICE GENERAL
5. Detección de sarna 65
5.1. Introducción . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.1.1. Objetivos . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.2. Experimento . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2.1. Descripción . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.2.2. Segmentación . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.2.3. Extracción de caracterı́sticas . . . . . . . . . . . . . . . . 70
5.2.4. Selección de caracterı́sticas . . . . . . . . . . . . . . . . . 72
5.2.5. Algoritmos de clasificación . . . . . . . . . . . . . . . . . . 74
5.2.6. Evaluación de clasificadores . . . . . . . . . . . . . . . . . 75
5.2.7. Mapeo de la superficie afectada . . . . . . . . . . . . . . . 77
5.3. Resultados y Discusión . . . . . . . . . . . . . . . . . . . . . . . . 77
5.4. Sistema multiespectral . . . . . . . . . . . . . . . . . . . . . . . . 82
5.5. Conclusiones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
ÍNDICE GENERAL xvii
7. Conclusiones 109
7.1. Conclusiones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
7.2. Contribuciones . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
7.3. Lı́neas futuras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
7.4. Proyectos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
xix
xx ÍNDICE DE FIGURAS
xxv
xxvi ÍNDICE DE TABLAS
Introducción
1.1. Motivación
Detectar e identificar defectos y enfermedades en patatas (Solanum tubero-
sum) sigue siendo un desafı́o para la ingenierı́a agroalimentaria. La industria
ha usado un gran abanico de tecnologı́as, siendo la visión artificial una de las
opciones más exitosas [Lefebvre et al., 1993, Zhou et al., 1998, Muir et al.,
1999, Noordam et al., 2000, Barnes et al., 2010]. Sin embargo, existen nuevos
métodos que deben ser probados para mejorar el estado del arte en el control
de calidad no destructivo en patata.
La importancia de la industria de la patata es extrema, ya que la patata
1
2 CAPÍTULO 1. INTRODUCCIÓN
1.2.5. Aplicabilidad
El proyecto Visiocal parte de la necesidad de la industria gallega de la
patata de mayor automatización en sus procesos. En esta industria, el Ceteca
es organismo imparcial en la tasación de precios de producciones de patatas.
Por lo tanto, es un interlocutor válido, ya que aúna las experiencias de un gran
número de empresas envasadoras y productoras de patata con las que habrı́a
1.2. OBJETIVOS Y CONTEXTO 9
1.2.6. Interdisciplinaridad
Esta tesis ha sido desarrollada en un ambiente interdisciplinar, en el que la
relación con Ingenieros Industriales, Fı́sicos e Ingenieros en Telecomunicación,
ha sido continua. Por otra parte, el equipo de proyecto del Ceteca ha estado
formado por Ingenieros Agrónomos y Biólogos. Esto ha fomentado el intercam-
bio de conocimiento entre todas las partes, siendo la base sobre la que se ha
asentado la tesis.
Además, el campo de aplicación, la industria de la patata, y la agroalimen-
taria en general, ha marcado gran parte de la investigación. Ha sido necesario
profundizar en la problemática de este campo, hasta el punto de que más del
50 % de las referencias provienen de aplicaciones en el campo de la ingenierı́a
de alimentos.
1.2.7. Novedad
La visión hiperespectral es un campo todavı́a desconocido en el mundo in-
dustrial, especialmente en el agroalimentario. Por ello, la introducción de estas
tecnologı́as es fundamental para incentivar el continuo desarrollo innovador en
las empresas, aportando soluciones que no eran posibles con anterioridad, o
hacerlo de un modo más rápido o eficiente.
Muestra de la novedad de la tecnologı́a hiperespectral, la gran mayorı́a de
las referencias en relación a este campo datan de fechas posteriores al año 2007.
10 CAPÍTULO 1. INTRODUCCIÓN
1.2.8. Impacto
En una industria tan deficitaria tecnológicamente como la agroalimentaria,
la introducción de nuevas tecnologı́as que automaticen los procesos se convierte
en un elemento esencial para su modernización. Las visitas a varias empresas
de la industria de la patata fueron vitales a la hora de comprobar las abun-
dantes necesidades en materia de automatización y mecanización, que esta tesis
pretende ayudar a paliar dentro de su ámbito y en la medida de lo posible.
Como muestra, podemos observar que existen varias iniciativas en los últimos
años para realizar un control de calidad exhaustivo de la producción mediante
técnicas de visión por computador, con mayor o menor éxito, pero sin embargo
a dı́a de hoy la mayorı́a de tareas se siguen realizando de manera manual, con
operadores humanos, de modo que el personal necesario es considerable, además
de conllevar los consiguientes errores por subjetividad, fatiga o inexperiencia.
LEAME
A lo largo de 2007 y la primera mitad de 2008, se lleva a cabo el proyecto
Sistema de lecturas automático para aplicaciones en metrologı́a mediante visión
por computador (Leame), dotado con 7500 € por la Universidade de Vigo, cuyo
1.4. INVESTIGACIONES RELACIONADAS 11
VITICAL
El proyecto Sistema para el control de calidad en uva mediante visión artifi-
cial (Vitical), se desarrolla durante 2008 y 2009 en colaboración con el Ceteca
y la Cooperativa Vitivinı́cola do Ribeiro, recibiendo alrededor de 190000 € de
financiación de la Consellerı́a de Medio Rural de la Xunta de Galicia. Su sistema
de adquisición coincide con el utilizado en el análisis visible en patatas: cámara
JAI BB-500GE (sensor Ccd color 2/3”, 2456 × 2058, 15 fps, GigE Vision) y
óptica Schneider Cinegon Xenoplan 1.4/17 mm 2/3”, serie Compact 400-1000.
En este proyecto el doctorando colabora en la fase de montaje del sistema, muy
compleja al tratarse de un sistema que funciona en exteriores y que abarca una
zona de interés de más de 2 m2 . También es el responsable del software a utili-
zar por el usuario durante el desarrollo del proyecto. La parte de adquisición de
Vitical y Visiocal (visible) se realiza casi en paralelo y con una abundante
retroalimentación entre ambos. Fruto de este proyecto son dos publicaciones en
revistas [Vazquez-Fernandez et al., 2009b, Vazquez-Fernandez et al., 2010a] y
congresos nacionales [Vazquez-Fernandez et al., 2010b] en los que ha participado
el doctorando.
REDILASDI
El proyecto Patrón de referencia dimensional basado en un interferómetro
con láseres de diodo sintonizables de ancho de banda estrecho (Redilasdi),
dotado en 2008 con alrededor de 77000 € del Programa de Investigación Funda-
mental No Orientada del Ministerio de Ciencia e Innovación, utiliza un sistema
de adquisición similar a Visiocal y Vitical. Debido a las caracterı́sticas del
12 CAPÍTULO 1. INTRODUCCIÓN
MEDGRASA
Producción de carne con alta infiltración intramuscular a partir de terne-
ros frisones castrados de 18 meses de edad; Calidad de la canal y de la carne
(Medgrasa) es un proyecto llevado a cabo entre el Ceteca y Coren, dotado
con aproximadamente 170000 € proporcionados por el plan Incite de la Xunta
de Galicia, que contó en su dı́a con una pequeña colaboración a lo largo de
2009 del Lomg, para la realización de un sistema de visión artificial para la
medición de grasa intramuscular en filetes de vacuno. Este sistema utiliza el sis-
tema de adquisición visible de Visiocal, adaptado a las necesidades especı́ficas
de Medgrasa. Cambia principalmente la iluminación, muy tenue para evitar
reflejos innecesarios, ya que la carne está recién cortada y brilla. También se
modificaron aspectos relacionados con el enfoque, tiempo de exposición y ba-
lance de blancos. Las labores del doctorando en este proyecto se centraron en el
sistema de adquisición y pruebas preliminares de segmentación y procesamiento
de imagen.
OVOVIP
Ovovip (Determinación in-ovo del sexo en aves mediante visión hiperespec-
tral), es un estudio de viabilidad dotado con 10000 € de la Xunta de Galicia que
coincide a lo largo de 2009 con el desarrollo del sistema hiperespectral y supone
un nuevo problema con el que ponerlo a punto. En este caso el objetivo es testar
las capacidades del sistema hiperespectral para el sexado de huevos de gallina
antes de su eclosión. Se prueba una iluminación halógena por fibra Schott DCR
III Plus, con terminación puntual. Finalmente se opta por el mismo sistema
1.4. INVESTIGACIONES RELACIONADAS 13
DETEPRE
El proyecto Detepre (Desarrollo e implantación de nuevas tecnologı́as y
protocolos en el estudio de ecologı́a reproductiva pesquera) nace en 2008 fruto de
una colaboración entre el Instituto de Investigaciones Marinas del Csic (Iim-
Csic), el Departamento de Electrónica y Computación de la Universidade de
Santiago de Compostela y el grupo Lia del Departamento de Informática de la
Universidade de Vigo. Financiado por el plan Incite de la Xunta de Galicia, su
principal objetivo es la automatización de las tareas de estudios reproductivos
llevados a cabo en el Iim-Csic mediante la aplicación de técnicas de visión
artificial y clasificación. En este proyecto el doctorando ha supervisado la base
de datos del proyecto y colaborado con el desarrollo de la herramienta Govocitos,
que es la interfaz de usuario final de manejo del sistema.
CARNEVIP-SEGALI
En 2009 y 2010, Lomg y Lia (respectivamente) proponen un proyecto de
investigación utilizando el sistema hiperespectral, en este caso colaborando con
Ceteca. El objetivo de este proyecto es inspeccionar carne envasada de vacuno
y pollo para detectar su salubridad, utilizando el sistema existente infrarrojo, y
planteando la adquisición de nuevos componentes que permitan una inspección
en el rango visible (400 nm a 1000 nm). Se solicita financiación en convocatorias
públicas durante dos años consecutivos, con las denominaciones Carnevip y
Segali, pero en ambas ocasiones es denegada. No obstante, el proceso de pla-
nificación y análisis de requisitos resulta beneficioso para el trabajo de tesis y
de experiencia con el sistema hiperespectral.
ANHIMIGA
A mediados de 2010, en paralelo al desarrollo de los trabajos correspondientes
a la detección de sarna y corazón hueco mediante el sistema hiperespectral,
surge en el Lia la idea de usar el sistema para la clasificación de miel según
su origen floral. Para asegurar su viabilidad, se realiza un estudio previo que
14 CAPÍTULO 1. INTRODUCCIÓN
COPEVI
En 2010, la empresa Josmar S.L., el Centro de Ingenierı́a Mecánica y Au-
tomoción (Cima) de la Universidad de Vigo y el grupo Lia de la Universidade
de Vigo se unen para la realización de un proyecto para automatizar el despiece
de merluza mediante la aplicación de técnicas de visión artificial. El proyecto,
denominado Copevi (Desarrollo de una herramienta de corte óptimo de mer-
luza mediante el uso de técnicas de visión artificial), pretende detectar la cola y
aletas de los individuos para cortar dichas partes de manera independiente a su
tamaño, al contrario que de manera fija, tal y como se realiza en la actualidad.
Nuevamente el proyecto supone un desafı́o para el doctorando en lo referente
a adquisición de imagen, componentes y empleo y aplicación de algoritmos de
procesamiento de imagen.
Otras actividades
Durante la fase de puesta a punto del sistema, a lo largo de 2009, también
se probó la eficacia del sistema hiperespectral en otros objetos, como fruta y
diversos plásticos. Una de las primeras pruebas del sistema se realizó en tiras de
madera, con el objetivo de detectar la lı́nea en la que el tronco cambia a su zona
central. Este ensayo se realiza por petición del centro tecnológico CIS-Madera.
Sin embargo, el problema no se pudo resolver, posiblemente debido a que las
longitudes de onda no fueron las adecuadas.
1.4.2. Colaboraciones
El sistema hiperespectral usado es de los primeros montados en España
con esas caracterı́sticas. El distribuidor en España, Infaimon, confirma que el
sistema presentado es el 5º vendido en España (conjunto Xenics Xeva 1.7-320
1.5. EVOLUCIÓN TEMPORAL 15
Visión artificial
17
18 CAPÍTULO 2. VISIÓN ARTIFICIAL
investigación básica.
También debemos distinguir entre procesamiento de imagen (aquellas técni-
cas y algoritmos utilizados a bajo nivel) y visión por computador (un contenedor
de todas las fases necesarias para poner en marcha un sistema).
2.1. Etapas
La metodologı́a clásica de la visión por computador distribuye el proceso de
análisis en varias fases, que pueden variar según la aplicación concreta. Hablamos
de un área de conocimiento multidisciplinar y compleja que involucra a varias
tecnologı́as de naturaleza diversa.
En esta tesis doctoral realizaremos una serie de experimentos siguiendo esta
metodologı́a, adaptándola en cada caso a los problemas concretos por estudiar.
Adquisición
Preprocesamiento y segmentación
Extracción de caracterı́sticas
Reconocimiento de patrones
Una vez disponemos de una representación del problema, se puede desarrollar
un experimento de reconocimiento de patrones, que suele constar de una fase
de selección de caracterı́sticas y otra de clasificación.
El reconocimiento de patrones es el área de conocimiento que trabaja en la
clasificación, descripción y agrupamiento automático de objetos, que tiene por
objetivo clasificar información extraı́da de un conjunto de datos. Está ı́ntima-
mente ligada a la inteligencia artificial y la estadı́stica.
El resultado del proceso es un descriptor o modelo, que toma la decisión
sobre la clase a la que pertenece un patrón desconocido en función de sus ca-
racterı́sticas.
Los patrones parecidos forman clases, que se establecen mediante criterios
de proximidad o similitud en función de las caracterı́sticas con las que se re-
presenta el problema. La manera más sencilla de entenderlo es pensar en cada
instancia (muestra, patrón) como un punto en un espacio de caracterı́sticas de
tantas dimensiones como caracterı́sticas, en el cual los puntos cercanos entre
sı́ (utilizando una determinada métrica de distancia) son de la misma clase (o
al menos eso serı́a lo deseable).
En este contexto, un clasificador es un algoritmo que, dado un conjunto de
entrenamiento y una nueva instancia desconocida, determina la pertenencia a
una de las clases del problema. Existen multitud de algoritmos de clasificación;
entre ellos encontramos clasificadores de mı́nima distancia (que tienen en cuen-
ta la distancia al vector centroide de cada clase), k-NN (que tienen en cuenta
la distancia al vecino más próximo), bayesianos (que se basan en conocimiento
previo de las probabilidades del problema), basados en redes neuronales como
Mlp (que utilizan una red neuronal de topologı́a variable normalmente entrena-
2.1. ETAPAS 21
Análisis de textura en el
espectro visible
3.1. Introducción
La visión por computador se ha convertido en una tecnologı́a esencial para el
control de calidad en la industria agroalimentaria, que demanda continuamente
nuevas y mejores aplicaciones. Existen numerosos ejemplos de esta sinergia en
la industria de la patata [Lefebvre et al., 1993, Zhou et al., 1998, Muir et al.,
1999]. Ası́, se han implantado exitosamente complejos sistemas comerciales en
23
24 CAPÍTULO 3. ANÁLISIS DE TEXTURA EN EL ESPECTRO VISIBLE
los últimos años, lo que demuestra que la visión artificial para el control de
calidad en patata es una tecnologı́a madura.
Las técnicas de inteligencia artificial están entre las más usadas en la visión
por computador [Goyache et al., 2001, Du & Sun., 2006]. Entre ellas, se ha
hecho uso de los algoritmos genéticos (Ga’s) [Goldberg., 1989, Holland., 1992]
de manera extensiva para múltiples propósitos, como por ejemplo incluyéndolos
en un clasificador para calcular los pesos de una red neuronal [Guyer & Yang.,
2000], o para tareas de segmentación [Gong & Yang, 2004].
Sin embargo, su uso se ha extendido especialmente como técnica de selec-
ción de caracterı́sticas [Chtioui et al., 1998, Gómez-Sanchı́s et al., 2008], con el
objetivo de obtener un subconjunto con aquellos atributos más relevantes (en
función del problema) en un conjunto de datos.
El objetivo de este trabajo es desarrollar un sistema de visión artificial para el
control de calidad que clasifique patatas no lavadas en función de la presencia de
varias enfermedades externas de las mismas. Podemos ver un diagrama general
del sistema en la Figura 3.1.
Actualmente un experto selecciona muestreos de 20 kg de un productor, con
el objetivo de detectar el porcentaje de patatas defectuosas y asignar un precio
justo a la producción. Este proceso es tedioso y muy sensible a errores humanos,
por lo que se recomienda su automatización.
3.1.1. Motivación
El grueso de este trabajo se realiza entre finales de 2008 (coincidiendo con
la época de recogida de la patata) y principios de 2009. Hablamos del primer
paso del proyecto Visiocal. El proyecto parte de una serie de defectos y enfer-
medades presentes en los tubérculos que es necesario detectar.
La planificación indicaba que algunos serı́an abordados mediante visión hi-
perespectral, mientras que otros lo serı́an mediante análisis colorimétrico en el
espectro visible. Entre estos últimos encontramos la podredumbre húmeda, la
podredumbre seca, el verdeo, los daños mecánicos, el agusanado, y los gromos,
principalmente.
Se llevó a cabo una campaña de captura de imágenes, tras la que expertos del
Ceteca etiquetaron las imágenes indicando, para cada muestra, la pertenencia
a cada una de las clases definidas con anterioridad, a las que hay que añadir los
ejemplares sanos.
Tras un análisis de las estrategias a seguir, se decide que se aplicarán técnicas
de análisis de textura para la detección de aquellos defectos en los que el color y
la textura es relevante para el experto, como las podredumbres húmeda y seca
3.1. INTRODUCCIÓN 25
3.2. Experimento
3.2.1. Adquisición de imagen
En esta sección se describirá el sistema de adquisición diseñado para la ob-
tención de imágenes, ası́ como el procedimiento empleado.
Recogida de muestras
Un conjunto con 47 sacos de patatas (con aproximadamente 20 kg cada uno)
fue seleccionado aleatoriamente de dos empresas procesadoras de patata en Xin-
zo de Limia (Ourense, España) en la época de recolección de 2008. Los sacos
recogı́an muestras de las tres variedades más importantes de la región (Agria,
Kennebec y otras variedades rojas), conteniendo patatas sanas y defectuosas
con varias enfermedades externas. Es común que las empresas de esta zona no
laven las patatas antes de su envasado, por lo que todas las inspecciones deben
ser realizadas en presencia de polvo y tierra sobre las patatas.
patatas utilizando una cámara lineal, por lo que necesitamos una captura global
mediante una cámara matricial. Esta operación ha de realizarse, no obstante,
tomando un tiempo de exposición suficientemente bajo, tanto como permite la
iluminación en Ac utilizada (alrededor de 10 ms). A tiempos de exposición me-
nores se percibe el parpadeo de la luz, lo cual no garantiza una iluminación
estable a lo largo de las imágenes obtenidas.
A continuación se determinó la resolución necesaria para la cámara a com-
prar. Si tomamos un campo de visión (Fov) como la superficie de la lı́nea que
queremos observar (0.5 m a 0.8 m de ancho) y un sensor de 5 Mp (Mega pı́xeles)
de 2456 × 2058, obtenemos una resolución de:
F OV 0,8 m mm mm
Rc = = = 0,32 ≈ 0,4 (3.1)
Rs 2456 pixel pixel pixel
Tomando un margen doble (Nyquist), podemos trabajar con defectos en
patata de 0.8 mm, que es razonable para el análisis que se busca, teniendo en
cuenta los defectos a buscar. Se desea ese detalle de cada patata, porque el
objetivo es inspeccionar sacos de aproximadamente 20 kg de patatas, de modo
que vamos a tener varias patatas por imagen. Cuantos más pı́xeles podamos
inspeccionar por patata, más datos tendremos para poder clasificarlas (dentro
de unos lı́mites de presupuesto, capacidad de computación y disponibilidad).
Otra de las caracterı́sticas determinantes a la hora de escoger el tipo de
camara fue la conexión al PC. Dado el emplazamiento del puesto de adquisición
de imagen, el estándar emergente GigEVision parece el más adecuado, ya que
permite distancias de cableado cámara–PC de más de 100 m (frente a los 5 m
de Firewire o los 10 m de CameraLink).
El Fov a abarcar por el sistema se determina con el tamaño del sensor de
la cámara y la focal de la lente. A medida que disminuye la distancia focal,
aumenta el Fov para un determinado tamaño de sensor, pero también aumenta
la distorsión geométrica de la imagen obtenida. Tomando un tamaño de Ccd
comercial de 2/3”, que es el máximo disponible en las cámaras con la resolución
adecuada, hay que llegar a un compromiso entre la focal y el Fov que nos
permita abarcar la mayor superficie posible minimizando la distorsión.
Con todo esto, el sensor escogido es un 2/3” Bayer Color ICX625AQA, que
es el que monta la cámara finalmente escogida: JAI BB-500 GE (Figura 3.2).
Para su alimentación se adquirió una fuente de alimentación regulable, limitada
a 12 V.
A partir de las especificaciones proporcionadas por el fabricante se realizaron
los cálculos para la distancia focal, que se resumen en la Ecuación 3.2,
28 CAPÍTULO 3. ANÁLISIS DE TEXTURA EN EL ESPECTRO VISIBLE
Figura 3.2: Cámara del sistema de análisis de patata en el espectro visible: JAI
BB-500GE, junto con su óptica.
s (mm)
β = FTOV (mm)
(3.2)
f 0 = α 1−β
β
ancho = 0,5 m =⇒ α ≈ 1 m
(3.3)
ancho = 0,8 m =⇒ α ≈ 1,5 m
Por otro lado, para la iluminación se realizaron pruebas in–situ en la lı́nea
piloto. Se hicieron diversas comprobaciones de posición y tipo de focos (Led,
halógenos, etc.), observándose un mejor comportamiento de focos halógenos con
difusores. Se seleccionaron dos focos de 500 W en disposición axial sobre la lı́nea,
de manera que se cubra toda la superficie, minimizando el efecto de sombras.
Se detectó un problema en la adquisición de imagen debido a las oscilaciones
por debajo de un determinado tiempo de exposición, que puede ser subsanado
sustituyendo las fuentes de Ac por Dc.
Cabe destacar la necesidad de que el PC al que se conecte la cámara disponga
de una tarjeta de red Intel PRO/1000 Gigabit Ethernet o compatible, para
asegurar el buen funcionamiento con el estándar GigEVision da cámara. En la
interfaz de red es necesario establecer ciertos parámetros de configuración, como
los Jumbo Frames a valores de más de 9000 bytes.
3.2. EXPERIMENTO 29
En las Figuras 3.4 y 3.5 se muestran varias imágenes del sistema montado y
en funcionamiento. Durante el proceso de adquisición de imagen se recogieron
un total de 5040 imágenes de resolución 2456 × 2048 en formato Tiff.
Software de adquisición
Para la toma de imágenes se ha desarrollado un software especı́fico (Figura
3.6), ya que el software proporcionado por el fabricante de la cámara (JAI)
no cubrı́a las funcionalidades mı́nimas exigibles. Este software hace uso de las
librerı́as JAI Sdk en lenguaje C++. Sus principales caracterı́sticas son:
Los principales desafı́os de este software han sido la comunicación con los
dispositivos, la integración de sus librerı́as, y el uso de hilos. La aplicación ha
facilitado notablemente las tareas de adquisición, automatizando la recogida de
imágenes y el encendido y apagado de la iluminación en los momentos oportunos.
3.2. EXPERIMENTO 31
(calidad) y hace posible estimar cómo de bien enfocados están los objetos a
inspeccionar, en nuestro caso patatas [Vazquez-Fernandez et al., 2010a]. Con-
cretamente, para cada imagen, calcula la desviación tı́pica de la transformada
Fft de la imagen. De esta manera, y teniendo una imagen fija, se garantiza que
el enfoque está establecido en la mejor posición posible.
2. Identificación de objetos
La segunda parte del proceso de segmentación es la identificación de las
regiones conexas como objetos. En esta fase es necesario resolver ciertos
problemas, como impedir considerar como objetos independientes al ruido
que pudo pasar de la fase anterior. El resultado de esta fase es una nueva
imagen por cada región conexa, con fondo negro.
Cuando todas las rotaciones están testadas, el mejor istmo es usado para di-
vidir la imagen verticalmente, creando dos sub–imágenes. Sus cajas envolventes
(bounding–box) son ajustadas al nuevo contenido, y el algoritmo se ejecuta de
nuevo para asegurar que solo haya una patata en cada una de las dos imágenes
generadas. Este algoritmo se aplica recursivamente hasta que no existen istmos
en ninguna imagen (Figura 3.13). Se trata de una operación que consume bas-
tante tiempo, aunque es dependiente del número de patatas en la imagen. Se
han registrado tiempos de ejecución de hasta 10 segundos (en imágenes donde
las patatas se encuentran apelotonadas), aunque la media está en torno a 4 se-
gundos. De todos modos esta condición es solucionable pasando las patatas de
manera más separada en la lı́nea de envasado.
38 CAPÍTULO 3. ANÁLISIS DE TEXTURA EN EL ESPECTRO VISIBLE
N
1 X
M edia = x̄ = xi (3.4)
N i=1
N
1 X
V arianza = (xi − x̄)2 (3.5)
N i=1
N
1 X
Curtosis = (xi − x̄)4 − 3 (3.6)
N ∗ V arianza2 i=1
N
1
(xi − x̄)3
P
N
i=1
Simetria = 23 (3.7)
N
1
(xi − x̄)2
P
N
i=1
N
X −1
Contraste = Pi,j (i − j)2 (3.8)
i,j=0
N
X −1
Disimilaridad = Pi,j |i − j| (3.9)
i,j=0
N −1
X Pi,j
Homogeneidad = (3.10)
i,j=0
1 + (i − j)2
v
u N −1
uX
Energia = t Pi,j 2 (3.11)
i,j=0
N
X −1
Entropia = Pi,j [−ln(Pi,j )] (3.12)
i,j=0
N −1
X (i − µi )(j − µj )
Correlacion = Pi,j q (3.13)
i,j=0 σi2 σj2
Para cada canal Rgb y Hsv se obtienen: media, varianza, curtosis y simetrı́a
del histograma y contraste (inercia), disimilaridad, homogeneidad, energı́a, en-
tropı́a y correlación de la matriz de co–ocurrencia de niveles de gris.
Utilizar estadı́sticos de primer orden de histograma y de matrices de co–
3.2. EXPERIMENTO 41
3.2.5. Clasificación
En esta fase se ha hecho uso del software Weka [Weka, 2011] para un testeo
preliminar de los algoritmos a utilizar. Ası́, se han probado Random Forest,
Naive Bayes, entre otros, resultando finalmente el algoritmo del vecino más
próximo (1-nn) por su simplicidad y robustez [Jain et al., 2000].
En las evaluaciones llevadas a cabo, se ha hecho uso de la estrategia leave–
one–out cross–validation, un procedimiento muy extendido en los problemas de
reconocimiento de patrones [Weiss & Kulikowski, 1991]. En los próximos capı́tu-
los veremos otro método similar, basado en la generación de permutaciones del
conjunto de datos y su división en conjuntos de entrenamiento, validación y test.
Previa a la clasificación, se realizará una selección de caracterı́sticas por
medio de un algoritmo genético, de modo que las f = 60 caracterı́sticas extraı́das
hasta el momento se reduzcan a un subconjunto que maximice el acierto del
clasificador. Posteriormente se comparará la eficiencia del clasificador usando
60 caracterı́sticas y usando el subconjunto seleccionado.
f itness(i)
pi = N
(3.14)
P
f itness(j)
j=1
```
``` Clasificada
``` Buena Podrido Verdeo
Realmente ```
Buena 67 4 7
Podrido 10 122 6
Verdeo 2 4 40
Sistema de adquisición
hiperespectral
4.1. Introducción
La visión hiperespectral es una tecnologı́a emergente diseñada originalmente
para inspección remota por satélite con propósitos militares [Goetz et al., 1985],
pero que se ha extendido para su uso en astronomı́a y observación del terreno.
Sin embargo, en los últimos años ha comenzado a aplicarse en análisis no
destructivos en la industria agroalimentaria, por proporcionar un acercamiento a
la espectrografı́a convencional. Ası́, a pesar de una pequeña pérdida de precisión,
49
50 CAPÍTULO 4. SISTEMA DE ADQUISICIÓN HIPERESPECTRAL
4.1.1. Motivación
En las conversaciones de Lomg y Ceteca, el equipo de proyecto de Visio-
cal (entre los que se encontraba el doctorando), enumera unos objetivos para
los cuales es necesario plantear alternativas y soluciones. Como ya hemos dicho
con anterioridad, la detección del corazón hueco era una de las funcionalidades
más requeridas por parte de la industria, y merecı́a un tratamiento especial.
El resto de funcionalidades (caracterı́sticas externas principalmente) parecı́an
resolubles con un sistema clásico de visión artificial.
Fue entonces cuando se pusieron encima de la mesa las distintas tecnologı́as
que habı́an tratado con el problema hasta ese momento. La acústica y la espec-
trografı́a convencional habı́an tratado directa o indirectamente con el problema
con resultados razonables. Sin embargo, cabe recordar que el proyecto buscaba
otros objetivos para los cuales la visión artificial seguı́a siendo la mejor opción.
La espectrografı́a infrarroja ha sido empleada para inspección destructiva
y no destructiva en los últimos años. Por su parte, la visión hiperespectral
permite, además un análisis no invasivo, el uso de caracterı́sticas morfológicas
4.1. INTRODUCCIÓN 51
University McGill
Hokkaido University
El grupo de A. Al–Mallahi, T. Kataoka, H. Okamoto, and Y. Shibata de la
Hokkaido University ha trabajado en la aplicación de visión hiperespectral a la
detección de terrones en un conjunto de patatas [Al-Mallahi et al., 2008, Al-
Mallahi et al., 2009]. Se utiliza el espectrógrafo Specim V10, desarrollando un
experimento que finalmente da como resultado un acierto del 98 % utilizando
muestras húmedas.
FRCFT
El Food Refrigeration & Computerized Food Technology group (Frcft) de
la National University of Ireland, con Da–Wen Sun, Cheng–Jin Du, y Aoife
Gowen, entre otros, han publicado varias reviews [Du & Sun, 2004, Du & Sun.,
4.1. INTRODUCCIÓN 53
2006, Zheng et al., 2006] y libros [Sun, 2006, Sun, 2009] sobre control de calidad
alimentario usando visión hiperespectral, ası́ como varias contribuciones sobre
deterioro de la calidad en champiñones [Gowen et al., 2007, Gowen et al., 2008].
Por ejemplo en [Gowen et al., 2008] encontramos un sistema para la clasi-
ficación de champiñones en función de su nivel de deterioro. Se utiliza el es-
pectrógrafo Specim V10E, y se consigue alrededor de un 70 % de acierto.
IVIA
GIF
Pilar Beatriz Garcı́a-Allende y Olga M. Conde, entre otros, del Grupo de In-
genierı́a Fotónica (Gif) de la Universidad de Cantabria, han estado investigando
el uso de visión hiperespectral para control de calidad agroalimentario desde una
perspectiva genérica, además de clasificación de materiales [Garcı́a-Allende et
al., 2008a, Garcı́a-Allende et al., 2008b, Garcı́a-Allende et al., 2010a, Garcı́a-
Allende et al., 2010b].
INIT
UPV
Nebraska University
Otros
Figura 4.4: Cuatro imágenes espaciales tras la reconstrucción del cubo hiperes-
pectral. Arriba izquierda: 979.99 nm, arriba derecha: 1172.53 nm, abajo izquier-
da: 1342.60 nm, abajo derecha: 1608.20 nm.
58 CAPÍTULO 4. SISTEMA DE ADQUISICIÓN HIPERESPECTRAL
4.2.1. Material
Un sistema experimental de adquisición hiperespectral fue puesto a punto
tal y como puede verse en las Figuras 4.5, 4.6 y 4.7.
Figura 4.5: Imagen frontal del sistema de adquisición hiperespectral sin (iz-
quierda) y con (derecha) difusor de luz.
Figura 4.6: Imagen frontal del sistema de adquisición hiperespectral sin (arriba)
y con (abajo) difusor de luz.
Figura 4.10: Interfaz de usuario del software de manejo del sistema de adquisi-
ción hiperespectral y de análisis de datos.
for (i
= 0; i < β; i + +)
imSpectral = createImage(α x γ)
while(∃ more images in d)
column = 0
do
do exit(column) = imSpectral(i)
column + +
saveImage(i);
Esto significa que del sistema se obtienen 320 imágenes espectrales de 320 ×
256 pı́xeles, que son convertidas a un cubo hiperespectral compuesto por 256
imágenes de 320 × 320 pı́xeles, correspondientes a longitudes de onda entre
900 nm y 1700 nm aproximadamente.
La construcción del cubo hiperespectral es una operación costosa compu-
tacionalmente, y su tiempo de ejecución varı́a en función del equipo donde se
realice. En un equipo reciente, se han registrado tiempos de aproximadamente
40 segundos.
Aunque las posibilidades de análisis de datos serán detalladas en los próximos
capı́tulos de la memoria, es de destacar que podemos seleccionar una zona del
cubo hiperespectral (ventana de interés) y obtener un gráfico de cómo varı́a la
luminosidad media de esa ventana a lo largo del rango de longitudes de onda
del sistema (Figura 4.12).
4.3. Conclusiones
Se ha construido y puesto a punto un sistema de visión hiperespectral in-
frarrojo utilizando componentes independientes, lo cual nos ha permitido un
64 CAPÍTULO 4. SISTEMA DE ADQUISICIÓN HIPERESPECTRAL
Figura 4.12: Gráfica de luminosidad media por banda de una ventana de interés
en el sistema de adquisición hiperespectral.
Detección de sarna
65
66 CAPÍTULO 5. DETECCIÓN DE SARNA
5.1. Introducción
5.1.1. Objetivos
En el Capı́tulo 4 hemos comprobado las posibilidades de la visión hiperespec-
tral aplicadas al control de calidad en la industria agroalimentaria. El espectro
de actuación es muy amplio, y cubre desde fruta hasta carne, pasando por hor-
talizas y hongos.
En lo referente a patatas, algunos trabajos [Al-Mallahi et al., 2008, Al-
Mallahi et al., 2009] se han orientado a la detección de terrones entre grupos de
patatas. Sin embargo, trabajos basados en espectrografı́a convencional [Haase,
2006, Buning-Pfaue, 2003, Kang et al., 2004, Kang et al., 2008] han demos-
trado que es posible investigar caracterı́sticas internas como cantidad de agua,
almidón, proteı́nas o materia seca en patatas. Otros trabajos más antiguos [Por-
teous et al., 1981] sugieren la posibilidad de detectar sarna común, gangrena y
otras enfermedades, usando un rango de longitudes de onda entre 590 nm y
2030 nm. Estas investigaciones logran hasta un 83 % de acierto, pero o bien sus
procedimientos son destructivos, o son difı́cilmente integrables en otros sistemas
de visión artificial más complejos.
Siendo la visión hiperespectral un acercamiento a los métodos de espec-
trografı́a, pero siempre desde una perspectiva no invasiva, el objetivo de este
capı́tulo es estudiar la detección de sarna común en patatas utilizando el siste-
ma de visión hiperespectral descrito en el Capı́tulo 4.
Si bien uno de los principales objetivos de esta tesis es la detección del co-
razón hueco en patata, durante su desarrollo se planteó la hipótesis de que la
presencia de sarna común podrı́a entorpecer la detección del corazón hueco. Pa-
ra ello, se comenzó una investigación paralela para la detección de sarna común,
utilizando el mismo sistema de adquisición y un planteamiento de experimento
similar. El uso del mismo sistema de adquisición es fundamental en el ahorro
de material necesario y tiempo, ya que podemos efectuar varios análisis con la
misma imagen. Ası́, a pesar de que pueden existir otros métodos más adecuados
para este propósito, como el análisis de textura en el espectro visible, se deci-
dió investigar la adecuación del sistema para la detección de sarna por la fácil
integración en una hipotética implantación futura.
El motivo de que este capı́tulo dedicado a la detección de sarna se presente
con anterioridad al dedicado a la detección de corazón hueco, es que la detección
de sarna se va a utilizar como un módulo dentro de la investigación para la
detección de corazón hueco. La idea es poder descartar la sarna en las imágenes
de las patatas, y ası́ tener la posibilidad de estudiar la presencia de corazón
5.2. EXPERIMENTO 67
5.2. Experimento
El principal propósito del experimento es desarrollar un procedimiento para
la medición de sarna común en patatas. Para ello, se desarrollará un experi-
mento en el cual, entre otras tareas, se determinará un subconjunto óptimo de
caracterı́sticas que maximice la precisión de un clasificador que mapee superficie
sana y afectada por sarna común en patatas.
En el Capı́tulo 4 vimos que cada sesión de adquisición de imagen, en la que
obtenemos un cubo hiperespectral, consume más de un minuto. Esto viene cau-
sado por el movimiento de escaneo del motor (para obtener todas las lı́neas que
componen el objeto) y el procedimiento de construcción del cubo hiperespectral
(para obtener una imagen por cada banda, en lugar de una por cada lı́nea).
Un sistema que necesita más de un minuto en obtener un cubo hiperespectral
puede tener dificultades para ser integrado en algunas industrias. Sin embargo,
el sistema presentado puede verse como un sistema experimental y no como
68 CAPÍTULO 5. DETECCIÓN DE SARNA
5.2.1. Descripción
El experimento usa un conjunto de 234 patatas (de variedad Agria) recogidas
en Xinzo de Limia (España) en varias compañı́as envasadoras de patatas durante
el otoño de 2009. El proceso de selección, llevado a cabo por expertos, intentó ser
representativo en cuanto al tamaño de los tubérculos.
El primer paso fue capturar las imágenes usando el sistema hiperespectral
descrito en el Capı́tulo 4. Para doblar el conjunto de datos, cada patata fue esca-
neada por dos lados. A continuación, se construyeron los cubos hiperespectrales
correspondientes.
Con este conjunto de datos, se ha desarrollado un experimento de recono-
cimiento de patrones utilizando en primer lugar técnicas de procesamiento de
imagen y extracción de caracterı́sticas, con la ayuda de la librerı́a de código
abierto OpenCV [Bradski & Kaehler, 2008].
Posteriormente se han aplicado algoritmos de selección de caracterı́sticas, con
lo que se han obtenido distintos conjuntos de datos que representan el mismo
problema usando distintas combinaciones de caracterı́sticas. Por último, estos
conjuntos de datos se han evaluado con varios algoritmos de clasificación, lo cual
permitirá evaluar cuál de los subconjuntos de caracterı́sticas es el más adecuado
para el problema.
5.2. EXPERIMENTO 69
5.2.2. Segmentación
Para cada cubo hiperespectral vamos a segmentar las patatas del fondo
(background) para tareas posteriores de extracción de caracterı́sticas. Solo seg-
mentamos una imagen por cada cubo hiperespectral, con el que obtendremos
una máscara que se aplicará en todas las imágenes del cubo. La imagen es-
cogida para la segmentación (980 nm) se ha seleccionado tras varias pruebas
preliminares.
La segmentación se realiza en varios pasos secuenciales. En primer lugar,
binarizamos la imagen usando el método de Otsu [Otsu, 1979], que calcula el
70 CAPÍTULO 5. DETECCIÓN DE SARNA
Figura 5.5: Gráficas de niveles de gris por banda de dos muestras en el experi-
mento de detección de sarna común.
Búsqueda Linear Forward Selection (Lfs) [Guetlein et al., 2009], que se-
lecciona 7 bandas.
[Wang & Xiao, 2005, Jarchi & Boostani, 2006]. Sin embargo, estos algoritmos
no reducen necesariamente el número de bandas requeridas, que es una de las
hipótesis de nuestro experimento, sino que generan una combinación lineal de
las 256 caracterı́sticas, creando un nuevo espacio de caracterı́sticas. Esta es la
razón por la que solamente las técnicas de selección son interesantes en este
trabajo.
Para resumir, tras este paso tenemos seis conjuntos de datos (que representan
el mismo problema de maneras diferentes): genetic, scattered, greedy, Lfs, Cfs
y full (el conjunto original con 256 caracterı́sticas).
A continuación describimos los pasos llevados a cabo para probar cada con-
junto de datos.
Mej. Param.
Clas. Conj. Acierto % loocv % Valid. % Band.
mtry
√
full 95.4 96.1 p 95.6 256
genetic 94.3 96.2 p/2 93.6 11
scattered 93.8 96.9 p/4 95.0 11
Rf
greedy 95.9 97.4 p/2 96.7 5
√
Lfs 94.5 96.8 p 95.2 7
√
Cfs 95.8 96.5 p 96.1 6
C γ
full 96.2 96.6 2 −2
2−10
96.4 256
genetic 96.0 96.8 25 2−10 96.5 11
scattered 95.7 96.9 2 5
2−2 96.5 11
Svm
greedy 96.7 96.9 2 12
2−15 97.0 5
Lfs 96.0 97.7 2 7
2−1 96.9 7
Cfs 97.1 98.0 211
2−5 97.4 6
ser la mejor opción junto con el clasificador Svm. Esta opción es la que mayor
acierto proporciona.
Tal y como se ha comentado en la Sección 5.2.4, el método Pca y semejantes
han sido analizados pero no tenidos en cuenta. Sin embargo, para facilitar la
comparación con trabajos futuros, presentamos ciertos resultados preliminares.
Se ha creado un nuevo conjunto de datos tras aplicar el método Pca (implemen-
tación de Weka) al conjunto full. A continuación se ha realizado una evaluación
loocv, obteniendo un 95.2 % de acierto usando Rf, y aproximadamente un 96 %
usando Svm. Estos resultados están unos 2 puntos por debajo del resto de op-
ciones.
Estudiemos un poco más la mejor opción (conjunto de datos, clasificador).
Las diferentes combinaciones de parámetros obtienen un acierto de validación
similar usando valores altos de C. Finalmente la mejor combinación ha sido
C = 211 y γ = 2−5 . Podemos ver el proceso de validación en la Figura 5.7.
La matriz de confusión de esta opción puede verse en la Tabla 5.2. Recor-
demos que estos resultados se han obtenido usando los conjuntos de test, com-
puestos por el 25 % de las muestras (162 en nuestro caso). Esta es una matriz
de confusión media, teniendo en cuenta las 10 permutaciones.
5.3. RESULTADOS Y DISCUSIÓN 79
```
``Clasificado
``` como Sarna común
``` Sana
Real `
Sarna Común 48.3 3.1
Sana 1.6 109
En la Figura 5.8 presentamos cuatro muestras (dos de cada clase) para en-
tender mejor lo que supone la selección de caracterı́sticas. Las columnas negras
marcan las zonas seleccionadas por el algoritmo de selección de caracterı́sticas
Cfs. Es fácil comprender, por ejemplo, por qué el algoritmo Cfs no selecciona
ninguna banda anterior a la 100ª (1166 nm), ya que en esa zona las muestras
están muy juntas entre sı́.
Figura 5.8: Gráficas de cuatro muestras (dos de cada clase) para mostrar las
bandas seleccionadas en el experimento de detección de sarna común. Las co-
lumnas negras marcan las zonas seleccionadas por el algoritmo de selección de
caracterı́sticas Cfs. El resto de bandas no fueron seleccionadas. El eje x repre-
senta las bandas por longitud de onda. El eje y representa el nivel de gris medio
por banda.
Hemos visto que las bandas seleccionadas por el método Cfs (1300 nm,
1303 nm, 1336 nm, 1339 nm, 1342 nm y 1503 nm) proporcionan suficiente infor-
mación para distinguir entre las zonas sanas y afectadas por sarna. Sin embargo,
con el sistema presentado en el Capı́tulo 4, por construcción no podemos evitar
adquirir imágenes para todas las longitudes de onda en las que es sensible el
sistema.
Sin embargo, este subconjunto óptimo de bandas permite diseñar un sistema
multiespectral especı́fico que trabajarı́a en las 6 longitudes de onda selecciona-
das, y que utilizarı́a el resto de algoritmos seleccionados por el experimento
que presentamos en la Sección 5.2. Un sistema multiespectral ası́ podrı́a es-
tar compuesto por una cámara matricial infrarroja (como la presentada en el
Capı́tulo 4) y tantos filtros especı́ficos como longitudes de onda necesarias. Ası́,
una sesión de adquisición de imagen no precisarı́a de ningún escaneo; simple-
mente tomar una imagen por cada filtro. Tampoco serı́a preciso construcción
del cubo hiperespectral. De modo que los dos principales cuellos de botella del
sistema hiperespectral no serı́an necesarios y el tiempo de ejecución se verı́a
considerablemente reducido.
Ası́, podemos entender el sistema hiperespectral y el experimento realizado
como un sistema experimental, un banco de pruebas, que nos aporta un resulta-
do totalmente válido, pero que precisa de un tiempo de ejecución (por la manera
en la que el sistema adquiere las imágenes) que puede complicar su implantación
directa en la industria con la tecnologı́a actual. Sin embargo, a través del expe-
rimento podemos obtener una información que nos permite diseñar un sistema
multiespectral (es decir, que solamente captura unas determinadas longitudes
de onda óptimas) especı́fico para el problema planteado (la detección de sarna
en patata en este caso). Esta opción es más rápida, por construcción. Cabe des-
tacar que si en el futuro se desarrolla un hardware que permita la adquisición
de cubos hiperespectrales desde una cámara matricial (y no de manera lineal,
como el sistema empleado), podremos obtener un comportamiento similar al
multiespectral propuesto.
En la Figura 5.10 podemos ver un esquema del concepto para la creación
del sistema multiespectral a partir de este experimento. Esta idea es trasladable
a todos los experimentos a realizar con el sistema hiperespectral, como el que
veremos en el Capı́tulo 6, o el resto de iniciativas que utilizan este material, tal
y como vimos en la introducción de esta tesis.
5.5. CONCLUSIONES 83
5.5. Conclusiones
Los resultados presentados en este capı́tulo muestran que es posible detectar
sarna común en patatas utilizando un sistema no destructivo de visión hiperes-
pectral infrarrojo.
Para ello, hemos probado varios algoritmos de selección de caracterı́sticas,
demostrando que es un paso crı́tico que no solamente puede evitar cálculos inne-
cesarios, sino que es nuestro método para incrementar la velocidad de ejecución.
Tras comparar los algoritmos, el Cfs parece ser el que mejor se ha adaptado al
problema. En cualquier caso, la variación entre los conjuntos de datos es menor
a un 2 %.
En cuanto a la clasificación, las Svm han mostrado ser un algoritmo de cla-
sificación adecuado para el problema, sobre todo en conjunción con el conjunto
de datos Cfs, alcanzando un acierto del 97.1 %. El proceso de ajuste de paráme-
tros efectuado ha sido crucial para afinar el clasificador en busca de la mejor
combinación de parámetros (que finalmente ha sido C = 211 y γ = 2−5 ).
En el próximo capı́tulo aplicaremos la detección de sarna como paso previo
en la detección del corazón hueco en patatas.
En el futuro serı́a interesante probar el sistema con otras variedades de pa-
84 CAPÍTULO 5. DETECCIÓN DE SARNA
6.1. Introducción
En el Capı́tulo 4 hemos visto las posibilidades de la visión hiperespectral
aplicadas al control de calidad en la industria agroalimentaria. Posteriormen-
te, en el Capı́tulo 5 veı́amos una aplicación concreta: la detección de sarna
común en patata. En ambos capı́tulos hemos referenciado contribuciones en es-
pectrografı́a convencional [Al-Mallahi et al., 2008, Al-Mallahi et al., 2009, Haase,
2006, Buning-Pfaue, 2003, Kang et al., 2004, Kang et al., 2008] que demostraban
que podı́an estudiarse caracterı́sticas internas en patata, lo cual era trasladable,
85
86 CAPÍTULO 6. DETECCIÓN DE CORAZÓN HUECO
6.1.1. Motivación
El grueso de este trabajo se realiza a finales de 2009 (adquisición de imágenes)
y a lo largo del año 2010, en paralelo a la investigación para la detección de sarna.
Entre los numerosos objetivos del proyecto Visiocal, habı́a uno que desta-
caba sobre los demás: la detección del corazón hueco. Tanto es ası́ que se puede
decir que éste es el principal causante del diseño del sistema de adquisición hi-
perespectral. Actualmente la detección se realiza de forma manual y atendiendo
a criterios basados en la experiencia de que las patatas grandes y deformes están
huecas. En caso de duda el operario comprueba el sonido que produce el golpear
la patata con el puño, en busca de algún indicio de que está hueca. Nuevamente
la subjetividad entra en juego y se necesita un método fiable y no destructivo.
Lamentablemente no se dispone de un porcentaje de acierto del que partir de
manera manual.
El primer enfoque es utilizar un procedimiento similar al de la sarna, utilizan-
do caracterı́sticas espectrales. Las muestras en esta ocasión no serı́an ventanas
de interés seleccionadas por expertos, sino cada una de las patatas del conjunto
de entrenamiento.
Al igual que en el Capı́tulo 5, el proceso de reconocimiento de patrones
ha precisado de decisiones para reducir el espectro de opciones. Al ser ambos
sistemas (detección de sarna y de corazón hueco) similares en cuanto a la me-
todologı́a, vamos a presentar las principales diferencias.
En cuanto a selección de caracterı́sticas y evaluación del clasificador, el ex-
perimento para la detección del corazón hueco utiliza la misma baterı́a de algo-
ritmos que el experimento de la detección de sarna.
88 CAPÍTULO 6. DETECCIÓN DE CORAZÓN HUECO
6.2. Experimento
El experimento usa la misma base de datos de imágenes empleada en la
detección de sarna (como hemos dicho, ambos trabajos se desarrollaron en pa-
ralelo y con amplia retroalimentación). De hecho, esta campaña de captura fue
pensada principalmente para el estudio del corazón hueco. La campaña obtuvo
468 cubos hiperespectrales de 234 patatas de variedad Agria durante el último
cuarto de 2009.
El procedimiento de adquisición se vio necesariamente influenciado por la
búsqueda del corazón hueco. Por ese motivo, tras escanear cada patata (por
dos lados), fue preciso cortar la patata para comprobar la presencia de corazón
hueco. En función del resultado, los cubos hiperespectrales eran etiquetados
como sanos o huecos. Esto permitió desarrollar el experimento de reconocimiento
de patrones que presentaremos en las próximas secciones, del mismo modo que
la selección de zonas afectadas por sarna y sanas mediante ventanas de interés
permitió el experimento del Capı́tulo 5.
La orientación del experimento es similar a la del anterior capı́tulo. Desa-
rrollaremos un procedimiento de reconocimiento de patrones supervisado, en el
que intentaremos reducir el tiempo de ejecución (altamente condicionado por
el motor del escáner de espejos y la creación del cubo hiperespectral) propo-
niendo un nuevo sistema multiespectral centrado en ciertas longitudes de onda
seleccionadas mediante algoritmos de selección de caracterı́sticas.
En la Figura 6.2 podemos ver un esquema del experimento.
6.2. EXPERIMENTO 89
Figura 6.2: Diagrama de fases del experimento de detección del corazón hueco.
6.2.1. Segmentación
El objetivo de este paso es proporcionar facilidades a la fase de extracción
de caracterı́sticas, de modo que un breve preprocesamiento garantice que las
caracterı́sticas extraı́das representen el problema de un modo razonable.
En primer lugar segmentamos los cubos hiperespectrales tal y como se hizo
en el Capı́tulo 5. De este modo separamos las patatas del fondo de la ima-
gen, mediante la aplicación de diversas técnicas de procesamiento de imagen de
binarización y detección de áreas conexas, principalmente.
Además de este método, que denominaremos full en adelante, se han desa-
rrollado otros tres algoritmos de segmentación, que parten del método full.
El primero, que denominamos core, pretende retirar la parte externa de las
patatas, de modo que solamente se tenga en cuenta la parte central. Esto se
obtiene mediante la aplicación de una operación de procesamiento de imagen de
erosión.
El segundo método adicional se denomina border y es lo contrario al anterior.
El objetivo es retirar la parte central de la patata, de modo que solamente
tengamos en cuenta una región similar a un anillo.
Por último desarrollamos un tipo de segmentación basado en retirar las zonas
90 CAPÍTULO 6. DETECCIÓN DE CORAZÓN HUECO
con sarna común de la patata, que denominamos scab. Este es el paso en que
la investigación para la detección de sarna común y la investigación para la
detección del corazón hueco se unen. Vamos a usar el sistema de detección
de sarna, que da como resultado el mapeo de las zonas afectadas por sarna,
para segmentar el conjunto de cubos hiperespectrales excluyendo las zonas de
sarna. Nos basamos en la hipótesis de que la sarna común y el corazón hueco
son enfermedades independientes, por lo que en principio es de suponer que
si retiramos la sarna de los cubos hiperespectrales, será más sencillo clasificar
entre corazón hueco y patatas sanas. Los pı́xeles afectados por sarna común se
ocultan (se ponen con luminosidad cero, como el background), de modo que en
la fase de extracción de caracterı́sticas no se tienen en cuenta. Ası́ se pretende
que el conjunto de entrenamiento no esté afectado por sarna.
La utilización de esta segmentación es principalmente el motivo por el que
hemos presentado el sistema para la detección de sarna (Capı́tulo 5) con ante-
rioridad al capı́tulo actual.
En la Figura 6.3 podemos ver los pasos que explican los cuatro tipos de
segmentación desarrollados.
convencional (del mismo modo que habrı́a sido imposible utilizar caracterı́sticas
espectrales en un sistema de visión artificial convencional).
La caracterı́stica area 6.2 denota el espacio que ocupa la patata en la ima-
gen. Todas las patatas se han obtenido desde la misma distancia por lo que
podemos tomar esta caracterı́stica como un indicador del tamaño o volumen
de la muestra. Al disponer de una imagen segmentada (full) esta operación se
limita a sumar los pı́xeles que no son fondo (distintos de negro) en la imagen.
El área se calcula en una sola longitud de onda I, que se ha escogido tras varias
92 CAPÍTULO 6. DETECCIÓN DE CORAZÓN HUECO
ejecuciones.
w,h
(
X 1, if (Ii,j 6= 0);
area = (6.2)
i=0,j=0
0, otherwise.
w,h
(
X 1, if [(Ii,j = 1) ∧ (∃ pixel = 0 around Ii,j )];
perimetro = (6.3)
i=0,j=0
0, otherwise.
Figura 6.4: Gráfica de niveles de gris por banda de una muestra en el experi-
mento de detección del corazón hueco.
6.3. Resultados
Hemos representado el problema mediante cuatro tipos de segmentación, pa-
ra posteriormente crear seis conjuntos de datos por cada uno según un método
de selección de caracterı́sticas. Después hemos evaluado estos 24 conjuntos de
96 CAPÍTULO 6. DETECCIÓN DE CORAZÓN HUECO
Mej. Param.
Clas. Conj. Acierto % loocv % Valid. % Band.
mtry
full 85.56 87.82 p/2 87.18 259
genetic 86.50 85.04 p/2 87.78 16
scattered 85.81 85.47 p0 86.76 12
Rf
greedy 86.07 81.62 p/2 87.27 17
Lfs 86.50 87.82 p0 87.78 7
Cfs 87.69 89.32 p0 87.86 9
average 86.35 86.68
C γ
full 86.07 88.68 28 2−16
88.80 259
genetic 87.01 88.68 21 2−7 89.49 16
Svm scattered 87.09 88.46 2−1 2−6 88.89 12
Rbf greedy 87.09 88.89 21 2−7 89.49 17
Lfs 85.73 86.75 29 2−12 88.46 7
Cfs 87.78 88.68 20 2 88.12 9
average 86.79 88.35
C
full 86.41 88.46 2−5 88.89 259
genetic 86.75 87.82 2−5 89.06 16
Svm scattered 86.50 88.03 2−3 88.63 12
Lin greedy 86.92 87.82 2−5 89.06 17
Lfs 85.73 87.61 21 88.29 7
Cfs 87.52 88.46 2−3 87.61 9
average 86.64 88.03
r
full 85.90 88.03 1 88.29 259
genetic 86.84 88.03 1 88.80 16
scattered 86.24 87.61 1 88.72 12
Lr
greedy 86.75 87.82 1 88.89 17
Lfs 85.90 87.18 1 88.63 7
Cfs 87.69 88.46 1 87.35 9
average 86.55 87.86
Mej. Param.
Clas. Conj. Acierto % loocv % Valid. % Band.
mtry
full 86.18 88.25 p/2 87.44 259
genetic 87.01 86.32 p/2 88.03 18
scattered 88.46 85.47 p/4 88.46 17
Rf
greedy 86.58 85.90 p/4 87.44 17
√
Lfs 86.58 88.25 p 87.09 11
Cfs 87.01 87.39 p/2 87.27 8
average 86.97 86.93
C γ
full 86.41 88.46 210 2−16
89.06 259
genetic 87.27 88.46 22 2−8 89.49 18
Svm scattered 87.44 88.25 210 2−11 88.46 17
Rbf greedy 86.07 88.46 210 2−13 88.97 17
Lfs 85.81 87.39 212 2−12 87.86 11
Cfs 87.52 88.25 27 2−10 87.86 8
average 86.75 88.21
C
full 86.50 88.03 2−2 88.80 259
genetic 86.84 88.03 2−5 88.89 18
Svm scattered 87.44 88.46 2−3 87.95 17
Lin greedy 85.56 88.25 21 88.80 17
Lfs 85.98 87.61 20 87.78 11
Cfs 87.86 88.03 2−2 87.69 8
average 86.70 88.07
r
full 86.75 88.03 1 88.38 259
genetic 86.58 87.82 1 88.80 18
scattered 87.27 87.82 1 87.86 17
Lr
greedy 86.41 88.03 1 88.63 17
Lfs 86.15 87.39 1 87.78 11
Cfs 87.01 88.03 1−9 87.01 8
average 86.70 87.86
Mej. Param.
Clas. Conj. Acierto % loocv % Valid. % Band.
mtry
full 87.44 87.18 p/4 86.50 259
genetic 87.69 86.32 p/4 86.92 14
scattered 86.41 84.62 p/2 86.92 17
Rf
greedy 86.84 84.19 p/2 84.87 19
√
Lfs 86.32 87.82 p 88.89 10
Cfs 83.33 87.82 p0 82.74 10
average 86.34 86.32
C γ
full 86.84 87.18 27 2−13
86.84 259
genetic 88.89 88.25 20 2−8 87.86 14
Svm scattered 86.92 88.03 22 2−7 89.15 17
Rbf greedy 88.12 87.40 28 2−12 87.01 19
Lfs 88.29 88.25 27 2−16 88.55 10
Cfs 87.78 88.25 27 2−16 89.06 10
average 87.81 87.89
C
full 86.84 88.03 2−4 86.58 259
genetic 89.06 88.03 2−5 87.69 14
Svm scattered 86.84 87.61 2−5 88.97 17
Lin greedy 88.38 87.82 2−5 86.50 19
Lfs 87.52 88.03 20 88.21 10
Cfs 88.21 88.46 2−4 88.89 10
average 87.81 88.00
r
full 87.27 87.61 1 86.84 259
genetic 88.72 87.18 0.1 88.12 14
scattered 86.50 88.03 1 88.89 17
Lr
greedy 88.89 87.39 1 86.32 19
Lfs 87.44 88.03 1 88.46 10
Cfs 87.18 88.03 1 86.24 10
average 87.66 87.71
Mej. Param.
Clas. Conj. Acierto % loocv % Valid. % Band.
mtry
full 86.07 88.68 p/2 87.01 259
genetic 85.90 85.68 p/4 86.50 16
scattered 86.24 86.75 p/2 87.27 18
Rf
greedy 88.55 84.19 p/2 87.35 21
√
Lfs 87.61 87.39 p 87.69 11
Cfs 86.50 87.82 p/2 87.95 10
average 86.81 86.75
C γ
full 86.84 87.61 27 2−16
88.72 259
genetic 86.41 87.82 2−1 2−6 87.78 16
Svm scattered 85.98 88.03 22 2−8 88.12 18
Rbf greedy 86.07 87.61 26 2−16 87.44 21
Lfs 86.15 87.61 20 2−4 87.78 11
Cfs 84.96 87.82 22 2−2 88.29 10
average 86.07 87.75
C
full 85.98 87.61 2−5 87.44 259
genetic 86.07 87.18 2−5 87.35 16
Svm scattered 86.50 86.54 2−5 87.61 18
Lin greedy 86.75 86.97 20 86.84 21
Lfs 86.32 87.61 2−5 87.61 11
Cfs 86.32 85.90 2−2 87.44 10
average 86.32 86.97
r
full 87.44 88.03 0.01 87.44 259
genetic 85.73 86.75 0.01 87.01 16
scattered 86.50 87.39 0.01 87.35 18
Lr
greedy 86.75 86.97 0.001 86.67 21
Lfs 85.64 86.32 1 87.18 11
Cfs 85.73 85.90 1 87.01 10
average 86.30 86.89
Figura 6.5: Gráfica que representa el porcentaje de acierto en función del método
de segmentación y del método de selección de caracterı́sticas en el experimento
de detección de corazón hueco en patata. La lı́nea indica el acierto medio por
método de segmentación.
Figura 6.6: Gráfica que representa el porcentaje de acierto en función del método
de selección de caracterı́sticas en el experimento de detección de corazón hueco
en patata.
Figura 6.7: Gráfica que representa el porcentaje de acierto en función del al-
goritmo de clasificación en el experimento de detección de corazón hueco en
patata.
6.4. Conclusiones
La visión hiperespectral infrarroja ha resultado ser una tecnologı́a intere-
sante para la detección del corazón hueco en patatas de variedad Agria. Para
demostrarlo, se ha desarrollado un experimento no destructivo de reconocimien-
to de patrones que alcanza un 89.1 % de acierto. Este porcentaje es válido para
la industria ya que, a pesar de existir otros métodos, el operador humano sigue
siendo el único utilizado hasta ahora.
El método de segmentación border parece ser ligeramente mejor que los
métodos core o full, probablemente por el ángulo en el que la luz incide en la
6.4. CONCLUSIONES 107
Conclusiones
7.1. Conclusiones
En esta sección presentamos un sumario de las principales conclusiones del
trabajo de tesis, una vez vistos los capı́tulos técnicos de la misma.
109
110 CAPÍTULO 7. CONCLUSIONES
más importantes de entre las propuestas. Ası́ mismo, se concluyó que el uso
de estas 8 caracterı́sticas mejoraba el comportamiento del clasificador 1-nn,
pasando de 86.26 % a un 87.40 % de acierto.
7.2. Contribuciones
En esta sección se pretende aclarar cuáles son las principales contribuciones
de este trabajo de tesis, de modo que sea más sencillo comprender en qué aspec-
tos este trabajo ha supuesto una novedad en los sistemas de control de calidad
no destructivos usando visión hiperespectral infrarroja en el mundo agroalimen-
tario y más concretamente aplicado al caso de la patata.
7.2. CONTRIBUCIONES 111
A nivel general, con esta tesis se han introducido las siguientes contribucio-
nes:
7.4. Proyectos
Además, a nivel del sistema hiperespectral, están abiertas las siguientes ini-
ciativas:
CARNEVIP–SEGALI
A pesar de no resultar respaldado con financiación, el proyecto continúa
siendo una idea a tener en cuenta para el futuro.
ANHIMIGA
Se ha solicitado financiación para este proyecto al Ministerio de Innovación
en 2011, por lo que, en caso de ser concedida, se continuará con la lı́nea de
investigación hiperespectral en colaboración con el grupo de Palinologı́a de la
Universidade de Vigo. El proyecto servirı́a para poner en marcha una lı́nea
hiperespectral mixta en el espectro visible y Nir que amplı́e las capacidades del
sistema creado hasta el momento.
Capı́tulo 8
Publicaciones relacionadas
115
116 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
Autores
Angel Dacal-Nieto Lomg y Universidade de Vigo
Esteban Vazquez-Fernandez Lomg
Arno Formella Universidade de Vigo
Fernando Martı́n Universidade de Vigo
Soledad Torres-Guijarro Lomg
Higinio Gonzalez-Jorge Lomg
Criterios de calidad
Proceedings Industrial Electronics, Annual Conferences of Ieee
Editorial Ieee
SJR If = 0.031 (2009)
Q3 ’Engineering - Electrical and Electronic Engineering’
(266/381)
I.INTRODUCTION
Computer vision has become an essential technology for
quality control in the food industry, which continuously
demands new and better applications. There are many
examples of this synergy in potato industry [1-3]. Complex
commercial systems have also been developed with great
success, which shows computer vision in potato quality
control as a mature technology. However, there are still
challenges to be solved.
Artificial Intelligence (AI) techniques are among the most Fig. 1. Diagram of system overview.
used in computer vision [4-5]. However, Genetic Algorithms
(GA's) [6-7] have been less used in this field in comparison
II.IMAGE ACQUISITION AND EXPERT CLASSIFICATION
with other AI technologies. Previous work show that GA
have been tested as part of the classifier itself, for calculating A. Image acquisition
the weights of an Artificial Neural Network [8]. Sometimes A set of 47 bags of potatoes (with 20Kg. of potatoes each
they are used for object segmentation purposes [9], although one) were randomly selected from two potato packing
recent work suggest many other applications. companies in Xinzo de Limia (Spain), on 2008 harvest. The
Some contributions show that GA's can be used for feature bags had samples from the more important varieties in the
selection [10-11], providing those features that maximize the region (Agria, Kennebec and red varieties), and contained
performance of the selected classifier. Some of the features healthy and unhealthy potatoes. It is usual that companies
could be spurious or even noise. A good feature selector is a from this region do not wash the potatoes before the packing
basic aid when building a robust classifier, because it can process, so all the inspections had to be done in the presence
reveal us unknown relationships between classes and features. of dust and sand. Real operation conditions in a potato
In this paper, we present a computer vision based quality packing company were recreated by making a small roller
control system to detect defects and diseases on not washed line that moved at 0.1m/s. The prototype is shown in Figure
potatoes. It uses a GA as a tool to reduce the number of 2.
features of the classifier.
A Jai BB-500GE 5Mp color camera was used for the image III. SEGMENTATION AND FEATURE EXTRACTION
taking process. A total of 5.040 pictures with 2456x2048 tiff A. Segmentation
resolution were taken from the 47 bags, covering a region of The OpenCV libraries [12] have been used in the
50x40 cm. For the illumination, two 500W halogen lamps implementation, in combination with C++ programming
have been used. The system took a picture every 500ms, so language.
that every potato was present in 8-9 pictures. The idea was to The segmentation process to separate potatoes from the
capture the potatoes from different points of view, as they roll background has been divided into three sub processes: first
on the line. A matrix camera was chosen instead of a linear we detect the interest areas, then we identify those areas as
camera because otherwise it would have been impossible to objects, and finally we prevent segmenting groups of
reconstruct the images while the potatoes are rolling. touching potatoes into a single object.
B. Expert Classification
Experts from the 'Centro Tecnolóxico da Carne (CTC)'
selected a representative set of pictures from the original set.
This selection contained n=305 pictures (Figure 3). A
learning set was built by the selection of p=1206 potatoes.
Nine classes were identified depending on their diseases and
the unhealthy percentage of potato. For this work three
classes were taken into account: good (with no problem at
all), with rotten areas (up to 10%), and with green areas (up to
25%).
Fig. 4. Area detection steps: (a) B-S image, (b) B'-R image, (c) G-R
Fig. 3. One of the n pictures from where potatoes were extracted for the image, (d) final result.
learning set.
When all the rotations are tested, the best cut is used to
divide the image vertically. Two sub-images are then created.
Their bounding boxes are adjusted to the new content, and the
algorithm is performed again to ensure there is only one
potato in them. This algorithm is recursively executed until
all the images have no good “cuts” (Figure 6).
B. Feature extraction
The proposed method is not intended to directly detect
every class (i.e. worm dots), but to extract several general
purpose features and let the classifier infer the relationships
between features and classes. These features have been
selected from texture analysis proposed in [15], and are listed
Fig. 5. Touching potatoes detection (images and projections): (a) original in Table I (Eq. 1-10).
object, (b) 48º rotation with 109 occurrences valley, (c) 60º rotation with 78
occurrences valley, (d) optimal cut found at 60º.
In our case we define these operations as follows: - crossover: the crossover operator chosen was the One-Point
crossover, where parents’ chromosomes are cut in a randomly
– chromosome: it is a binary array with f 0's and 1's. We selected point and the pieces we get are swapped creating the
define a relation between the ith position of the chromosome children's chromosomes.
and the ith feature of the potatoes. A 1 (activation) at the ith After the crossover, the non-crossed chromosomes are
position of a chromosome means the ith feature is taken into substituted by the just generated ones, which are the children
account when calculating the distance in the classification of the crossed chromosomes. The consequence of this
process. A 0 (no activation) at the ith position of a rearrangement is that the new population has pop/4 families
chromosome means, actually, that we remove the ith (composed by 2 parents and 2 children). This maintains good
dimension from the feature space. The consequence of this fitness (the parents), and possible combinations of good
definition is that each chromosome represents a new feature fitness (the children). The evolution of the population is
space where the points (potatoes) get classified in a different guaranteed by the randomness of the crossover operation and
way. by the possible mutations.
– fitness: to evaluate how good a chromosome c is, we just - mutation: some chromosomes of each generation can get
have to evaluate the combination of features that c represents. mutated depending on a defined mutation probability mut =
This measure is the degree of classification of the potatoes, 0,003. When a chromosome is mutated, one of its f genes
taking into account the distance function that we are using swaps (from 0 to 1 or from 1 to 0).
(Euclidean) and the number of zeros in the chromosome (this
will reduce the number of selected features as the generations - generations: gen has been set to 500, as recommended by
follow one another). The fitness function is defined in Table [10].
II (Equations 11-14).
TABLE II The expected behavior from the GA is that the best
FITNESS FUNCTIONS chromosomes (those which have a better phenotype) will
fitness(chromosome c) =
transmit parts of their genetic code to the next generations,
p creating new chromosomes that may improve the fitness of
∑
1 their ancestors, which means that better combinations of
( correct _ classification( potatoes i , c))·( # zeros in c ) (11)
p features will be found. The GA stops when a certain number
i =1
of generations are created. Its result is the better chromosome
correct_classification(potato k, chromosome c) = found in the totality of generations.
1: if ( 1nn(k, c).class == k.class)
(12) V. RESULTS AND FUTURE LINES
0: otherwise
A. Results
1nn (potato k, chromosome c) = Several executions of the GA have been performed,
potatoesj | (potatoesj ≠ k) ^ showing not only good chromosomes selections, but also
(potatoesj has the minimum (13) global evolutions of the created populations (Figure 7).
distance to k in the feature
space defined by c)
Analizing the best chromosomes from all the executions, projections. Then, features have been extracted from HSV
some results have been found: and RGB channels from every segmented potato, using
- Features extracted from channels H and S were the most histogram and co-occurrence matrix texture characteristics,
selected ones in almost all the experiments. creating a learning set. A classifier has been developed by
- Homogeneity and dissimilarity were the two most using 1-NN algorithm. This classifier has been optimized
selected features, taking into account all the channels. with an ad-hoc GA that selects the most discriminant features
- Almost all 1st order features (mean, variance and subset. With this optimization, the dimensional complexity of
asymmetry) were unselected, except kurtosis. the classifier has been decreased so that it will be possible to
Using this information, an optimized classifier has been build a faster final application, because useless calculations
created. The difference with the previous one is it only takes have been removed.
into account the features selected by GA's executions
ACKNOWLEDGMENTS
(contrast, dissimilarity, homogeneity and energy from
channels H and S). Its performance with 8 features (Table IV) This work was partially supported by “Xunta de Galicia”
improves the previous 60 features classifier performance (project code 08TIC004CT and HR programs “Lucas
(Table III). Labrada” and “Parga Pondal”). We want to acknowledge
TABLE III researchers from “CTC” for their helpful collaboration.
60 FEATURES CLASSIFIER CONFUSION MATRIX
REFERENCES
Classified as →
[1] L. Zhou, V. Chalana and Y. Kim, “PC-Based Machine Vision System
Good Rotten Green
Actually ↓ for Real-Time Computer-Aided Potato Inspection,” International
Journal of Imaging Systems and Technology, 9 (1998) 423-433.
Good 83,30% 5,20% 11,50% [2] M. Lefebvre, S. Gil, D. Brunet, E. Natonek, C. Baur, P. Gugerli and T.
Pun, “Computer vision and agricultural robotics for disease control:
Rotten 7,90% 88,50% 3,60% The Potato Operation,” Computers and Electronics in Agriculture, 9
(1993) 85-102.
Green 4,20% 11,10% 84,70%
[3] A.Y. Muir, D.W. Ross, C.J. Dewar, and D. Kennedy, Defect and
disease detection in potato tubers, Scottish Agricultural College Crop
Science Research Report, (1999) pp 5-9.
TABLE IV
[4] C. Du, D. Sun, “Learning techniques used in computer vision for food
8 SELECTED FEATURES CLASSIFIER CONFUSION MATRIX
quality evaluation: a review,” Journal of Food Engineering, 72 (2006)
Classified as → 39-55.
Good Rotten Green [5] F. Goyache, A. Bahamonde, J. Alonso, S. Lopez, J.J. Del Coz, J.R.
Actually ↓ Quevedo, J. Ranilla, O. Luaces, I. Alvarez, L.J. Royo and J. Diez, “The
usefulness of artificial intelligence techniques to assess subjective
Good 86,00% 5,10% 8,90% quality of products in the food industry,” Food Science and
Technology, 12 (2001) 370-381.
Rotten 7,10% 88,70% 4,20% [6] J. H. Holland, Adaptation in Natural and Artifical Systems, University
Green 4,90% 8,90% 86,20% of Michigan Press.
[7] D. Goldberg, Genetic Algorithms in Search, Optimization and Machine
Learning, Reading, MA.: Addison-Wesley.
B. Future lines [8] D. Guyer, X. Yang, “Use of genetic artificial neural networks and
By the moment we have used general purpose features spectral imaging for defect detection on cherries,” Computers and
Electronics in Agriculture, 29 (2000) 179-194.
instead of ad-hoc features. We will implement at least one [9] Minglun Gong, Yee-Hong Yang, “Quadtree-based genetic algorithm
new feature by class trying to detect particularities that define and its applications to computer vision,” Pattern Recognition, 37
why a potato belongs to one class and not to the others. When (2004) 1723-1733.
[10] Y. Chtioui, D. Bertrand, and D. Barba, “Feature selection by a genetic
adding these new features to the system we are changing algorithm. Application to seed discrimination by artifical vision,” J Sci
chromosomes, and adding new genes. We will study how to Food Agric, 1998, 76, 77-86.
suggest the system that these new features are truly important [11] J. Gómez-Sanchís, L. Gómez-Chova, N. Aleixos, G. Camps-Valls, C.
Montesinos-Herrero, E. Moltó and J. Blasco, “Hyperspectral system for
(for example initializing these new genes to 1). early detection of rottenness caused by Penicillium digitatum in
Other dimensional reduction and feature selection mandarins,” Journal of Food Engineering, 89 (2008) 80-86.
techniques like PCA (Principal Component Analysis) or GCS [12] G. R. Bradski and A. Kaehler, Learning OpenCV, Computer Vision
with the OpenCV library, (2008) O'Reilly.
(Growing Cell Structures) [17] will be tested to assess if the [13] John C. Russ, The Image Processing Handbook, Fifth Edition (2007)
results given by the GA can be improved. In addition, other CRC-Press.
classification methods like Random Forest or Artificial [14] F. Martín, “Analysis Tools for Gray Level Histograms”. Proceedings of
SPPRA-2003. June 2003.
Neural Networks will be studied. [15] M. Graves and B. Batchelor, Machine Vision for the Inspection of
Natural Products, (2004) Springer.
VI. CONCLUSIONS [16] A. K. Jain, R. P W. Duin and J, Mao, “Statistical Pattern Recognition: A
Review,” IEEE Transactions on Pattern Analysis and Machine
Intelligence, 22 (2000).
This work is the first step towards a potatoes quality [17] F. Diaz, F. Fdez-Riverola, D. Glez-Pena and J.M. Corchado, “Applying
control system based on computer vision. Potato GCS network to fuzzy discretized microarray data for tumour
diagnosis,” 7th International Conference IDEAL 2006. Proceedings
segmentation has been performed by image processing (Lecture Notes in Computer Science), 4224 (2006) 1095-102.
techniques, specially taking into account color and
Tabla Resumen
Tı́tulo A genetic algorithm approach for feature selection in
potatoes classification by computer vision.
Datos Iecon 2009. Industrial Electronics, 2009. Iecon’09.
35th Annual Conference of Ieee.
Calidad 0.031 Sjr (Q3)
Papel del autor Fundamental.
Motivación Detecta enfermedades requeridas en los objetivos del
proyecto Visiocal.
Resultados Se consigue un 87.4 % de acierto utilizando el cla-
sificador 1-nn, utilizando las caracterı́sticas de con-
traste, disimilaridad, homogeneidad y energı́a de los
canales H y S (espacio Hsv).
Conclusiones Se mejora el acierto con la selección de caracterı́sti-
cas.
Trabajo futuro Nuevas caracterı́sticas. Nuevos métodos de selección
de caracterı́sticas.
124 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
Autores (modificar)
Angel Dacal-Nieto Universidade de Vigo
Arno Formella Universidade de Vigo
Pilar Carrión Universidade de Vigo
Esteban Vazquez-Fernandez Gradiant
Manuel Fernández-Delgado Universidade de Santiago de
Compostela (Usc)
angeldacal@uvigo.es
2
GRADIANT, Galician R&D Center in Advanced Telecommunications, Spain
3
CITIUS, Universidade de Santiago de Compostela, Spain
general purpose infrared hyperspectral system. Then, hyper- Fig. 2. Left: scanning initial position. Right: scanning final
spectral cubes will be built from the frequency images. Image position. The arrow shows the direction of scanning. Hyper-
processing algorithms are executed both for segmentation and spectral system scheme: a) camera, b) spectrograph, c) mirror
for feature extraction purposes as described in the sequel. Af- scanner, d) object, e) diffuse chamber, f) halogen lamp.
terwards, feature selection algorithms are executed, obtaining
datasets that represent the same data using different combi-
nations of features. These datasets are then tested with some
classification algorithms in order to classify the objects into
the proposed classes. A result is obtained, as well as enough
information to design a specific multi-spectral system.
old. Then, a Gaussian blurring clusters the noise in the im- we use feature selection to identify which wavelengths are
age. A connected-component labelling is performed to re- sufficient to solve each problem in order to design a specific
mark contiguous areas in the image. At this point, we know multi-spectral system with this information.
that the blob with the largest area (excluding the background) We have tested some techniques regarding spectral bands
is the object of interest. We select this blob and create the selection on hyperspectral imaging systems (implemented
mask to segment all the images in the hyperspectral cube on Weka [9]): Genetic Search [10], Scattered Search [11],
(full). Other segmentation algorithms have been implemented Greedy Stepwise, Linear Forward Selection (LFS) [12], and
to capture zones where the incidence of light is different, tak- Correlation-based Feature Subset Selection (CFS) [13]. Other
ing into account central (core) and external (border) portions. techniques such as PCA and LDA do not reduce the number
The Figure 4 visualizes examples of these processes. of wavelengths needed, as required, rather they generate a lin-
ear combination of the 256 features into a new feature space
composed of less dimension.
2.6. Classification
5. REFERENCES
Table 1. Accuracy percentages for the tested problems.
Problem Acc. % Segm. Classif. Bands [1] A. F. H. Goetz et al., “Imaging spectrometry for earth
scab 97.1 ROI SVM 6 remote sensing,” Science, vol. 228, pp. 1147-1153, 1985.
hollow heart 89.1 border SVM 11
honey 99 full SVM tests [2] C. Yang et al., “Machine vision system for online inspec-
egg sex < 60 full many tests tion of freshly slaughtered chickens,” Sens. & Instrumen.
egg fecund. 100 full many tests Food Qual., vol. 3, pp. 70-80, 2009.
[3] A. A. Gowen et al., “Hyperspectral imaging for the in-
vestigation of quality deterioration in sliced mushrooms
(Agaricus bisporus) during storage,” Sens. & Instrumen.
Support Vector Machines (C = 211 , γ = 2−5 ) and a specific Food Qual., vol. 2, pp. 133-143, 2008.
subset of spectral features selected by the CFS algorithm.
The hollow heart is an internal disorder of the potato [4] D. Ariana and R. Lu, “Quality evaluation of pickling cu-
tubers, that causes a star–shaped cavity that grows into the cumbers using hyperspectral reflectance and transmittance
potato. Acoustics and X–Ray examination have tried to detect imaging,” Sens. & Instrumen. Food Qual., vol. 2, pp. 144-
the hollow heart in the last years, but none of the approaches 160, 2008.
provide a non–destructive, orientation–independent and size– [5] J. Gomez-Sanchı́s et al., “Hyperspectral system for early
independent solution. Our system has found that using the detection of rottenness caused by Penicillium digitatum in
border segmentation method and the SVM-LIN classification mandarins,” J. Food Eng., vol. 89, pp. 80-86, 2008.
algorithm (C = 2−5 ), we get a 89.1% of accuracy detect-
ing the hollow heart. This option uses a specific subset of [6] D. Sun, “Hyperspectral Imaging for Food Quality Analy-
spectral features selected by the genetic algorithm feature se- sis and Control”. San Diego, CA: Elsevier, 2009.
lection method, as well as three morphological features that [7] G. Bradski and A. Kaehler, “Learning OpenCV: Com-
represent size and roundness of the samples. puter Vision with the OpenCV Library”. O’Reilly, 2008.
The characterization of different types of honey, on the
basis of their botanical origin, is an interesting tool for the [8] N. Otsu, “A threshold selection method for gray level his-
food industry. A preliminary stage of the analysis has been tograms,” IEEE Trans. Syst. Man Cybern., vol. 9, pp. 62-6,
performed, getting accuracies next to 99% (SVM-RBF, C = 1979.
27 , γ = 2−12 ) that should be confirmed in the future. [9] M. Hall et al., “The WEKA Data Mining Software: An
Our system was also tested with the aim to classify hen Update,” SIGKDD Explorations. vol. 11(1), 2009.
eggs, while they are being incubated, according to their sex.
In the past, some methods have been used for this purpose, but [10] D.E. Goldberg, “Genetic Algorithms in Search, Opti-
none got remarkable non–destructive results. Unfortunately, mization and Machine Learning” Reading, MA: Addison-
no more than a 60% of accuracy was achieved. Wesley, 1989.
After the in-ovo sex study, a fecundity determination was [11] F. Garcı́a-López et al., “Solving feature subset selection
tested, getting a 100% of accuracy. Although this problem can problem by a Parallel Scatter Search,” Eur. J. Oper. Res.,
be solved using faster and simpler methods, the application of vol. 169(2), pp. 477-489, 2008.
our hyperspectral system shows it is a reliable technology that
may be applied to multiple sets of problems. [12] M. Guetlein et al., “Large Scale Attribute Selection Us-
ing Wrappers,” Proc IEEE Symp. on Comput. Intell. and
Data Mining, pp. 332-339, 2009.
4. CONCLUSIONS [13] M. Hall, “Correlation-based Feature Subset Selection
for Machine Learning,”. Hamilton, New Zealand, 1998.
We presented a multiple purpose benchmarking hyperspectral [14] L. Breiman, “Using Iterated Bagging to Debias Regres-
framework for the designing of specific multi-spectral sys- sions,” Mach. Learn., vol. 45, pp. 261-277, 2001.
tems, that has been tested in some food quality problems. The
specific systems are faster than the equivalent ones in the hy- [15] C.C. Chang and C.J. Lin “LIBSVM:a library for
perspectral approach, because less wavelengths are inspected, support vector machines,” http://www.csie.ntu.
after using feature selection algorithms. Pattern recognition edu.tw/˜cjlin/libsvm/, 2008.
experiments have been performed for deciding which other
[16] S. Le Cessie and J.C. Van Houwelingen, “Ridge Estima-
algorithms are required to solve the given problem. Moreover,
tors in Logistic Regression,” Appl. Stat., vol. 41, 191-201,
NIR hyperspectral imaging has shown to be an interesting ob-
1992.
jective non–destructive choice for food quality assessment.
8.2. SISTEMA HIPERESPECTRAL GENÉRICO 129
Tabla Resumen
Tı́tulo Rapid infrared multi-spectral systems design using a
hyperspectral benchmarking framework.
Datos Icme 2011. Industrial Electronics, 2011. Annual
Conferences of Ieee.
Calidad Core B
Papel del autor Fundamental.
Motivación Exponer los avances acerca del sistema hiperespec-
tral aplicados tanto a los problemas de patatas como
al resto de problemas abordados.
Resultados Diversos porcentajes en el análisis de sarna común
en patatas, corazón hueco en patatas, determinación
de origen floral de miel, detección de sexo in–ovo en
gallina y detección de fecundidad in–ovo en gallina.
Trabajo futuro Ampliación del sistema al rango visible.
130 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
Autores
Angel Dacal-Nieto Universidade de Vigo
Arno Formella Universidade de Vigo
Pilar Carrión Universidade de Vigo
Esteban Vazquez-Fernandez Gradiant
Manuel Fernández-Delgado Universidade de Santiago de Compos-
tela
Criterios de calidad
Congreso 14th International Conference on Computer Analysis
of Images and Patterns (Caip 2011)
Core B
’Artificial Intelligence and Image Processing’
Revista Lecture Notes in Computer Science (Lncs)
Editorial Springer Verlag.
SJR If = 0.033 (2009)
Q3 ’Computer Science, miscellaneous’ (66/108)
Q3 ’Hardware and Architecture’ (81/118)
Q4 ’Mathematics - Theoretical Computer Science’
(67/74)
8.3. VISIÓN HIPERESPECTRAL: CORAZÓN HUECO EN PATATAS 131
1 Introduction
Potatoes (Solanum tuberosum) are nowadays one of the most consumed products
in the world: they are the world’s fourth largest food crop. The annual production
is 325 million tons and it moves an amount of global transactions of about 6
billion US dollars (2007 data). Thus, the world potato average consumption is
31 Kg per capita and year [1].
One of the internal characteristics of the potato tubers is the called hollow
heart, a star–shaped cavity that grows into the potato. Some early studies point
that there exist a relation between growing disorders and probability of the
presence of a hollow heart [2]. Some contributions in the last years have tried
to detect hollow hearts in potatoes using X–Ray examination [3] and acoustics
[4,5], providing successful results (98%). However, [4] needs the potatoes to be
isolated from noise and it can not detect tiny hollow hearts, meanwhile in [5] the
potatoes are dropped to study the sound produced by the fall, which eventually
bruises the samples. Moreover, both approaches are strongly dependent on the
orientation of the potato. Despite these contributions, the main packaging com-
panies in the North of Spain still use a human operator to deal with the problem,
132 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
3 Experiment
The objective of the experiment is to compare different algorithms for each
Pattern Recognition stage in order to compose the combination of methods that
maximizes the accuracy classifying hollow heart affected and healthy potatoes.
8.3. VISIÓN HIPERESPECTRAL: CORAZÓN HUECO EN PATATAS 133
Fig. 1. Left: scanning initial position at 70◦ . Right: scanning final position at 110◦ .
The arrow shows the direction of scanning. Hyperspectral system scheme: a) camera,
b) spectrograph, c) mirror scanner, d) object, e) diffuse chamber, f) halogen lamp.
Fig. 2. Up: Three spectral images taken from different lines of the object. Down:
978 nm, 1173 nm, and 1608 nm spatial images.
The experiment uses 234 potato tubers (variety Agria) from Xinzo de Limia
(Spain), that have been collected from some potato packing companies during
2009. The potatoes have been captured from two sides, using the system de-
scribed in Section 2, and cut later to check the presence of hollow heart. They
have been placed in a stable position, so that the biggest area is acquired.
3.1 Segmentation
Segmentation runs in several steps to obtain a mask to remove the background
for the hyperspectral cube using the open source library OpenCV [10]. First,
we binarize the image using Otsu’s method [11], that calculates the optimum
binarization threshold. Then, a Gaussian blurring clusters the noise in the image.
Another binarization is needed for the next operation. A connected-component
labelling is performed to remark contiguous areas in the image. At this point,
we know that the blob with the largest area (excluding the background) is the
potato. We select this blob and create the mask used to segment all the images
in the hyperspectral cube. We call this segmentation method full.
134 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
We calculated the average luminance value of the pixels belonging to the potato
for each image in the hyperspectral cubes (i.e. for each of the 256 wavelengths).
Depending on the segmentation method, we use the whole potato for this calcu-
lation (full mask), or different zones of the tuber (core, border and scab masks).
Additionally, we included three morphological features in the feature list, namely
8.3. VISIÓN HIPERESPECTRAL: CORAZÓN HUECO EN PATATAS 135
the area, perimeter and roundness of the potato. Our objective is to test
whether the potato size and roundness are relevant for the hollow heart de-
tection. Hence, every hyperspectral cube is represented with 259 attributes (256
spectral and 3 morphological features). We used 468 samples (208 hollow heart
affected and 260 healthy potatoes).
This stage identifies which wavelengths are the optimal to detect hollow heart
potatoes, in order to decrease the number of images to analyse. We used some
algorithms implemented in Weka [13], using their default parameters: Genetic
Search [14], Scattered Search [15], Greedy Stepwise [16], Linear Forward Selec-
tion (LFS ) [17], and Correlation-based Feature Subset Selection (CFS ) [18]. We
also included the data set with all the features (full ). We have discarded tech-
niques such as Principal Component Analysis and Linear Discriminant Analysis,
because they perform a linear combination of all the wavelengths, instead of se-
lecting a subset, as the used feature selection methods do.
3.4 Classification
The results are presented in Figure 4. Some average results using all the data sets
are provided, in order to determine the best segmentation method (upper left
panel in Figure 4), the best feature selection method (upper right panel), and the
best classifier (lower left panel). The best data set uses the border segmentation
method, the genetic feature selection method, and the SVM-LIN classification
algorithm, achieving 89.06% of accuracy (lower right panel). The Table 1 shows
the average confusion matrix achieved by the best data set–classifier pair using
the test sets (117 samples).
Fig. 4. Upper left: average segmentation results using all the data sets. Upper right:
average feature selection results using all the data sets. Lower left: average classification
results using all the data sets. Lower right: results of the best data set (border–genetic).
Table 1. Average test confusion matrix achieved with the best combination of seg-
mentation, feature selection and classification methods.
XXX
XClassified
XXX as Hollow heart Healthy
Real XX
Hollow heart 57.9 6.4
Healthy 6.4 46.3
1026, 1068, 1091, 1195, 1398, 1405, and 1434-1438 nm) over an example potato
spectral chart. Although water absorption increases rapidly after 1450 nm [22], it
is remarkable that all the selected wavelengths are below 1438 nm. This suggests
that the water amount is not an important factor in the hollow heart detection.
Fig. 5. Selected wavelengths on the best data set, marked with columns. The x-axis
represents the bands. The y-axis represents the average grey level.
5 Conclusions
Infrared hyperspectral imaging has shown to be a good choice for hollow heart
detection in potatoes of Agria variety. We developed an objective and non–
destructive detection method using Pattern Recognition and Image Processing
techniques, achieving accuracies of about 89.1%. The result can be interesting for
the industry, because nowadays the process is still handled by human operators.
The border segmentation method seems slightly better than using the full
potato. The results also indicate that removing the common scab from the hy-
perspectral cubes does not help the classification procedure and decreases the
accuracy. The correlation between common scab and the presence of hollow heart
will be studied in the future.
Regarding feature selection, size and roundness were detected to be essen-
tial features for the hollow heart detection, and should be taken into account.
Besides, genetic has shown to be the most suitable feature selection algorithm.
In future work, it would be interesting to evaluate the system with other
potato varieties, as well as researching the relationship between the optimal
wavelengths and the biological causes of hollow heart.
References
1. Potato World, World-wide potato production statistics. International Year of the
Potato 2008. http://www.potato2008.org/en/world/index.html (2008)
2. Rex, B.L., Mazza, G.: Cause, control and detection of hollow heart in potatoes: A
review. Am. J. Potato Res. 66, No 3 (1989)
3. Finney, E.E., Norris, K.H.: X-Ray scans for detecting hollow heart in potatoes. Am.
J. Potato Res. 55, No 2 (1978)
4. Jivanuwong, S.: Nondestructive detection of hollow heart in potatoes using ultra-
sonics. Master Thesis. Virginia Polytechnic Institute (1998)
5. Elbatawi, I.E.: An acoustic impact method to detect hollow heart of potato tubers.
Biosyst. Eng. 100, 206-213 (2008)
6. Sun, D.: Hyperspectral Imaging for Food Quality Analysis and Control. Academic
Press Elsevier, San Diego, California, USA (2009)
7. Singh, B.: Visible and near-infrared spectroscopic analysis of potatoes. M.Sc. Thesis,
McGill University, Montreal, PQ, Canada (2005)
8. Al-Mallahi, A., Kataoka, T., Okamoto, H., Shibata, Y.: Detection of potato tubers
using an ultraviolet imaging-based machine vision system. Biosyst. Eng. 105, 257-
265 (2009)
9. Kang, S., Lee, K., Son, J.: On-line internal quality evaluation system for the process-
ing potatoes. Food Process. Autom. Conf. Proc., Providence, Rhode Island (2008)
10. Bradski, G., Kaehler, A.: Learning OpenCV: Computer Vision with the OpenCV
Library. O’Reilly Media (2008)
11. Otsu, N.: A threshold selection method for gray level histograms. IEEE Trans.
Syst. Man Cybern. 9, 62-66 (1979)
12. Dacal-Nieto, A., Formella, A., Carrión, P., Vazquez-Fernandez, E., Fernández-
Delgado, M.: Common scab detection on potatoes using an infrared hyperspectral
imaging system. To appear in Proceedings of ICIAP 2011, LNCS (2011)
13. Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann, P., Witten, I.H.: The
WEKA Data Mining Software: An Update. SIGKDD Explorations 11 (1) (2009)
14. Goldberg, D.: Genetic Algorithms in Search, Optimization and Machine Learning.
Reading, Ma: Addison-Wesley (1989)
15. Garcı́a-López, F., Garcı́a-Torres, M., Melián-Batista, B., Moreno-Pérez, J.A.,
Moreno-Vega, J.M.: Solving feature subset selection problem by a Parallel Scat-
ter Search. Eur. J. Oper. Res. 169 (2), 477-489 (2008)
16. Weihs, C.: Multivariate Exploratory Data Analysis and Graphics, A tutorial. J.
Chemom. 7, 305-340 (1993)
17. Guetlein, M., Frank, E., Hall, M. Karwath, A.: Large Scale Attribute Selection
Using Wrappers. Proc IEEE Symposium on Computational Intelligence and Data
Mining, 332-339 (2009)
18. Hall, M.: Correlation-based Feature Subset Selection for Machine Learning. Hamil-
ton, New Zealand (1998)
19. Breiman, L.: Using Iterated Bagging to Debias Regressions. Mach. Learn. 45, 261-
277 (2001)
20. Chang, C.C., Lin, C.J.: LIBSVM:a library for support vector machines. http:
//www.csie.ntu.edu.tw/~cjlin/libsvm/ (2008)
21. Le Cessie, S., Van Houwelingen, J.C.: Ridge Estimators in Logistic Regression.
Appl. Stat. 41, 191-201 (1992)
22. Curcio, J.A., Petty, C.C.: The Near Infrared Absorption Spectrum of Liquid Water.
J. Opt. Soc. Am. 41, 302-302 (1951)
8.3. VISIÓN HIPERESPECTRAL: CORAZÓN HUECO EN PATATAS 139
Tabla Resumen
Tı́tulo Non–destructive detection of hollow heart in pota-
toes using hyperspectral imaging.
Datos Caip 2011. Lecture Notes in Computer Science
(Springer).
Calidad 0.033 Sjr (Q3 x 2, Q4), Core B
Papel del autor Fundamental.
Motivación Es una enfermedad requerida en los objetivos del pro-
yecto VISIOCAL.
Resultados Se consigue un 89.1 % de acierto utilizando el clasifi-
cador Svm (kernel lineal) con el parámetro C = 2−5 ,
utilizando solamente las bandas en 863 nm, 905 nm,
921 nm, 1026 nm, 1068 nm, 1091 nm, 1195 nm, 1398
nm, 1405 nm, 1434-1438nm, ası́ como las tres carac-
terı́sticas morfológicas, seleccionadas mediante algo-
ritmo genético sobre el conjunto de datos que genera
la segmentación border.
Conclusiones Mejor segmentación: border. Detectar la sarna no
mejora la precisión. Mejor algoritmo de selección
de caracterı́sticas: genético. Las caracterı́sticas mor-
fológicas son muy importantes. Mejor algoritmo de
clasificación: Svm.
Trabajo futuro Probar nuevas variedades. Probar métodos Pca y
Lda.
140 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
Autores
Angel Dacal-Nieto Universidade de Vigo
Arno Formella Universidade de Vigo
Pilar Carrión Universidade de Vigo
Esteban Vazquez-Fernandez Gradiant
Manuel Fernández-Delgado Universidade de Santiago de Compos-
tela
Criterios de calidad
Congreso 16th International Conference on Image Analysis and
Processing (Iciap 2011)
Core B
’Artificial Intelligence and Image Processing’
Revista Lecture Notes in Computer Science (Lncs)
Editorial Springer Verlag.
SJR If = 0.033 (2009)
Q3 ’Computer Science, miscellaneous’ (66/108)
Q3 ’Hardware and Architecture’ (81/118)
Q4 ’Mathematics - Theoretical Computer Science’
(67/74)
8.4. VISIÓN HIPERESPECTRAL: SARNA COMÚN EN PATATAS 141
Abstract. The common scab is a skin disease of the potato tubers that
decreases the quality of the product and influences significantly the price.
We present an objective and non-destructive method to detect the com-
mon scab on potato tubers using an experimental hyperspectral imaging
system. A supervised pattern recognition experiment has been performed
in order to select the best subset of bands and classification algorithm for
the problem. Support Vector Machines (SVM) and Random Forest clas-
sifiers have been used. We map the amount of common scab in a potato
tuber by classifying each pixel in its hyperspectral cube. The result is the
percentage of the surface affected by common scab. Our system achieves
a 97.1% of accuracy with the SVM classifier.
1 Introduction
Detecting and identifying defects and diseases in potato tubers (Solanum tubero-
sum) continue to be an important challenge for food engineering and automation.
Industry uses a large variety of technologies and computer vision methods have
been a specially successful choice. Nevertheless, some new technologies should
be taken into account for improving non-destructive potato quality assessment.
The importance of the potato industry is extreme, since potatoes are still one
of the most consumed products in the world; they are the world’s fourth largest
food crop. The annual production is 325 million tons and it moves an amount
of global transactions of about 6 billion US dollars (2007 data). Thus, the world
potato average consumption is 31 kg per capita and year [1].
Hyperspectral imaging is an emerging technology originally designed for mil-
itary remote satellite inspection [2], but also used for remote sensing, astronomy
and earth observation. It is also a reliable approach to classical spectroscopy, be-
cause despite a little loss of accuracy, an object can be analysed in significantly
less time, in a non-destructive way.
142 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
The scientific community has started to show its interest in the last years in
hyperspectral imaging possibilities for food quality [3]. Regarding the research
in potato quality assessment, there are systems to predict the water content in
potatoes using classical spectroscopy techniques [4]. Some other contributions are
oriented to the detection of clods between a set of potato tubers using hyperspec-
tral imaging [5]. Finally, there are contributions [6] that investigate composition
characteristics from potato tubers like water, starch and proteins, using invasive
spectroscopy techniques, meanwhile others [7] use NIR spectroscopy to predict
specific gravity and dry matter in potatoes. Using other optical spectral methods
[8], there are contributions for the detection of common scab, dry rot, gangrene,
and other diseases, using wavelength ranges between 590 nm and 2030 nm, and
getting accuracies up to 83%. Unfortunately, these systems are either destructive
or they can not be easily included in classical machine vision developments in
order to use the same image acquisition for all the processes.
Our objective is to map the common scab affected areas in potato tubers.
This has been achieved in the past by using different technologies, as it has been
described before. However, mapping the common scab is not only a required
objective itself: we also use this mapping as a preprocessing stage into a wider
potato inspection system, which detects internal and external defects and dis-
eases. Some of these diseases require a morphological study, so hyperspectral
technology seems to be the best approach. It would be interesting to provide a
solution using the same image acquisition system, in order to unify the inspec-
tion process, so hyperspectral imaging has been also the selected technology to
solve the common scab mapping problem.
Fig. 2. Left: scanning initial position at 70◦ . Right: scanning final position at 110◦ .
The arrow shows the direction of scanning. Hyperspectral system scheme: a) camera,
b) spectrograph, c) mirror scanner, d) object, e) diffuse chamber, f) halogen lamp.
To sum up, our system obtains 320 spectral images (320 × 240 pixels), that
are transposed into hyperspectral cubes formed by 256 images with 320 × 320
pixels, corresponding to 256 consecutive wavelengths from 900 nm to 1700 nm.
3 Experiment
We use a set of 234 potato tubers (variety Agria) from Xinzo de Limia (Spain),
with different degrees of common scab incidence, that have been collected from
some potato packing companies during the 2009 harvest.
144 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
Fig. 3. Up: Three spectral images taken from different lines of the object. Down:
978 nm, 1173 nm, and 1608 nm spatial images.
3.1 Segmentation
In every hyperspectral cube, we need to segment the potatoes from the back-
ground for later mapping tasks. We segment only one image from the hyper-
spectral cube (the wavelength 980 nm has been found after several performance
tests). We obtain a mask that is applied in the rest of the cube.
Segmentation runs in several steps (Figure 4), helped by the open source
library OpenCV [9]. First, we binarize the image using Otsu’s method [10] that
calculates the optimum binarization threshold using a probabilistic analysis of
the image. Then, a Gaussian blurring clusters the noise in the image. Another
binarization is needed before a connected-component labelling, performed to
remark contiguous areas in the image. At this point, we know that the blob with
the largest area (excluding the background) is the potato. We select this blob
and create the mask used to segment all the images in the hyperspectral cube.
experts helped us to identify which portions (ROI) were affected and which were
not. Some hyperspectral cubes provided more samples (especially those more
affected by common scab) meanwhile others provided just one healthy sample.
Note that every hyperspectral cube consists of 256 images that correspond
to the 256 bands of the hyperspectral system. For this reason, when we select a
ROI, we are not selecting just a rectangle of pixels, but that rectangle all over
the 256 images that are part of the hyperspectral cube.
When selecting the ROI, the average intensity value of the pixels in the ROI
is calculated for each band. Hence, every sample (independently of its size) is
represented with 256 attributes and an extra attribute that denotes the class
(common scab or healthy). Eventually, we have obtained 649 samples (208 cor-
responding to common scab class and 441 corresponding to healthy class).
The samples can be visualized in a chart where the x-axis represents the
wavelength range and the y-axis the grey level in the band, which is actually the
arithmetic mean of pixels in every band of the ROI. In the Figure 5 we can see
ROI selection of two samples and the corresponding luminance charts.
Fig. 5. Left: healthy and common scab affected (the brightest) ROI’s. Right: Lumi-
nance charts from two different samples. The x-axis represents the wavelength. The
y-axis represents the average grey level in the ROI, for each band.
contiguous zones have been selected: 1300 nm–1303 nm, 1336 nm–1342 nm and
1503 nm. Techniques such as Principal Component Analysis (PCA) and Linear
Discriminant Analysis (LDA) are the most commonly used unmixing techniques
in spectral imaging. However, these algorithms do not reduce the number of
wavelengths needed, rather they generate a linear combination of the 256 fea-
tures into a new feature space. This is the reason why only feature selection
operations are interesting in this research.
To summarize, after this step of the experiment, we provide six datasets to
the classification procedure: genetic, scattered, greedy, LFS, CFS and full.
We present results for two classification algorithms: Random Forest (RF) and
Support Vector Machines (SVM). Other classifiers have been tested in a prelim-
inary stage (Logistic Regression, MLP and k-NN), but they performed poorly.
A Random Forest [17] is a collection of trees that classifies individually an
input sample, and then evaluates the individual responses of the trees to output
the mostly voted class. We used the OpenCV implementation of RF, tuning the
mtry parameter, which is the number of features to be used in random selection.
SVM find the optimal hyperplane over a high dimensional space where the
feature vectors have been mapped using a kernel function (Gaussian in our case).
We can tune its behaviour with the regularization parameter (also known as cost,
or C), which is not very relevant for the results [18], and the kernel spread (γ),
with high relevance on the classification accuracy. SVM has been introduced in
our system with the library LibSVM [19].
For each dataset, we evaluated the classification algorithms using a method based
on randomly generating 10 permutations of the dataset, so that each permuta-
tion has the same samples, but differently ordered. Then, each permutation is
divided into three parts: training (50% of the samples), validation and param-
eter tuning (25% of the samples), and test (remaining 25%). The samples are
normalized (zero mean and standard deviation one) to avoid that attributes in
greater numeric ranges influence excessively over those with smaller variation.
For each combination of tunable parameters and for each permutation, we
train a classifier using the training sets. Then, we test its performance by using
the validation sets. We selected the parameter values which provide the best
average accuracy over the 10 permutations.
√
In the case of RF, the default value of mtry is p, being p the number of
features of the problem. We follow a parameter tuning as being suggested by [20].
√
We use different values of mtry : mtry = p0 , mtry = p, mtry = p/4 and mtry =
p/2. The rest of the parameters have been established as [20] recommends. Thus,
the number of trees has been set to 500, since it is enough, and there is no penalty
for having an excessive number of trees.
8.4. VISIÓN HIPERESPECTRAL: SARNA COMÚN EN PATATAS 147
In the case of SVM, we try pairs of (C, γ) using exponentially growing se-
quences for C and γ [19]. Thus, we use C = 2n , n = −5..14 and γ = 2n , n =
−15..3, which gives 380 combinations. A finer adjustment has been discarded
after some preliminary tests.
Finally, for each permutation, we train the classifier using the training sets
tuned with the best parameters found, evaluating its accuracy on the test sets.
Note that using more permutations prevents unfair divisions of the dataset.
For example, using only one permutation, if all the easy-to-classify samples are
filled in the test set, it would cause unfairly good results. Additionally, each
dataset has also been evaluated using leave-one-out cross-validation (loocv).
Once being able to classify, the objectives are, for each potato (actually for each
hyperspectral cube), obtaining an image that marks which zones are affected
and computing the percentage of common scab affected surface.
First, we segment the potato, removing the background from the hyperspec-
tral cube. Then, each pixel in the hyperspectral cube is classified individually
(excluding the background, that has been localized previously in the segmen-
tation step). Each hyperspectral pixel has (in our system) 256 values: however,
depending on the feature selection procedure, we will have only a few of them.
With the information of membership of each pixel to one class or another, we
create a common scab map image. To reduce noise in the final map, a closing
operation is performed followed by an opening operation with the same kernel.
Finally, we calculate the percentage of the affected surface.
The objective of our system is to inspect 20 Kg samplings. Each potato will
be inspected only by one side. Inspecting such an amount of potatoes averages
individual errors, since we provide a statistical measurement. The result will be
the average affected surface in the whole 20 Kg sampling.
The results of all datasets and classifiers can be seen in Table 1 including the
leave-one-out cross-validation. Support Vector Machines show to be more ef-
fective than Random Forest in all the datasets. On the other hand, the CFS
dataset seems to have the better subset of features, so that the pair SVM and
CFS dataset is the best option to solve our problem.
As commented in Section 3.3, PCA and similar methods have been analysed
but considered not adequate. However, some preliminary work has been done to
check their performance. Thus, a new dataset has been created using Weka, after
applying the PCA method to the full dataset. The loocv results show that this
dataset gets a 95.2% of accuracy with RF, and approximately a 96% of accuracy
using SVM. These results are 2 points under the feature selection algorithms
results, and even worse the full dataset.
148 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
Best params.
Classifier Dataset Accuracy % loocv Acc. % Valid. Acc. % Bands
mtry
√
full 95.4 96.1 p 95.6 256
genetic 94.3 96.2 p/2 93.6 11
scattered 93.8 96.9 p/4 95.0 11
RF
greedy 95.9 97.4 p/2 96.7 5
√
LFS 94.5 96.8 p 95.2 7
√
CFS 95.8 96.5 p 96.1 6
C γ
full 96.2 96.6 2−2 2−10 96.4 256
genetic 96.0 96.8 25 2−10 96.5 11
5 −2
scattered 95.7 96.9 2 2 96.5 11
SVM 12 −15
greedy 96.7 96.9 2 2 97.0 5
LFS 96.0 97.7 27 2−1 96.9 7
CFS 97.1 98.0 211 2−5 97.4 6
Table 1. Accuracy (in %) for each dataset and classification algorithm.
Now we are going to study further the best dataset–classifier pair. The best
combination of parameters found was to be C = 211 and γ = 2−5 . The confusion
matrix can be seen in Table 2. Note that these results were obtained using the
test sets, composed by 25% of the samples (162 in our case). This is an average
confusion matrix taking into account the ten permutations.
XX
XXClassified
XXX as Common Scab Healthy
Real XX
Common Scab 48.3 3.1
Healthy 1.6 109
Table 2. Average confusion matrix obtained with the CFS dataset using SVM.
Four samples (two of each class) are presented in their luminance chart in Fig-
ure 6. Columns in black mark zones being selected in the CFS dataset. Previous
contributions [21] show that at wavelengths greater that 1100 nm, where ab-
sorption by water dominates, the reflectance increases due to dehydration in the
affected area, as in the case of common scab. Our automatically selected wave-
lengths lie in that range. However, by the moment it is impossible to compare
our results with other common scab detection methods, since they use different
wavelength ranges, or searched for other diseases in the same experiment.
5 Conclusions
Hyperspectral imaging has shown to be an good technology applied to food
quality assessment. We have used an objective and non-destructive infrared hy-
perspectral system to identify the surface affected by common scab on potatoes.
8.4. VISIÓN HIPERESPECTRAL: SARNA COMÚN EN PATATAS 149
Fig. 6. Four samples, two from each class. Columns in grey mark the zones used by
the CFS dataset. The rest of the bands were not selected. The x-axis represents the
wavelength. The y-axis represents the grey level.
Several feature selection algorithms have been tested, showing that this is a
critical step to increase the system speed, because only 6 bands achieve the best
accuracy. The selected bands with the CFS method (1300 nm, 1303 nm, 1336 nm,
1339 nm, 1342 nm and 1503 nm) provide enough information to classify common
scab and healthy surface with a 97.1% of accuracy using the SVM classifier
(tuned with C = 211 and γ = 2−5 ).
This information could be useful for the designing of a specific multispectral
image acquisition system, which would not have any mechanical device to move
the camera or the object, because images could be captured within a reduced and
specifically chosen group of wavelengths (in our case around 1301 nm, 1339 nm
and 1503 nm). Hyperspectral cube reconstruction would not be needed any more.
Hence, the time spent in an acquisition session would be considerably reduced.
The system will be used as a preprocessing step to remove the common
scab for improving other disease identification algorithms on potatoes, as hollow
heart, or the dry matter estimation amount. In future work, it would be inter-
esting to evaluate the system with other potato varieties. On the other hand,
methods like LDA should be tested in order to compare with the feature selection
methods used in this paper. Finally, the relationship between the wavelengths
selected with the best dataset and the biological components of common scab
should be researched. This could be achieved by using a different image acqui-
sition system (i.e. sensitive from 500 nm to 2000 nm), in order to compare our
results with the obtained in [8].
References
1. Potato World - International Year of the Potato 2008. http://www.potato2008.
org/en/world/index.html (2008). Accessed 01 January 2011.
2. Goetz, A., Vane, G., Solomon, J.E., Rock, B.N.: Imaging spectrometry for earth
remote sensing. Sci. 228 (4704), 1147-1153 (1985)
3. Sun, D.: Hyperspectral Imaging for Food Quality Analysis and Control. Academic
Press Elsevier, San Diego, California, USA (2009)
4. Singh, B.: Visible and near-infrared spectroscopic analysis of potatoes. M.Sc. Thesis,
McGill University, Montreal, PQ, Canada (2005)
5. Al-Mallahi, A., Kataoka, T., Okamoto, H., Shibata, Y.: Detection of potato tubers
using an ultraviolet imaging-based machine vision system. Biosyst. Eng. 105, 257-265
(2009)
6. Buning-Pfaue, H.: Analysis of water in food by near-infrared spectroscopy. Food
Chem. 82, 107-115 (2003)
7. Kang, S., Lee, K., Son, J.: On-line internal quality evaluation system for the process-
ing potatoes. Food Process. Autom. Conf. Proc., Providence, Rhode Island (2008)
8. Porteous, R.L., Muir, A.Y., Wastie, R.L.: The Identification of Diseases and Defects
in Potato Tubers from Measurements of Optical Spectral Reflectance. J. Agric. Eng.
Res. 26, 151-160 (1981)
9. Bradski, G., Kaehler, A.: Learning OpenCV: Computer Vision with the OpenCV
Library. O’Reilly Media (2008)
10. Otsu, N.: A threshold selection method for gray level histograms. IEEE Trans.
Syst. Man Cybern. 9, 62-6 (1979)
11. Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann, P., Witten, I.H.: The
WEKA Data Mining Software: An Update. SIGKDD Explorations 11 (1) (2009)
12. Goldberg, D.: Genetic Algorithms in Search, Optimization and Machine Learning.
Reading, Ma: Addison-Wesley (1989)
13. Garcı́a-López, F., Garcı́a-Torres, M., Melián-Batista, B., Moreno-Pérez, J.A.,
Moreno-Vega, J.M.: Solving feature subset selection problem by a Parallel Scatter
Search. Eur. J. Oper. Res. 169 (2), 477-489 (2008)
14. Weihs, C.: Multivariate exploratory data analysis and graphics, a tutorial. J.
Chemom. 7, 305-340 (1993)
15. Guetlein, M., Frank, E., Hall, M. Karwath, A.: Large Scale Attribute Selection
Using Wrappers. Proc IEEE Symposium on Computational Intelligence and Data
Mining, 332-339 (2009)
16. Hall, M.: Correlation-based Feature Subset Selection for Machine Learning. Hamil-
ton, New Zealand (1998)
17. Breiman, L.: Using Iterated Bagging to Debias Regressions. Mach. Learn. 45, 261-
277 (2001)
18. Valentini, G., Dietterich, T.G.: Bias-variance analysis of support vector machines
for the development of SVM-based ensemble methods. J. Mach. Learn. Res. 5, 725-
775 (2004)
19. Chang, C.C., Lin, C.J.: LIBSVM:a library for support vector machines.
http://www.csie.ntu.edu.tw/ cjlin/libsvm/ (2008)
20. Svetnik, V., Liaw, A., Tong, C., Culberson, J.C., Sheridan, R.P. Feuston, B.P.:
Random Forest: A Classification and Regression Tool for Compound Classification
and QSAR Modeling. J. Chem. Inf. Comput. Sci. 43, 1947-1958 (2003)
21. Gunasekaran, S., Paulsen, M.R., Shove, G.C.: Optical methods for nondestructive
quality evaluation of agricultural and biological materials. J. Agr. Eng. Res. 32,
209-241 (1985)
8.4. VISIÓN HIPERESPECTRAL: SARNA COMÚN EN PATATAS 151
Tabla Resumen
Tı́tulo Common scab detection on potatoes using an infra-
red hyperspectral imaging system.
Datos Iciap 2011. Lecture Notes in Computer Science
(Springer).
Calidad 0.033 Sjr (Q3 x 2, Q4), Core B
Papel del autor Fundamental.
Motivación Es una enfermedad requerida en los objetivos del pro-
yecto Visiocal. Además, se utiliza como método pa-
ra intentar mejorar la detección del corazón hueco.
Resultados Se consigue un 97.1 % de acierto utilizando el clasi-
ficador Svm con los parámetros C = 211 y γ = 2−5 ,
utilizando solamente las bandas en 1300 nm, 1303
nm, 1336 nm, 1339 nm, 1342 nm y 1503 nm, selec-
cionadas por el algoritmo CFS sobre el conjunto de
datos inicial.
Conclusiones Mejor algoritmo de selección de caracterı́sticas: Cfs.
Mejor algoritmo de clasificación: Svm.
Trabajo futuro Probar nuevas variedades. Probar métodos Pca y
Lda.
152 CAPÍTULO 8. PUBLICACIONES RELACIONADAS
Repercusión en la prensa
El periódico ourensano La Región recogió en su edición del 20 de Febrero de
2009 los inicios del proyecto Visiocal (Figura 8.1).
[Al-Mallahi et al., 2008] Al-Mallahi, A., Kataoka, T., Okamoto, H.: Discrimi-
nation between potato tubers and clods by detecting the significant wave-
bands. Biosystems Engineering 100, 329-337 (2008)
[Al-Mallahi et al., 2009] Al-Mallahi, A., Kataoka, T., Okamoto, H., Shibata,
Y.: Detection of potato tubers using an ultraviolet imaging-based machine
vision system. Biosystems Engineering 105, 257-265 (2009)
[Ariana & Lu, 2008] Ariana, D., Lu, R.: Quality evaluation of pickling cucum-
bers using hyperspectral reflectance and transmittance imaging. Sens. Ins-
trumen. Food Qual. 2, 144-160 (2008)
[Ariana & Lu, 2010] Ariana, D., Lu, R.: Evaluation of internal defect and sur-
face color of whole pickles using hyperspectral imaging. Journal of Food
Engineering 96, 583-590 (2010)
[Blasco et al., 2009] Blasco, J., Aleixos, N., Gomez–Sanchis, J., Molto, E.: Re-
cognition and classification of external skin damage in citrus fruits using
multispectral data and morphological features. Biosystems Engineering,
103, 137-145 (2009)
[Barnes et al., 2010] Barnes, M., Duckett, T., Cielniak, G., Stroud, G., Harper,
G.: Visual Detection of Blemishes in Potatoes using Minimalist Boosted
Classifiers. J. Food Eng. 98, 339-346 (2010)
[Bradski & Kaehler, 2008] Bradski, G. Kaehler, A.: Learning OpenCV: Compu-
ter Vision with the OpenCV Library. O’Reilly Media (2008)
153
154 BIBLIOGRAFÍA
[Brosnan & Sun, 2004] Brosnan, T., Sun, D.W.: Improving Quality Inspection
of Food Products by Computer Vision, A Review. Journal of Food Engi-
neering 61, 3-16 (2004).
[Chang & Lin, 2008] Chang, C.C., Lin, C.J.: LIBSVM: a library for support
vector machines. http://www.csie.ntu.edu.tw/ cjlin/libsvm/ (2008)
[Chao et al., 2009] Chao, K., McNaughton, J.L., Won, J., Kim, M.S., Lefcourt,
A.M., Roberts, M.S.: Detection of microbial biofilms on food processing
surfaces: hyperspectral fluorescence imaging study. Proceedings of the SPIE
- The International Society for Optical Engineering, 7315 (2009)
[Chtioui et al., 1998] Chtioui, Y., Bertrand, D., Barba, D.: Feature selection by
a genetic algorithm. Application to seed discrimination by artifical vision.
J Sci Food Agric 76, 77-86 (1998)
[Cortes & Vapnik, 1995] Cortes, C., Vapnik, V.: Support-Vector Networks.
Mach. Learn. 20(3), 273-297 (1995)
[Crowley & Christensen, 1995] Crowley, J.L., Christensen, H.I.: Vision as Pro-
cess. Springer (1995)
[Curcio & Petty, 1951] Curcio, J.A., Petty, C.C.: The near infrared absorption
spectrum of liquid water. J. Opt. Soc. Am. 41, 302-302 (1951)
[Du & Sun, 2004] Du, C., Sun, D.: Recent developments in the applications
of image processing techniques for food quality evaluation. Food Science
Technology, 15, 230-249 (2004)
[Du & Sun., 2006] Du, C., Sun, D.: Learning techniques used in computer vision
for food quality evaluation: a review. Journal of Food Engineering, 72, 39-
55 (2006)
[Duda et al., 2000] Duda, R.O., Hart, P.E. Stork, D.G.: Pattern Classification.
Wiley. USA (2000)
[ElMasry et al., 2007] ElMasry, G., Wang, N., ElSayed, A., Ngadi, N.: Hypers-
pectral imaging for non–destructive determination of some quality attribu-
tes for strawberry. Journal of Food Engineering, 81, 98-107 (2007)
[Finney & Norris, 1978] Finney, E.E., Norris, K.H.: X-Ray scans for detecting
hollow heart in potatoes. American Journal of Potato Research, 55, No 2
(1978)
156 BIBLIOGRAFÍA
[Gong & Yang, 2004] Gong, M., Yang, Y.: Quadtree-based genetic algorithm
and its applications to computer vision. Pattern Recognition 37, 1723-1733
(2004)
[González et al., 2011] González, E., Carrión, P., Formella, A., Fernández-
Delgado, M., Cernadas, E.: Statistical and wavelet based texture features
for fish oocyte classification. Lecture Notes in Computer Science (2011)
[González & Woods, 2008] González, R.C., Woods, R.E.: Digital Image Proces-
sing. Prentice Hall (2008).
[Gowen et al., 2007] Gowen, A.A., O’Donnell, C.P., Cullen, P.J., Downey, G.,
Frias, J.M.: Hyperspectral imaging - an emerging process analytical tool
for food quality and safety control. Food Science Technology, 18, 590-598
(2007)
[Gowen et al., 2008] Gowen, A.A., O’Donnell, C.P., Taghizadeh, M., Gaston,
E., O’Gorman, A., Cullen, P.J., Frias, J.M., Esquerre, C., Downey, G.:
Hyperspectral imaging for the investigation of quality deterioration in sli-
ced mushrooms (Agaricus bisporus) during storage. Sens. Instrumen. Food
Qual., 2, 133-143 (2008)
[Graves & Batchelor, 2004] Graves, M., Batchelor, B.: Machine Vision for the
Inspection of Natural Products. Springer (2004)
[Guetlein et al., 2009] Guetlein, M., Frank, E., Hall, M. Karwath, A.: Large Sca-
le Attribute Selection Using Wrappers. Proc IEEE Symposium on Compu-
tational Intelligence and Data Mining, 332-339 (2009)
[Guyer & Yang., 2000] Guyer, D., Yang, X.: Use of genetic artificial neural net-
works and spectral imaging for defect detection on cherries. Computers and
Electronics in Agriculture, 29, 179-194 (2000)
[Gunasekaran et al., 1985] Gunasekaran, S., Paulsen, M.R., Shove, G.C.: Opti-
cal methods for nondestructive quality evaluation of agricultural and bio-
logical materials. J. Agr. Eng. Res. 32, 209-241 (1985)
158 BIBLIOGRAFÍA
[Haase, 2006] Haase, N.U.: Rapid estimation of potato tuber quality by near-
infrared spectroscopy. Starch, 58, 268-273 (2006)
[Hall, 1998] Hall, M.: Correlation-based Feature Subset Selection for Machine
Learning. Hamilton, New Zealand (1998)
[Hall et al., 2009] Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann,
P., Witten, I.H.: The WEKA Data Mining Software: An Update. SIGKDD
Explorations, 11(1) (2009)
[Hughes, 1968] Hughes, G.F: On the mean accuracy of statistical pattern recog-
nizers. IEEE Trans. Inform. Theory IT-14, 55-63 (1968)
[Jain et al., 2000] Jain, A. K., Duin, R. P. W., Mao,J.: Statistical Pattern Re-
cognition: A Review. IEEE Transactions on Pattern Analysis and Machine
Intelligence 22 (2000)
[Jarchi & Boostani, 2006] Jarchi, D., Boostani, R.: A New Weighted LDA Met-
hod in Comparison to Some Versions of LDA. World Academy of Science,
Engineering and Technology 24, 28-33 (2006)
[Jun et al., 2009] Jun, W., Kim, M.S., Lee, K., Milner, P., Chao, K.: Assessment
of bacterial biofilm on stainless steel by hyperspectral fluorescence imaging.
Sens. Instrumen. Food Qual., 3, 41-48 (2009)
[Kang et al., 2004] Kang, S., Lee, K., Choi, W., Son, J., Choi, D., Kim, G.: A
Near-Infrared Sensing Technique for Measuring the Quality of Potatoes.
ASAE Annual Meeting, (Paper number 033137) (2004)
[Kang et al., 2008] Kang, S., Lee, K., Son, J.: On-line internal quality evaluation
system for the processing potatoes. Food Processing Automation Conferen-
ce Proceedings, Providence, Rhode Island (2008)
[LeCessie & Houwelingen, 1992] Le Cessie, S., Van Houwelingen, J.C.: Ridge
Estimators in Logistic Regression. Applied Statistics, 41, 191-201 (1992)
BIBLIOGRAFÍA 159
[Lefebvre et al., 1993] Lefebvre, M., Gil, S., Brunet, D., Natonek, E., Baur, C.,
Gugerli, P., Pun, T.: Computer vision and agricultural robotics for disease
control: The Potato Operation. Comput. Electron. Agric. 9, 85-102 (1993)
[Lin et al., 2003] Lin, C. J., Hsu, C. W., Chang, C. C.: A practical guide to sup-
port vector classification, http://www.csie.ntu.edu.tw/cjlin/papers/
guide/guide.pdf (2004)
[Liu et al., 2007] Liu, Y., Chen, Y., Kim, M.S., Chan, D.E., Lefcourt, A.M.:
Development of simple algorithms for the detection of fecal contaminants on
apples from visible/near infrared hyperspectral reflectance imaging. Journal
of Food Engineering, 81, 412-418 (2007)
[Martı́n, 2003] Martı́n, F.: Analysis Tools for Gray Level Histograms. Procee-
dings of SPPRA (2003)
[Martı́n et al., 2008a] Martı́n, F., Vazquez-Fernandez, E., Formella, A.,
González-Jorge, H., Dacal-Nieto, A.: Automatic reading of digital ins-
trumentation. Industrial Electronics, 2008. ISIE’08, 913-918, ISBN 978-1-
4244-1665-3 (2008)
[Martı́n et al., 2008b] Martı́n, F., Vazquez-Fernandez, E., Formella, A.,
González-Jorge, H., Dacal-Nieto, A.: Sistema de calibrado de instrumen-
tación mediante visión artificial. Proceedings of the XXIII Simposium Na-
cional de la Unión Cientı́fica Internacional de Radio (URSI 2008), ISBN
978-84-612-6291-5 (2008)
[Martı́n et al., 2009a] Martı́n, F., Saavedra, D., Vazquez-Fernandez, Dacal-
Nieto, A., González-Jorge, H.: Localización de caracteres en imágenes
de instrumentación digital. Proceedings of the XXIV Simposium Nacional
de la Unión Cientı́fica Internacional de Radio (URSI 2009), ISBN 978-84-
8102-550-7 (2009)
[Martı́n et al., 2009b] Martı́n, F., Vazquez-Fernandez, E., Formella, A.,
Alvarez-Valado, V., González-Jorge, H., Dacal-Nieto, A.: SCIMVA: Sis-
tema de calibración de instrumentación mediante visión artificial. Procee-
dings of the IX Reunión Nacional de Óptica (RNO 2009), ISBN 978-84-
692-5024-2 (2009)
[Martı́n et al., 2011] Martı́n, F., Vazquez-Fernandez, E., Dacal-Nieto, A.,
Formella, A., Alvarez-Valado, V., González-Jorge, H.: Digital instrumenta-
tion calibration using computer vision. Lecture Notes in Computer Science
6112, 335-344, ISBN 978-3-642-13774-7 (2010)
160 BIBLIOGRAFÍA
[Martinez et al., 2005a] Martı́nez-Usó, A., Pla, F., Garcı́a-Sevilla, P.: Multis-
pectral Image Segmentation by Energy Minimization for Fruit Quality Es-
timation. Lecture Notes in Computer Science 3523, 689-696, ISBN 978-3-
540-26154-0 (2005)
[Martinez et al., 2005b] Martı́nez-Usó, A., Pla, F., Garcı́a-Sevilla, P.: Multis-
pectral Image Segmentation for Fruit Quality Estimation. Artificial Inte-
lligence Research and Development, Frontiers in Artificial Intelligence and
Applications 131, 51-58, ISBN 978-1586035606 (2005)
[Muir et al., 1999] Muir, A.Y., Ross, D.W., Dewar, C.J., Kennedy, D.: Defect
and disease detection in potato tubers. Scott. Agric. Coll. Crop Sci. Res.
Rep., 5-9 (1999)
[Naganathan et al., 2008] Naganathan, G.K., Grimes, L.M., Subbiah, J., Cal-
kins, C.R., Samal, A., Meyer, G.E.: Visible/near-infrared hyperspectral
imaging for beef tenderness prediction. {Computers and Electronics in Agri-
culture, 64, 225-233 (2008)
[Noordam et al., 2000] Noordam, J.C., Otten, G.W., Timmermans, A.J.M., van
Zwol, B.H.: High speed potato grading and quality inspection based on a
color vision system (2000)
[Nylund & Lutz, 1950] Nylund, R.E., Lutz, J.M.: Separation of hollow heart
potato tubers by means of size grading, specific gravity, and X-Ray exami-
nation. American Journal of Potato Research, 27, No 6 (1950)
[Otsu, 1979] Otsu, N.: A threshold selection method for gray level histograms.
IEEE Trans. Syst. Man Cybern., 9, 62-6 (1979)
[Pajares & De la Cruz, 2001] Pajares, G., De la Cruz, J.M.: Visión por compu-
tador. Ra-Ma (2001)
[Park et al., 2006] Park, B., Lawrence, K.C., Windham, W.R., Smith, D.P.: Per-
formance of hyperspectral imaging system for poultry surface fecal conta-
minant detection. Journal of Food Engineering, 75, 340-348 (2006)
[Park et al., 2007] Park, B., Kise, M., Lawrence, K.C., Windham, W.R., Smith,
D.P., Thai, C.N.: Real-time multispectral imaging system for online poultry
fecal inspection using unified modeling language. Sens. Instrumen. Food
Qual., 1, 45-54 (2007)
BIBLIOGRAFÍA 161
[Park et al., 2008] Park, B., Kise, M., Windham, W.R., Lawrence, K.C., Yoon,
S.C.: Textural analysis of hyperspectral images for improving contaminant
detection accuracy. Sens. Instrumen. Food Qual., 2, 208-214 (2008)
[Porteous et al., 1981] Porteous, R.L., Muir, A.Y., Wastie, R.L.: The Identifi-
cation of Diseases and Defects in Potato Tubers from Measurements of
Optical Spectral Reflectance. J. Agric. Engng Res. 26, 151-160 (1981)
[Qiao et al., 2007a] Qiao, J., Ngadi, M.O., Wang, N., Gariepy, C., Prasher, S.O.:
Pork quality and marbling level assesment using a hyperspectral imaging
system. Journal of Food Engineering, 83, 10-16 (2007)
[Qiao et al., 2007b] Qiao, J., Wang, N., Ngadi, M., Gunenc, A., Monroy, M.,
Gariepy, C., Prasher S.O.: Predicition of drip-loss, pH, and color for pork
using a hyperspectral imaging technique. Meat Science, 76, 1-8 (2007)
[Rex & Mazza, 1989] Rex, B.L., Mazza, G.: Cause, control and detection of
hollow heart in potatoes: A review. American Journal of Potato Research,
66, No 3 (1989)
[Russ, 2007] Russ, J.C.: The Image Processing Handbook, Fifth Edition. CRC-
Press (2007)
[Schott, 2011a] Schott DCR III Plus DDL Light Source http://www.schott.
com/lightingimaging/english/download/04.21.09_dcr_iii_plus_
row_.qxd.pdf
[Shapiro & Stockman, 2001] Shapiro, L.G., Stockman, G.C.: Computer Vision.
Prentice Hall. (2001)
162 BIBLIOGRAFÍA
[Singh, 2005] Singh, B.: Visible and near-infrared spectroscopic analysis of po-
tatoes. M.Sc. Thesis, McGill University, Montreal, PQ, Canada (2005)
[Specim, 2011a] Specim Spectral Imaging Ltd. Imspector N17E
http://www.specim.fi/media/pdf/imspector-datasheets/
nir-swir-imspectors-ver1-2007.pdf
[Specim, 2011b] Specim Spectral Imaging Ltd. Mirror Scanner
http://www.specim.fi/products/hyperspectral-cores/scanners.html
[Sun, 2006] Sun, D.: Computer Vision Technology for Food Quality Evaluation.
Academic Press Elsevier, San Diego, California, USA (2008)
[Sun, 2009] Sun, D.: Hyperspectral Imaging for Food Quality Analysis and Con-
trol. Academic Press Elsevier, San Diego, California, USA (2009)
[Svetnik et al., 2003] Svetnik, V., Liaw, A., Tong, C., Culberson, J.C., Sheridan,
R.P. Feuston, B.P.: Random Forest: A Classification and Regression Tool
for Compound Classification and QSAR Modeling. J. Chem. Inf. Comput.
Sci. 43, 1947-1958 (2003)
[Valentini & Dietterich, 2004] Valentini, G., Dietterich, T.G.: Bias-variance
analysis of support vector machines for the development of SVM-based
ensemble methods. J. Mach. Learn. Res. 5, 725-775 (2004)
[Vapnik, 1995] Vapnik, V.: The nature of statistical learning theory. Springer-
Verlag (1995)
[Vazquez-Fernandez et al., 2008] Vazquez-Fernandez, E., González-Jorge, H.,
Dacal-Nieto, A., Martı́n, F., Formella, A.: Human feature perception
as a complementary method for digit recognition. Proceedings of the IAS-
TED 8th International Conference on Visualization, Imaging and Image
Processing (VIIP 2008), ISBN 978-0-88986-759-8 (2008)
[Vazquez-Fernandez et al., 2009a] Vazquez-Fernandez, E., Dacal-Nieto, A.,
González-Jorge, H., Martı́n, F., Formella, A., Alvarez-Valado, V.: A ma-
chine vision system for the calibration of digital thermometers. Measure-
ment Science and Technology 20, 065106, 7pp, ISSN 0957-0233-20-6-065106
(2009)
[Vazquez-Fernandez et al., 2009b] Vazquez-Fernandez, E., Dacal-Nieto, A.,
Martı́n, F., Formella, A., Torres-Guijarro, S., González-Jorge, H.: A com-
puter vision system for visual grape grading in wine cellars. Lecture Notes
BIBLIOGRAFÍA 163
[Wang & Xiao, 2005] Hui-Yuan, W., Xiao-Juan, W.: Weighted PCA space and
its application in face recognition. Proc. Int. Conf. Mach. Learn. Cybern.
(Guangzhou, China) 7, 4522-4527 (2005)
[Weihs, 1993] Weihs, C.: Multivariate exploratory data analysis and graphics,
a tutorial. J. Chemom. 7, 305-340 (1993)
[Weiss & Kulikowski, 1991] Weiss, S.M., Kulikowski, C.A.: Computer Systems
That Learn. Morgan Kaufmann (1991)
[Xing et al., 2007] Xing, J., Ngadi, M., Gunenc, A., Prasher, S.O., Gariepy, C.:
Use of visible spectroscopy for quality classification of intact pork meat.
Journal of Food Engineering, 82, 135-141 (2007)
164 BIBLIOGRAFÍA
[Xing et al., 2008] Xing, J., Guyer, D., Ariana, D., Lu, R.: Determining optimal
wavebands using genetic algorithm for detection of internal insect infesta-
tion in tart cherry. Sens. Instrumen. Food Qual., 2, 161-167 (2008)
[Xu et al., 2008] Wu, X., Kumar, V., Quinlan, J.R., Ghosh, J., Yang, Q., Moto-
da, H., McLachlan, G.J., Ng, A.F.M., Liu, B., Yu, P.S., Zhou, Z.H., Stein-
bach, M., Hand, D.J., Steinberg, D.: Top 10 Algorithms in Data Mining,
Knowledge and Information Systems 14, no. 1, pp. 1-37, (2008)
[Yang et al., 2009] Yang, C., Chao, K., Kim, M.S.: Machine vision system for
online inspection of freshly slaughtered chickens. Sens. Instrumen. Food
Qual., 3, 70-80 (2009)
[Yoon et al., 2009] Yoon, S.C., Lawrence, K.C., Siragusa, G.R., Line, J.E., Park,
B., Feldne, P.W.: Hyperspectral reflectance imaging for detecting a food-
borne pathogen: Campylobacter. Transactions of ASABE, 52(2), 651-662
(2009)
[Zheng et al., 2006] Zheng, C., Sun, D., Zheng, L.: Recent developments and
applications of image features for food quality evaluation and inspection -
a review. Food Science Technology, 17, 642-655 (2006)
[Zhou et al., 1998] Zhou, L., Chalana, V., Kim, Y.: PC-Based Machine Vision
System for Real-Time Computer-Aided Potato Inspection. International
Journal of Imaging Systems and Technology, 9, 423-433 (1998)