<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD with OASIS Tables with MathML3 v1.1 20151215//EN" "JATS-journalpublishing-oasis-article1-mathml3.dtd">
<article article-type="research-article" dtd-version="1.1" xml:lang="en" xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<front>
		<journal-meta>
			<journal-id journal-id-type="publisher-id">MC</journal-id>
			<journal-title-group>
				<journal-title>Materiales de Construcci&#xf3;n</journal-title>
				<abbrev-journal-title abbrev-type="publisher">Mater. construcc.</abbrev-journal-title>
			</journal-title-group>
			<issn publication-format="electronic">1988-3226</issn>
			<issn-l>0465-2746</issn-l>
			<publisher>
				<publisher-name>Consejo Superior de Investigaciones Cient&#xed;ficas</publisher-name>
			</publisher>
		</journal-meta>
		<article-meta>
			<article-id pub-id-type="publisher-id">mc.2023.308922</article-id>
			<article-id pub-id-type="doi">10.3989/mc.2023.308922</article-id>
			<article-categories>
				<subj-group subj-group-type="heading">
					<subject>Articles</subject>
				</subj-group>
			</article-categories>
			<title-group>
				<article-title>Computer vision application for improved product traceability in the granite manufacturing industry</article-title>
				<trans-title-group xml:lang="es">
					<trans-title>
						<italic>Visi&#xf3;n artificial aplicada a la industria del granito para la mejora de la trazabilidad</italic>
					</trans-title>
				</trans-title-group>
			</title-group>
			<contrib-group>
				<contrib contrib-type="author">
					<contrib-id contrib-id-type="orcid">https://orcid.org/0000-0001-7155-7031</contrib-id>
					<name>
						<surname>Rigueira</surname>
						<given-names>X.</given-names>
					</name>
					<aff id="aff1">
						<institution content-type="department">Department of Natural Resources and Environmental Engineering</institution>, <institution content-type="university">University of Vigo</institution>, (<addr-line>Vigo</addr-line>, <country>Spain</country>)</aff>
					<role content-type="http://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
					<role content-type="http://credit.niso.org/contributor-roles/investigation/">Investigation</role>
					<role content-type="http://credit.niso.org/contributor-roles/methodology/">Methodology</role>
					<role content-type="http://credit.niso.org/contributor-roles/software/">Software</role>
					<role content-type="http://credit.niso.org/contributor-roles/validation/">Validation</role>
					<role content-type="http://credit.niso.org/contributor-roles/visualization/">Visualization</role>
					<role content-type="http://credit.niso.org/contributor-roles/writing-original-draft/">Writing, original draft</role>
					<role content-type="http://credit.niso.org/contributor-roles/writing-review-editing/">Writing, review &amp; editing</role>
				</contrib>
				<contrib contrib-type="author" corresp="yes">
					<contrib-id contrib-id-type="orcid">https://orcid.org/0000-0001-6359-895X</contrib-id>
					<name>
						<surname>Mart&#xed;nez</surname>
						<given-names>J.</given-names>
					</name>
					<email xlink:href="javmartinez@uvigo.es">javmartinez@uvigo.es</email>
					<aff id="aff2">
						<institution content-type="department">Department of Applied Mathematics I</institution>, <institution content-type="university">University of Vigo</institution>, (<addr-line>Vigo</addr-line>, <country>Spain</country>)</aff>
					<role content-type="http://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
					<role content-type="http://credit.niso.org/contributor-roles/formal-analysis/">Formal analysis</role>
					<role content-type="http://credit.niso.org/contributor-roles/investigation/">Investigation</role>
					<role content-type="http://credit.niso.org/contributor-roles/methodology/">Methodology</role>
					<role content-type="http://credit.niso.org/contributor-roles/visualization/">Visualization</role>
					<role content-type="http://credit.niso.org/contributor-roles/writing-review-editing/">Writing, review &amp; editing</role>
				</contrib>
				<contrib contrib-type="author">
					<contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-0666-5666</contrib-id>
					<name>
						<surname>Ara&#xfa;jo</surname>
						<given-names>M.</given-names>
					</name>
					<aff id="aff3">
						<institution content-type="department">Department of Natural Resources and Environmental Engineering</institution>, <institution content-type="university">University of Vigo</institution>, (<addr-line>Vigo</addr-line>, <country>Spain</country>)</aff>
					<role content-type="http://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
					<role content-type="http://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
					<role content-type="http://credit.niso.org/contributor-roles/investigation/">Investigation</role>
					<role content-type="http://credit.niso.org/contributor-roles/validation/">Validation</role>
					<role content-type="http://credit.niso.org/contributor-roles/writing-review-editing/">Writing, review &amp; editing</role>
				</contrib>
				<contrib contrib-type="author">
					<contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-9115-0412</contrib-id>
					<name>
						<surname>Gir&#xe1;ldez</surname>
						<given-names>E.</given-names>
					</name>
					<aff id="aff4">
						<institution content-type="department">Department of Natural Resources and Environmental Engineering</institution>, <institution content-type="university">University of Vigo</institution>, (<addr-line>Vigo</addr-line>, <country>Spain</country>)</aff>
					<role content-type="http://credit.niso.org/contributor-roles/funding-acquisition/">Funding acquisition</role>
					<role content-type="http://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
				</contrib>
				<contrib contrib-type="author">
					<contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-3767-4602</contrib-id>
					<name>
						<surname>Recam&#xe1;n</surname>
						<given-names>A.</given-names>
					</name>
					<aff id="aff5">
						<institution>Pavestone S.L.</institution>, (<addr-line>Madrid</addr-line>, <country>Spain</country>)</aff>
					<role content-type="http://credit.niso.org/contributor-roles/resources/">Resources</role>
				</contrib>
			</contrib-group>
			<pub-date pub-type="epub">
				<day>20</day>
				<month>06</month>
				<year>2023</year>
			</pub-date>
			<pub-date pub-type="collection">
				<month>09</month>
				<year>2023</year>
			</pub-date>
			<volume>73</volume>
			<issue>351</issue>
			<elocation-id>e323</elocation-id>
			<history>
				<date date-type="received">
					<day>14</day>
					<month>10</month>
					<year>2022</year>
				</date>
				<date date-type="accepted">
					<day>08</day>
					<month>02</month>
					<year>2023</year>
				</date>
				<date date-type="pub">
					<day>10</day>
					<month>08</month>
					<year>2023</year>
				</date>
			</history>
			<permissions>
				<copyright-statement>&#xa9;2023 CSIC</copyright-statement>
				<copyright-year>2023</copyright-year>
				<license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/">
					<license-p>This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International (CC BY 4.0) License.</license-p>
				</license>
			</permissions>
			<self-uri xlink:href="http://materconstrucc.revistas.csic.es/index.php/materconstrucc/article/view/XXXX/XXXX"/>
			<abstract>
				<title>Abstract</title>
				<p>The traceability of granite blocks consists in identifying each block with a finite number of colour bands that represent a numerical code. This code has to be read several times throughout the manufacturing process, but its accuracy is subject to human errors, leading to cause faults in the traceability system. A computer vision system is presented to address this problem through colour detection and the decryption of the associated code. The system developed makes use of colour space transformations and various thresholds for the isolation of the colours. Computer vision methods are implemented, along with contour detection procedures for colour identification. Lastly, the analysis of geometrical features is used to decrypt the colour code captured. The proposed algorithm is trained on a set of 109 pictures taken in different environmental conditions and validated on a set of 21 images. The outcome shows promising results with an accuracy rate of 75.00% in the validation process. Therefore, the application presented can help employees reduce the number of mistakes in product tracking.</p>
			</abstract>
			<trans-abstract xml:lang="es">
				<title>Resumen</title>
				<p>La trazabilidad de los bloques de granito consiste en identificar cada bloque con un n&#xfa;mero finito de bandas de color, las cuales representan un c&#xf3;digo num&#xe9;rico. Dicho c&#xf3;digo tiene que ser le&#xed;do varias veces durante el proceso de producci&#xf3;n, pero la precisi&#xf3;n de esta lectura se encuentra afectada por el factor humano, lo cual lleva a fallos en el sistema. Se presenta un sistema de visi&#xf3;n artificial basado en la detecci&#xf3;n de colores y la decodificaci&#xf3;n de dichas bandas. El sistema hace uso de transformaciones entre espacios de color y varios intervalos para la selecci&#xf3;n de los mismos. Se implementan m&#xe9;todos de visi&#xf3;n artificial, incluyendo la detecci&#xf3;n de contornos para la identificaci&#xf3;n de la posici&#xf3;n de los colores. En &#xfa;ltimo lugar, se analiza la geometr&#xed;a del patr&#xf3;n de colores para su decodificaci&#xf3;n. El algoritmo propuesto es entrenado en un set de 109 im&#xe1;genes tomadas en diferentes condiciones medioambientales y validado en un set de 21 im&#xe1;genes. Los resultados son prometedores, demostrando una eficacia del 75% en el proceso de validaci&#xf3;n. Por lo tanto, el sistema propuesto se considera de utilidad a la hora de incrementar la eficacia de la trazabilidad en la industria del granito.</p>
			</trans-abstract>
			<kwd-group>
				<kwd>Computer vision</kwd>
				<kwd>Granite</kwd>
				<kwd>Traceability</kwd>
				<kwd>Pattern detection</kwd>
				<kwd>Colour detection</kwd>
			</kwd-group>
			<kwd-group xml:lang="es">
				<kwd>Visi&#xf3;n artificial</kwd>
				<kwd>Granito</kwd>
				<kwd>Trazabilidad</kwd>
				<kwd>Detecci&#xf3;n de patrones</kwd>
				<kwd>Detecci&#xf3;n de colores</kwd>
			</kwd-group>
			<funding-group id="fw-01">
				<award-group id="aw1">
					<funding-source>
						<institution>MCIN</institution>
					</funding-source>
					<funding-source>
						<institution-wrap>
							<institution>AEI</institution>
							<institution-id institution-id-type="doi">10.13039/501100011033</institution-id>
						</institution-wrap>
					</funding-source>
					<award-id>PID2020-112730GB-I00</award-id>
				</award-group>
				<funding-statement>This work was supported by Project PID2020-116013RB-I00 financed by MCIN/AEI/10.13039/501100011033</funding-statement>
			</funding-group>
			<counts>
				<fig-count count="7"/>
				<table-count count="6"/>
				<equation-count count="8"/>
				<ref-count count="42"/>
				<page-count count="13"/>
			</counts>
		</article-meta>
	</front>
	<body>
		<sec id="sec1" sec-type="intro">
			<label>1.</label>
			<title>Introduction</title>
			<p>The granite manufacturing industry holds a key role in the industrial network of the North-Western area of Spain. This region is the largest ornamental granite producer, accounting for 62% of the total national production (<xref ref-type="bibr" rid="B1">1</xref>). Traditionally the mining sector, including the granite industry, has been reluctant to adopt new technologies, but the competitive market leaves few options for the mining industry (<xref ref-type="bibr" rid="B2">2</xref>). In this context, an improvement in traceability is required. By definition, traceability involves any processes, procedures, or systems that support the generation of verifiable evidence about a product as it moves along its supply chain (<xref ref-type="bibr" rid="B3">3</xref>). Nowadays, blocks are initially identified in the quarry with marks indicating type and origin, once they reach the factory for further processing, they are colour-coded for identification purposes (<xref ref-type="bibr" rid="B4">4</xref>). Given this setting, a computer vision application could prove helpful in the automation of the traceability system in use.</p>
			<p>The scope of computer vision is the development of theories and algorithms for automating the process of visual perception. The mathematical basis for image processing and feature analysis was defined by several authors, including Ervin E. Underwood, John C. Russ, and Jean Serra (<xref ref-type="bibr" rid="B5 B6 B7 B8">5-8</xref>), in the last decades of the twentieth century and beginning of the twenty-first, while its applications reach a broad range of fields, and the potential benefit of its development can have a major impact in the upcoming years. Computer vision has found its applications in the mining sector, more specifically, in the slate industry for the detection of defects in the ceramic industry (<xref ref-type="bibr" rid="B9 B10 B11">9-11</xref>), for the same purpose in the marble industry (<xref ref-type="bibr" rid="B12 B13 B14 B15 B16">12-16</xref>), for pattern detection and classification (<xref ref-type="bibr" rid="B17">17</xref>, <xref ref-type="bibr" rid="B18">18</xref>) as well as in the granite manufacturing industry for the characterization of granite varieties (<xref ref-type="bibr" rid="B4">4</xref>, <xref ref-type="bibr" rid="B19">19</xref>), but there has not been found any previous research on the applications of computer vision for colour detection and analysis in order to improve product traceability in this sector.</p>
			<p>The current traceability method based on colour-coding each granite block is affordable but entails a substantial number of drawbacks, which may lead to failures. The colours have to identified and interpreted as a sequence of integers several times in the production process by an employee. This simple task can be subject to human error due to fatigue and the harsh work environment in the granite industry, plus its accuracy is affected by the weathering of the colours. The main goal of the program developed is to analyse pictures of granite slabs with the colour code drawn on their side and convert the colour bands into their corresponding numerical code. Consequently, the implementation of a program of this kind would dramatically reduce the time needed to decrypt the colour code, currently performed manually, and reduce human error. In addition, it decreases economic losses by avoiding the discard of those slates not correctly identified. The work presented in this research paper is a crucial step in the implementation of this system on mobile phone devices for in-factory use with the same purpose and even more features.</p>
			<p>Section 2 of this paper introduces the materials needed for this research, including the granite slabs, the images with the colour bands, a middle-class computer, and Python 3.9. and explains the methodology of this research, focused on the algorithm developed. Section 3 presents the results obtained on the detection of colour bands on granite and the decryption process. Lastly, Section 4 concludes with the main findings and future applications.</p>
		</sec>
		<sec id="sec2" sec-type="materials|methods">
			<label>2.</label>
			<title>Materials and methods</title>
			<p>Granite is by definition a very hard natural igneous rock formation of visibly crystalline texture formed essentially of quartz and orthoclase or microcline and used especially for buildings and monuments. It typically contains 20-60% quartz, 10-65% feldspar, and 5-15% mica (biotite or muscovite), although a wide range of lithological materials is considered granite from a commercial perspective (<xref ref-type="bibr" rid="B4">4</xref>). Granite blocks mined in the quarry are wired cut when processed in the factory to produce the granite slabs. Their dimensions are not consistent and tend to range between 1.70 to 2.00 meters in width and 20 to 30 mm in thickness.</p>
			<p>The database used in this research project consists of 130 pictures of granite slabs focused on one of the sides of the slab, where the colour code displayed is in the shape of bands manually drawn. The sole purpose of this particular type of code is to keep track of the granite slab from its entry into the factory until its final sale to the customer.</p>
			<p>The colour code is made up of a variable number of colour bands drawn using spray paint on the granite block once it enters the factory. They are placed either close to the higher or lower edges of the block, with a distance of approximately 15 cm in between them. Each band can have any of the 8 different colours shown in <xref ref-type="table" rid="t1">Table 1</xref>, and they can be placed in any order. Each colour is associated with a number, which makes the block have a specific numerical code depending on the configuration of the colour bands it has drawn on its side. This method to numerate, count and keep track of every block has been chosen over simply drawing the corresponding number on the block because, to produce the final version of the product, the block has to be wired cut. This means that the colour bands drawn on the surface of the stone would be cut as well, and they would become illegible, losing their purpose.</p>
			<table-wrap id="t1">
				<label>Table 1</label>
				<caption>
					<title>Code key for decoding the encrypted unique number that corresponds to every individual granite block processed in the factory. Each colour is associated with an integer between 0 and 7. The number of colour bands displayed grows depending on the number of blocks that the factory has processed. The images in the database display five bands, which corresponds with positive numbers of five digits.</title>
				</caption>
				<table>
					<colgroup>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
					</colgroup>
					<thead>
						<tr>
							<th align="justify" style="background:#000000">Black</th>
							<th align="justify" style="background:#833c0b">Brow</th>
							<th align="justify" style="background:#ff0000">Red</th>
							<th align="justify" style="background:#ffc000">Orange</th>
							<th align="justify" style="background:#ffff00">Yellow</th>
							<th align="justify" style="background:#92d050">Green</th>
							<th align="justify" style="background:#0070c0">Blue</th>
							<th align="justify" style="background:#7030a0">Purple</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td align="justify">0</td>
							<td align="justify">1</td>
							<td align="justify">2</td>
							<td align="justify">3</td>
							<td align="justify">4</td>
							<td align="justify">5</td>
							<td align="justify">6</td>
							<td align="justify">7</td>
						</tr>
					</tbody>
				</table>
			</table-wrap>
			<p>The iPhone 12 Pro camera used to capture the side of the granite slabs in the RGB colour space has a resolution of 12MP, a &#x192;/1.6 aperture, and 26 mm of focal length. Development and testing of the program have been completely performed with a 1.6 GHz Intel i5 10210U processor with 16 GB (2&#xd7;8 GB) of RAM. The program to identify colour codes is written in Python 3.9 using OpenCV, which is an open-source computer vision library written in C++ and C.</p>
			<sec id="sec2.1">
				<label>2.1.</label>
				<title>Theory of colour detection</title>
				<p>A correct choice of colour space is considered crucial in computer vision applications. There are several types of colours spaces available, but for the most part, they can be classified into two categories: device-dependent or device-independent. The first group includes those colour spaces, which their representation of colours lays further away when compared to how the human nervous system senses colours. According to (<xref ref-type="bibr" rid="B20">20</xref>), the colour spaces in this category, such as RGB and HSV, simply encode device-specific data at the device level. On the other hand, the colour spaces in the second group are directly related to the human visual system. They aim to define colour coordinates, which can be comprehended by the average observer. The basic colour space in this category is CIE XYZ and any other colour spaced that can be transformed directly into CIE XYZ is considered device-independent, such as CIE Lab or CIE Luv. Moreover, the concept of uniformity can be applied in this category: a colour space is said to be uniform when the Euclidean distance between colours in that space is proportional to colour differences as perceived by humans (<xref ref-type="bibr" rid="B21">21</xref>).</p>
				<p>Digital images are usually captured in the RGB colour space, whereas hue-based colour models, such as HSV, are the most commonly implemented in colour detection in OpenCV due to their robustness against light changes, while CIE Lab can be more efficient in measuring colour differences in brightness. According to (<xref ref-type="bibr" rid="B22">22</xref>), HSV outperforms RGB because it is approximately uniform and divides the colour data into intensity (Value) and a chromatic part (Hue and Saturation).</p>
				<sec id="sec2.1.1">
					<label>2.1.1.</label>
					<title>The RGB colour space</title>
					<p>Two of the main advantages of the RGB colour space are its simplicity and its additive property, which makes it very easy to store and display images (<xref ref-type="bibr" rid="B23">23</xref>). Nevertheless, this colour model is not the best for colour detection, since important colour properties such as brightness and purity are embedded within the RGB channels, which makes it difficult to determine specific colours and their reliable working ranges (<xref ref-type="bibr" rid="B24">24</xref>). Furthermore, the original pictures were processed in the 24-bit RGB format, in which all components have a depth of 8 bits. This makes up a maximum number of colours of 28 * 28 * 28 = 16777216. The components are internally presented as unsigned integers in range [0, 255], which is the exact value range of a single byte (<xref ref-type="bibr" rid="B25">25</xref>).</p>
				</sec>
				<sec id="sec2.1.2">
					<label>2.1.2.</label>
					<title>The HSV colour space</title>
					<p>The HSV colour space is a transformation of the RGB colour space, and it can be represented in a different coordinate system. The idea of a representation in a hexagonal cone (hexacone) was first proposed by (<xref ref-type="bibr" rid="B26">26</xref>) and it can be observed in <xref ref-type="fig" rid="f1">Figure 1</xref>, where points are defined by hue (H), saturation (S), and value (V). In this space, hue (H) contains the colour angle information, saturation (S) represents purity, which quantifies how a colour is diluted by white, and value (V), which stores the brightness of the colour measuring how far it is from black. The separation of crucial properties such as brightness and purity is what makes the HSV colour space a better fit for colour detection purposes.</p>
					<fig id="f1">
						<label>Figure 1</label>
						<caption>
							<title>Hexagonal representation of the HSV colour space, where the central axis contains all the different shades of grey from black to white. All colours can be defined by their hue (H), saturation (S), and value (V). The horizontal cross-sections of the hexacone are hexagons of different sizes degrading to black, which is a single point. Since hue is an angular measure, the HSV colours space becomes highly effective in defining pure colours.</title>
						</caption>
						<graphic id="gra-1" xlink:href="MC-73-351-e323-gf1.png"/>
					</fig>
					<p>The transformation from RGB to HSV as described in (<xref ref-type="bibr" rid="B27">27</xref>) is given by (<xref ref-type="bibr" rid="B28">28</xref>) in the following <xref ref-type="disp-formula" rid="e1 e2 e3">equations</xref>:</p>
					<disp-formula id="e1">
						<mml:math id="mml-1">
							<mml:mi>V</mml:mi>
							<mml:mo>=</mml:mo>
							<mml:mi>m</mml:mi>
							<mml:mi>a</mml:mi>
							<mml:mi>x</mml:mi>
							<mml:mi>&#xa0;</mml:mi>
							<mml:mo>&#x2061;</mml:mo>
							<mml:mo>(</mml:mo>
							<mml:mi>R</mml:mi>
							<mml:mo>,</mml:mo>
							<mml:mi>G</mml:mi>
							<mml:mo>,</mml:mo>
							<mml:mi>B</mml:mi>
							<mml:mo>)</mml:mo>
						</mml:math>
						<label>[1]</label>
					</disp-formula>
					<disp-formula id="e2">
						<mml:math id="mml-2">
							<mml:mi>S</mml:mi>
							<mml:mo>=</mml:mo>
							<mml:mfenced close="" open="{" separators="|">
								<mml:mrow>
									<mml:mtable>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mfrac>
														<mml:mrow>
															<mml:mrow>
																<mml:mrow>
																	<mml:mi mathvariant="normal">max</mml:mi>
																</mml:mrow>
																<mml:mo>&#x2061;</mml:mo>
																<mml:mrow>
																	<mml:mfenced separators="|">
																		<mml:mrow>
																			<mml:mi>R</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>G</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>B</mml:mi>
																		</mml:mrow>
																	</mml:mfenced>
																</mml:mrow>
															</mml:mrow>
															<mml:mo>-</mml:mo>
															<mml:mi mathvariant="normal">m</mml:mi>
															<mml:mi mathvariant="normal">i</mml:mi>
															<mml:mi mathvariant="normal">n</mml:mi>
															<mml:mo>&#x2061;</mml:mo>
															<mml:mo>(</mml:mo>
															<mml:mi>R</mml:mi>
															<mml:mo>,</mml:mo>
															<mml:mi>G</mml:mi>
															<mml:mo>,</mml:mo>
															<mml:mi>B</mml:mi>
															<mml:mo>)</mml:mo>
														</mml:mrow>
														<mml:mrow>
															<mml:mrow>
																<mml:mrow>
																	<mml:mi mathvariant="normal">max</mml:mi>
																</mml:mrow>
																<mml:mo>&#x2061;</mml:mo>
																<mml:mrow>
																	<mml:mo>(</mml:mo>
																	<mml:mi>R</mml:mi>
																	<mml:mo>,</mml:mo>
																	<mml:mi>G</mml:mi>
																	<mml:mo>,</mml:mo>
																	<mml:mi>B</mml:mi>
																	<mml:mo>)</mml:mo>
																</mml:mrow>
															</mml:mrow>
														</mml:mrow>
													</mml:mfrac>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>f</mml:mi>
													<mml:mrow>
														<mml:mrow>
															<mml:mi mathvariant="normal">max</mml:mi>
														</mml:mrow>
														<mml:mo>&#x2061;</mml:mo>
														<mml:mrow>
															<mml:mfenced separators="|">
																<mml:mrow>
																	<mml:mi>R</mml:mi>
																	<mml:mo>,</mml:mo>
																	<mml:mi>G</mml:mi>
																	<mml:mo>,</mml:mo>
																	<mml:mi>B</mml:mi>
																</mml:mrow>
															</mml:mfenced>
														</mml:mrow>
													</mml:mrow>
													<mml:mo>&#x2260;</mml:mo>
													<mml:mn>0</mml:mn>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mn>0</mml:mn>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>o</mml:mi>
													<mml:mi>t</mml:mi>
													<mml:mi>h</mml:mi>
													<mml:mi>e</mml:mi>
													<mml:mi>r</mml:mi>
													<mml:mi>w</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>s</mml:mi>
													<mml:mi>e</mml:mi>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
									</mml:mtable>
								</mml:mrow>
							</mml:mfenced>
						</mml:math>
						<label>[2]</label>
					</disp-formula>
					<disp-formula id="e3">
						<mml:math id="mml-3">
							<mml:mi>f</mml:mi>
							<mml:mfenced separators="|">
								<mml:mrow>
									<mml:mi>x</mml:mi>
								</mml:mrow>
							</mml:mfenced>
							<mml:mo>=</mml:mo>
							<mml:mi>&#xa0;</mml:mi>
							<mml:mfenced close="" open="{" separators="|">
								<mml:mrow>
									<mml:mtable>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mi>u</mml:mi>
													<mml:mi>n</mml:mi>
													<mml:mi>d</mml:mi>
													<mml:mi>e</mml:mi>
													<mml:mi>f</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>n</mml:mi>
													<mml:mi>e</mml:mi>
													<mml:mi>d</mml:mi>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>f</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>S</mml:mi>
													<mml:mo>=</mml:mo>
													<mml:mn>0</mml:mn>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mfrac>
														<mml:mrow>
															<mml:mi>G</mml:mi>
															<mml:mo>-</mml:mo>
															<mml:mi>B</mml:mi>
														</mml:mrow>
														<mml:mrow>
															<mml:mrow>
																<mml:mrow>
																	<mml:mi mathvariant="normal">max</mml:mi>
																</mml:mrow>
																<mml:mo>&#x2061;</mml:mo>
																<mml:mrow>
																	<mml:mfenced separators="|">
																		<mml:mrow>
																			<mml:mi>R</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>G</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>B</mml:mi>
																		</mml:mrow>
																	</mml:mfenced>
																</mml:mrow>
															</mml:mrow>
															<mml:mo>-</mml:mo>
															<mml:mrow>
																<mml:mrow>
																	<mml:mi mathvariant="normal">min</mml:mi>
																</mml:mrow>
																<mml:mo>&#x2061;</mml:mo>
																<mml:mrow>
																	<mml:mfenced separators="|">
																		<mml:mrow>
																			<mml:mi>R</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>G</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>B</mml:mi>
																		</mml:mrow>
																	</mml:mfenced>
																</mml:mrow>
															</mml:mrow>
														</mml:mrow>
													</mml:mfrac>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>f</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>R</mml:mi>
													<mml:mo>=</mml:mo>
													<mml:mrow>
														<mml:mrow>
															<mml:mi mathvariant="normal">max</mml:mi>
														</mml:mrow>
														<mml:mo>&#x2061;</mml:mo>
														<mml:mrow>
															<mml:mo>(</mml:mo>
															<mml:mi>R</mml:mi>
															<mml:mo>,</mml:mo>
															<mml:mi>G</mml:mi>
															<mml:mo>,</mml:mo>
															<mml:mi>B</mml:mi>
															<mml:mo>)</mml:mo>
														</mml:mrow>
													</mml:mrow>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mn>2</mml:mn>
													<mml:mo>+</mml:mo>
													<mml:mfrac>
														<mml:mrow>
															<mml:mi>B</mml:mi>
															<mml:mo>-</mml:mo>
															<mml:mi>R</mml:mi>
														</mml:mrow>
														<mml:mrow>
															<mml:mrow>
																<mml:mrow>
																	<mml:mi mathvariant="normal">max</mml:mi>
																</mml:mrow>
																<mml:mo>&#x2061;</mml:mo>
																<mml:mrow>
																	<mml:mfenced separators="|">
																		<mml:mrow>
																			<mml:mi>R</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>G</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>B</mml:mi>
																		</mml:mrow>
																	</mml:mfenced>
																</mml:mrow>
															</mml:mrow>
															<mml:mo>-</mml:mo>
															<mml:mrow>
																<mml:mrow>
																	<mml:mi mathvariant="normal">min</mml:mi>
																</mml:mrow>
																<mml:mo>&#x2061;</mml:mo>
																<mml:mrow>
																	<mml:mfenced separators="|">
																		<mml:mrow>
																			<mml:mi>R</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>G</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>B</mml:mi>
																		</mml:mrow>
																	</mml:mfenced>
																</mml:mrow>
															</mml:mrow>
														</mml:mrow>
													</mml:mfrac>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>f</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>G</mml:mi>
													<mml:mo>=</mml:mo>
													<mml:mrow>
														<mml:mrow>
															<mml:mi mathvariant="normal">max</mml:mi>
														</mml:mrow>
														<mml:mo>&#x2061;</mml:mo>
														<mml:mrow>
															<mml:mfenced separators="|">
																<mml:mrow>
																	<mml:mi>R</mml:mi>
																	<mml:mo>,</mml:mo>
																	<mml:mi>G</mml:mi>
																	<mml:mo>,</mml:mo>
																	<mml:mi>B</mml:mi>
																</mml:mrow>
															</mml:mfenced>
														</mml:mrow>
													</mml:mrow>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mfrac>
														<mml:mrow>
															<mml:mi>R</mml:mi>
															<mml:mo>-</mml:mo>
															<mml:mi>G</mml:mi>
														</mml:mrow>
														<mml:mrow>
															<mml:mrow>
																<mml:mrow>
																	<mml:mi mathvariant="normal">max</mml:mi>
																</mml:mrow>
																<mml:mo>&#x2061;</mml:mo>
																<mml:mrow>
																	<mml:mfenced separators="|">
																		<mml:mrow>
																			<mml:mi>R</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>G</mml:mi>
																			<mml:mo>,</mml:mo>
																			<mml:mi>B</mml:mi>
																		</mml:mrow>
																	</mml:mfenced>
																	<mml:mo>-</mml:mo>
																	<mml:mi mathvariant="normal">m</mml:mi>
																	<mml:mi mathvariant="normal">i</mml:mi>
																	<mml:mi mathvariant="normal">n</mml:mi>
																	<mml:mo>&#x2061;</mml:mo>
																	<mml:mo>(</mml:mo>
																	<mml:mi>R</mml:mi>
																	<mml:mo>,</mml:mo>
																	<mml:mi>G</mml:mi>
																	<mml:mo>,</mml:mo>
																	<mml:mi>B</mml:mi>
																	<mml:mo>)</mml:mo>
																</mml:mrow>
															</mml:mrow>
														</mml:mrow>
													</mml:mfrac>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>f</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>B</mml:mi>
													<mml:mo>=</mml:mo>
													<mml:mi>m</mml:mi>
													<mml:mi>a</mml:mi>
													<mml:mi>x</mml:mi>
													<mml:mo>&#x2061;</mml:mo>
													<mml:mo>(</mml:mo>
													<mml:mi>R</mml:mi>
													<mml:mo>,</mml:mo>
													<mml:mi>G</mml:mi>
													<mml:mo>,</mml:mo>
													<mml:mi>B</mml:mi>
													<mml:mo>)</mml:mo>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
									</mml:mtable>
								</mml:mrow>
							</mml:mfenced>
						</mml:math>
						<label>[3]</label>
					</disp-formula>
					<p>For our purposes, and due to its advantages, the HSV model was chosen to detect the different colours present on the granite slabs.</p>
				</sec>
			</sec>
			<sec id="sec2.2">
				<label>2.2.</label>
				<title>Workflow implemented</title>
				<p>The presented program uses a computer-vision-based approach to identify different colour bands on granite slabs and output a numerical code defined by the colour of each band. The workflow diagram of the proposed system is presented in <xref ref-type="fig" rid="f3">Figure 3</xref>, where the following stages are introduced: (<xref ref-type="bibr" rid="B1">1</xref>) data acquisition, (<xref ref-type="bibr" rid="B2">2</xref>) image pre-processing, and (<xref ref-type="bibr" rid="B3">3</xref>) image analysis. This workflow is repersented graphically in <xref ref-type="fig" rid="f2">Figure 2</xref>.</p>
				<fig id="f2">
					<label>Figure 2</label>
					<caption>
						<title>Workflow of the proposed computer vision system with the following steps: (<xref ref-type="bibr" rid="B1">1</xref>) data acquisition: the pictures used were taken under different lighting conditions -cloudy and sunny days- as well as varying distances and angles to the side of the granite slab, (<xref ref-type="bibr" rid="B2">2</xref>) image pre-processing: images are scaled to a 15% of their original size and the target area is cropped by the user. (<xref ref-type="bibr" rid="B3">3</xref>) Colour detection: conversion between the RGB and HSV colour spaces and thresholds are implemented to isolate the colour bands, (<xref ref-type="bibr" rid="B4">4</xref>) colour identification: blurring, binarization, and contour detection help retrieve the coordinates of each colour band which define the order of the resulting numerical code of the granite slab.</title>
					</caption>
					<graphic id="gra-2" xlink:href="MC-73-351-e323-gf2.png"/>
				</fig>
				<sec id="sec2.2.1">
					<label>2.2.1.</label>
					<title>Data acquisition</title>
					<p>The images were obtained <italic>in situ,</italic> under the effect of the changing conditions of the environment, and analysed afterward. As a simple requirement, the colour bands must be completely visible. This means that the picture cannot be taken up too close to the point some colours are left out of the image or from a very distant location where the colour bands are unidentifiable. The RGB pictures that make up the database of the case studied were taken in three separate batches under non-identical conditions. Their features are shown in <xref ref-type="table" rid="t2">Table 2</xref>.</p>
					<table-wrap id="t2">
						<label>Table 2</label>
						<caption>
							<title>Description of the different batches of pictures that make up the database. The first two columns show the name of the batch and the number of pictures. The next three columns include the distance between the camera and the granite slab, the angle of the camera and the slab, and the area where the picture is focused. The last three columns include the proportion of pictures taken in inside lighting conditions, outside and the resolution of the images, respectively.</title>
						</caption>
						<table>
							<colgroup>
								<col/>
								<col/>
								<col/>
								<col/>
								<col/>
								<col/>
								<col/>
								<col/>
							</colgroup>
							<thead>
								<tr>
									<th align="center">Name</th>
									<th align="center"># Pictures</th>
									<th align="center">Distance (m)</th>
									<th align="center">Angle (&#xba;)</th>
									<th align="center">Focus</th>
									<th align="center" colspan="2">Lighting </th>
									<th align="center">Resolution (pixels)</th>
								</tr>
								<tr>
									<th align="left"> </th>
									<th align="left"> </th>
									<th align="left"> </th>
									<th align="left"> </th>
									<th align="left"> </th>
									<th align="center">Inside</th>
									<th align="center">Outside</th>
									<th align="left"> </th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td align="center">Batch1</td>
									<td align="center">14</td>
									<td align="center">1</td>
									<td align="center">Not consistent</td>
									<td align="center">Colour bands</td>
									<td align="center">100%</td>
									<td align="center">0.00%</td>
									<td align="center">3472x4640</td>
								</tr>
								<tr>
									<td align="center">Bacth2</td>
									<td align="center">40</td>
									<td align="center">1.75</td>
									<td align="center">Parallel</td>
									<td align="center">Colour bands</td>
									<td align="center">27.50%</td>
									<td align="center">72.50%</td>
									<td align="center">3024x4032</td>
								</tr>
								<tr>
									<td align="center">Batch3</td>
									<td align="center">84</td>
									<td align="center">2</td>
									<td align="center">Parallel</td>
									<td align="center">Granite slabs</td>
									<td align="center">25.90%</td>
									<td align="center">74.10%</td>
									<td align="center">3024x4032</td>
								</tr>
							</tbody>
						</table>
					</table-wrap>
				</sec>
				<sec id="sec2.2.2">
					<label>2.2.2.</label>
					<title>Image pre-processing</title>
					<p>The pre-processing of the images includes two main operations. In the first place, pictures are scaled down to 15% of their initial dimension, decreasing the computational load without compromising the final outcome. Furthermore, the program allows the user to crop out the area where the colour bands are captured on the scaled picture, which entails an increase in the overall accuracy of the results obtained.</p>
				</sec>
				<sec id="sec2.2.3">
					<label>2.2.3.</label>
					<title>Image analysis</title>
					<p>The different colour bands are detected by a total number of eight functions, one for every colour. They share a common algorithm (algorithm 1), but the input parameters change depending on each target colour. These inputs are not arbitrary; initially, they were set manually, but in order to increase the precision of the model, the parameters have to be optimized for every case. This is achieved in the training process, which aims to minimize the error in colour detection and the decryption of the code. In order to accomplish this, each colour detection algorithm iterates on the available images for every combination possible within the ranges set for each parameter. A success condition is defined based on the ground truth of colours contained in each image. This helps identify those combinations which succeed in their task, therefore, those parameters with a higher number of true positives become the ideal values in each function.</p>
					<p>The input parameters for all functions are -1- coloured area (CA), -2- coloured ratio (CR), -3- width-to-height ratio (WHR), -4- maximum vertical distance (MVD), -5- minimum Hue (Hmin), -6- minimum Saturation (Smin), -7- minimum Value (Vmin), -8- maximum Hue (Hmax), -9- maximum Saturation (Smax), and -10- maximum Value (Vmax).</p>
					<p>The coloured area -1- defines the minimum number of pixels that have to be turned on to be considered a true positive case of colour detection, while the colour ratio -2- is given by the relation between the number of pixels coloured with the target colour and the total amount of pixels; it has the same goal as the coloured area but implements a second layer of security to avoid false positives. The width/height ratio -3- analyses the relation between the width and the height of the colour areas detected. Given the fact that the colour bands have rectangular shapes, this parameter aims to discard all detected areas which do not have the minimum width-to-height ratios, such as shades or colour spots that do not belong to the colour code system. The minimum vertical distance -4- quantifies the required separation between different colour bands to be considered independent. These bands are drawn directly on the granite block, which is cut afterward to generate the granite slabs, in this process the colour bands are also divided into several sections. As a consequence of this division, gaps are generated throughout every colour band, with a direct effect on the colour detection process. When the picture is taken, these gaps are usually shown as dark spaces that break up the colour band, as a result, several coloured areas will be identified, but thanks to the implementation of this parameter, as long as the detected areas are within the height range set by the MVD, they will be considered as a single band. Lastly, parameters from 5 to 10 belong to the HSV colour space and define the thresholds for each colour.</p>
					<p>Each colour function takes the RGB image, proceeds with the HSV transformation, and applies the colour thresholds on the resulting image. In this case, an adaptive multichannel threshold was implemented to identify colour in a more reliable way under the wide variety of lighting conditions presented in this problem. The first of the colour masks takes the lowest hue, saturation, and value possible for the target colour, delimiting the range for these three channels. Therefore, once the mask is applied to the HSV picture, the resulting image is binarized as the pixels that are defined within this range are turned into white [1] and the ones which fall out of this condition are turned off to display black [0]. The mathematical principle of this method is introduced in Equation [<xref ref-type="disp-formula" rid="e4">4</xref>]:</p>
					<disp-formula id="e4">
						<mml:math id="mml-4">
							<mml:mi>I</mml:mi>
							<mml:mo>=</mml:mo>
							<mml:mfenced close="" open="{" separators="|">
								<mml:mrow>
									<mml:mtable>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mn>1</mml:mn>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>f</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>H</mml:mi>
													<mml:mi>&#x3f5;</mml:mi>
													<mml:mfenced close="]" open="[" separators="|">
														<mml:mrow>
															<mml:msub>
																<mml:mrow>
																	<mml:mi>H</mml:mi>
																</mml:mrow>
																<mml:mrow>
																	<mml:mi>m</mml:mi>
																	<mml:mi>i</mml:mi>
																	<mml:mi>n</mml:mi>
																</mml:mrow>
															</mml:msub>
															<mml:mo>,</mml:mo>
															<mml:mi>&#xa0;</mml:mi>
															<mml:msub>
																<mml:mrow>
																	<mml:mi>H</mml:mi>
																</mml:mrow>
																<mml:mrow>
																	<mml:mi>m</mml:mi>
																	<mml:mi>a</mml:mi>
																	<mml:mi>x</mml:mi>
																</mml:mrow>
															</mml:msub>
														</mml:mrow>
													</mml:mfenced>
													<mml:mo>&#x2227;</mml:mo>
													<mml:mi>S</mml:mi>
													<mml:mi>&#x3f5;</mml:mi>
													<mml:mfenced close="]" open="[" separators="|">
														<mml:mrow>
															<mml:msub>
																<mml:mrow>
																	<mml:mi>S</mml:mi>
																</mml:mrow>
																<mml:mrow>
																	<mml:mi>m</mml:mi>
																	<mml:mi>i</mml:mi>
																	<mml:mi>n</mml:mi>
																</mml:mrow>
															</mml:msub>
															<mml:mo>,</mml:mo>
															<mml:msub>
																<mml:mrow>
																	<mml:mi>S</mml:mi>
																</mml:mrow>
																<mml:mrow>
																	<mml:mi>m</mml:mi>
																	<mml:mi>a</mml:mi>
																	<mml:mi>x</mml:mi>
																</mml:mrow>
															</mml:msub>
														</mml:mrow>
													</mml:mfenced>
													<mml:mo>&#x2227;</mml:mo>
													<mml:mi>V</mml:mi>
													<mml:mi>&#x3f5;</mml:mi>
													<mml:mfenced close="]" open="[" separators="|">
														<mml:mrow>
															<mml:msub>
																<mml:mrow>
																	<mml:mi>V</mml:mi>
																</mml:mrow>
																<mml:mrow>
																	<mml:mi>m</mml:mi>
																	<mml:mi>i</mml:mi>
																	<mml:mi>n</mml:mi>
																</mml:mrow>
															</mml:msub>
															<mml:mo>,</mml:mo>
															<mml:msub>
																<mml:mrow>
																	<mml:mi>V</mml:mi>
																</mml:mrow>
																<mml:mrow>
																	<mml:mi>m</mml:mi>
																	<mml:mi>a</mml:mi>
																	<mml:mi>x</mml:mi>
																</mml:mrow>
															</mml:msub>
														</mml:mrow>
													</mml:mfenced>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mn>0</mml:mn>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>o</mml:mi>
													<mml:mi>t</mml:mi>
													<mml:mi>h</mml:mi>
													<mml:mi>e</mml:mi>
													<mml:mi>r</mml:mi>
													<mml:mi>w</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>s</mml:mi>
													<mml:mi>e</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
									</mml:mtable>
								</mml:mrow>
							</mml:mfenced>
						</mml:math>
						<label>[4]</label>
					</disp-formula>
					<p>Where H is hue, S is saturation, and V is value. Similarly, the second mask applies the same principle and methodology, but in this case, it takes the highest values of hue, saturation, and value for the target colour. The sum of both masks is applied to the original image, concluding the detection of the target colour in every case.</p>
					<p>In the case that the resulting image delivered by the colour detection algorithm fulfils the requirement established by the CR parameter, the image is proposed for further processing, where the coordinates of the colour bands identified are extracted. This process begins with the detection of the contours of all isolated coloured areas. To achieve this, the picture is converted to grayscale and blurred out with the implementation of Gaussian blur. This helps reduce the sharpness of the structures contained in the picture and increases the efficiency of the contour detection method.</p>
					<p>Gaussian blur is classified as a low-pass filter because it reduces the high-frequency components of the image. It uses Equation [<xref ref-type="disp-formula" rid="e5">5</xref>] explained in (<xref ref-type="bibr" rid="B29">29</xref>, <xref ref-type="bibr" rid="B30">30</xref>):</p>
					<disp-formula id="e5">
						<mml:math id="mml-5">
							<mml:mi>G</mml:mi>
							<mml:mfenced separators="|">
								<mml:mrow>
									<mml:mi>x</mml:mi>
									<mml:mo>,</mml:mo>
									<mml:mi>y</mml:mi>
								</mml:mrow>
							</mml:mfenced>
							<mml:mo>=</mml:mo>
							<mml:mfrac>
								<mml:mrow>
									<mml:mn>1</mml:mn>
								</mml:mrow>
								<mml:mrow>
									<mml:msup>
										<mml:mrow>
											<mml:mn>2</mml:mn>
											<mml:mi>&#x3c0;</mml:mi>
											<mml:mi>&#x3c3;</mml:mi>
										</mml:mrow>
										<mml:mrow>
											<mml:mn>2</mml:mn>
										</mml:mrow>
									</mml:msup>
								</mml:mrow>
							</mml:mfrac>
							<mml:msup>
								<mml:mrow>
									<mml:mi>e</mml:mi>
								</mml:mrow>
								<mml:mrow>
									<mml:mi>-</mml:mi>
									<mml:mfrac>
										<mml:mrow>
											<mml:msup>
												<mml:mrow>
													<mml:mi>x</mml:mi>
												</mml:mrow>
												<mml:mrow>
													<mml:mn>2</mml:mn>
												</mml:mrow>
											</mml:msup>
											<mml:mo>+</mml:mo>
											<mml:msup>
												<mml:mrow>
													<mml:mi>y</mml:mi>
												</mml:mrow>
												<mml:mrow>
													<mml:mn>2</mml:mn>
												</mml:mrow>
											</mml:msup>
										</mml:mrow>
										<mml:mrow>
											<mml:mn>2</mml:mn>
											<mml:msup>
												<mml:mrow>
													<mml:mi>&#x3c3;</mml:mi>
												</mml:mrow>
												<mml:mrow>
													<mml:mn>2</mml:mn>
												</mml:mrow>
											</mml:msup>
										</mml:mrow>
									</mml:mfrac>
								</mml:mrow>
							</mml:msup>
						</mml:math>
						<label>[5]</label>
					</disp-formula>
					<p>Where <italic>x</italic> is the distance from the origin in the horizontal axis, <italic>y</italic> is the distance from the origin in the vertical axis, and &#x3c3; is the standard deviation of the Gaussian distribution. Applying Equation <xref ref-type="disp-formula" rid="e5">5</xref> produces a surface on which contours are concentric circles with a Gaussian distribution from the centre point. The convolution matrix, built from the values of this distribution, is applied to the original image, where the new value of each pixel is set to a weighted average of the pixels in its surrounding area. The pixels further away from the centre (original pixel) receive smaller weights as the distance increases, while the original holds the highest value. This helps preserve boundaries and edges in a better way compared to simpler filters. Additionally, the blurred image is binarized before applying contour detection, in this step all pixels that are black remain in this state, while the rest are converted into white according to Equation [<xref ref-type="disp-formula" rid="e6">6</xref>]:</p>
					<disp-formula id="e6">
						<mml:math id="mml-6">
							<mml:mi>d</mml:mi>
							<mml:mi>s</mml:mi>
							<mml:mi>t</mml:mi>
							<mml:mo>(</mml:mo>
							<mml:mi>x</mml:mi>
							<mml:mo>,</mml:mo>
							<mml:mi>y</mml:mi>
							<mml:mo>)</mml:mo>
							<mml:mo>=</mml:mo>
							<mml:mfenced close="" open="{" separators="|">
								<mml:mrow>
									<mml:mtable>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mn>1</mml:mn>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>f</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>s</mml:mi>
													<mml:mi>r</mml:mi>
													<mml:mi>c</mml:mi>
													<mml:mfenced separators="|">
														<mml:mrow>
															<mml:mi>x</mml:mi>
															<mml:mo>,</mml:mo>
															<mml:mi>y</mml:mi>
														</mml:mrow>
													</mml:mfenced>
													<mml:mi>&#x3f5;</mml:mi>
													<mml:mo>(</mml:mo>
													<mml:mn>0</mml:mn>
													<mml:mo>,</mml:mo>
													<mml:mfenced close="]" open="" separators="|">
														<mml:mrow>
															<mml:mn>1</mml:mn>
														</mml:mrow>
													</mml:mfenced>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
										<mml:mtr>
											<mml:mtd>
												<mml:mrow>
													<mml:maligngroup/>
													<mml:mn>0</mml:mn>
													<mml:mo>,</mml:mo>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>&#xa0;</mml:mi>
													<mml:mi>o</mml:mi>
													<mml:mi>t</mml:mi>
													<mml:mi>h</mml:mi>
													<mml:mi>e</mml:mi>
													<mml:mi>r</mml:mi>
													<mml:mi>w</mml:mi>
													<mml:mi>i</mml:mi>
													<mml:mi>s</mml:mi>
													<mml:mi>e</mml:mi>
												</mml:mrow>
											</mml:mtd>
										</mml:mtr>
									</mml:mtable>
								</mml:mrow>
							</mml:mfenced>
						</mml:math>
						<label>[6]</label>
					</disp-formula>
					<p>Where <italic>src</italic> is the source image, and <italic>dst</italic> is the destination image of the same size and type as the source. The contour detection method, as defined Suzuki and Abe (<xref ref-type="bibr" rid="B31">31</xref>, <xref ref-type="bibr" rid="B32">32</xref>), is a border following algorithm, which works by starting at a given point on the image and following the contour of the object until it returns to the starting point. The algorithm keeps track of the points visited along the contour, as well as the junctions (i.e., points where the contour branches or reconnects) encountered along the way. In this process, those areas of the picture with an intensity gradient strong enough to be noticed by the algorithm are detected and marked up with individual points. The result is a point cloud surrounding the different structures featured in the image. By leveraging this result, the area that encloses the colour band is defined with the aid of Green&#x2019;s theorem (<xref ref-type="bibr" rid="B33">33</xref>). Such theorem relates the circulation of a vector field around a closed curve to the flux through the surface bounded by that curve. It states that the circulation of a vector field around a closed curve is equal to the flux of the curl of through the surface bounded by , as expressed mathematically in Equation [<xref ref-type="disp-formula" rid="e7">7</xref>]:</p>
					<disp-formula id="e7">
						<mml:math id="mml-7">
							<mml:mrow>
								<mml:msubsup>
									<mml:mo stretchy="false">&#x222e;</mml:mo>
									<mml:mrow>
										<mml:mi>c</mml:mi>
									</mml:mrow>
									<mml:mrow/>
								</mml:msubsup>
								<mml:mrow>
									<mml:mi>F</mml:mi>
									<mml:mi>*</mml:mi>
									<mml:mi>d</mml:mi>
									<mml:mi>r</mml:mi>
									<mml:mo>=</mml:mo>
									<mml:mrow>
										<mml:mo stretchy="false">&#x222c;</mml:mo>
										<mml:mrow>
											<mml:mi>S</mml:mi>
											<mml:mi>*</mml:mi>
											<mml:mi>c</mml:mi>
											<mml:mi>u</mml:mi>
											<mml:mi>r</mml:mi>
											<mml:mfenced separators="|">
												<mml:mrow>
													<mml:mi>f</mml:mi>
												</mml:mrow>
											</mml:mfenced>
											<mml:mi>*</mml:mi>
											<mml:mi>d</mml:mi>
											<mml:mi>S</mml:mi>
										</mml:mrow>
									</mml:mrow>
								</mml:mrow>
							</mml:mrow>
						</mml:math>
						<label>[7]</label>
					</disp-formula>
					<p>Here, <italic>dr</italic> is an infinitesimal line element along the curve <italic>C</italic>, and <italic>dS</italic> is an infinitesimal surface element on <italic>S</italic>. The circulation is the line integral of <italic>F</italic> along <italic>C</italic>, and the flux is the double integral of the curl of <italic>F</italic> over the surface <italic>C</italic>. The curl of a vector field is defined as a measure of the local rotation or twisting of the field. It is defined as the vector cross-product of the <italic>del</italic> operator and <italic>F</italic>:</p>
					<disp-formula id="e8">
						<mml:math id="mml-8">
							<mml:mi>c</mml:mi>
							<mml:mi>u</mml:mi>
							<mml:mi>r</mml:mi>
							<mml:mi>l</mml:mi>
							<mml:mfenced separators="|">
								<mml:mrow>
									<mml:mi>F</mml:mi>
								</mml:mrow>
							</mml:mfenced>
							<mml:mo>=</mml:mo>
							<mml:mi>x</mml:mi>
							<mml:mi>&#xa0;</mml:mi>
							<mml:mi>F</mml:mi>
						</mml:math>
						<label>[8]</label>
					</disp-formula>
					<p>In the case that the obtained coloured area is bigger than CA, the contours are drawn, and their length is calculated. Next, the irregular and complex shape of the contours is simplified to a rectangle, which contains each valid colour area detected. This is achieved with the Ramer-Douglas-Peucker algorithm (<xref ref-type="bibr" rid="B34">34</xref>, <xref ref-type="bibr" rid="B35">35</xref>), which reduces the number of points in a curve through approximation, resulting in a smaller series of points. The algorithm works by recursively eliminating points that are within a given tolerance of the curve. This process is repeated until the desired tolerance is achieved. The resulting curve is typically a simplified version of the original curve, with fewer points but still closely approximating the original curve. Given that the colour bands tend to have fairly rectangular shapes, a rectangle was selected for this purpose, which wraps all around every area defined in this step. <xref ref-type="fig" rid="f3">Figure 3</xref> shows a simplified configuration of these rectangles.</p>
					<fig id="f3">
						<label>Figure 3</label>
						<caption>
							<title>Illustrative representation of how the coordinates of the wrapping rectangle are selected. These are defined by the maximum and minimum values of x and y contained within the perimeter of the coloured area.</title>
						</caption>
						<graphic id="gra-3" xlink:href="MC-73-351-e323-gf3.png"/>
					</fig>
					<p>Up until this last step, there can be coloured areas of the picture that fulfil all the requirements to be considered as colour bands, but in reality, they are not. Therefore, the parameter WHR is introduced, which sets a limit to the numeric relation between width and height for every rectangle. It allows filtering out the vast majority of areas with rectangular shapes, eliminating those in which the vertical sides are the longest.</p>
					<p>Following up comes the implementation of the last parameter, MVD. As explained before in this section, its goal is to group under the same band those areas with equal colour, but which are broken down into smaller rectangles as seen in <xref ref-type="fig" rid="f4">Figure 4</xref>. This step avoids the anomalous detection of a not realistic number of bands. The relative coordinates of each band are retrieved from the information contained in the rectangles. For this particular application, the coordinates are sorted from least to greatest and analysed in this order. In the case the result of the subtraction between <italic>i</italic> + 1 and <italic>i</italic> is smaller than the MVD, those two rectangles would be considered as the same colour band, otherwise, they would be set to belong to separate colour bands. Lastly, the average of all the coordinates belonging to each colour band is calculated to get a single value per band, which allows the algorithm to read the colours and write the code in the correct order. This process is represented in <xref ref-type="fig" rid="f5">Figure 5</xref>.</p>
					<fig id="f4">
						<label>Figure 4</label>
						<caption>
							<title>Example of a faded green colour band in which the algorithm detects two different sections. This scenario could account for a wrong number of bands, but the implementation of the maximum vertical distance (MVD) parameter limits the amount of space between bands to be considered as such and joins under a single band those which have similar y coordinates.</title>
						</caption>
						<graphic id="gra-4" xlink:href="MC-73-351-e323-gf4.png"/>
					</fig>
					<fig id="f5">
						<label>Figure 5</label>
						<caption>
							<title>Simplified representation of the process followed by the algorithm to group together detected areas or assign them to separate colour bands. Firstly, the coordinates are sorted from least to greatest and put together if the result of their subtraction is smaller than the number defined by the maximum vertical distance parameter, otherwise, they are divided into different colour bands.</title>
						</caption>
						<graphic id="gra-5" xlink:href="MC-73-351-e323-gf5.png"/>
					</fig>
					<p>
						<bold>Algorithm 1</bold>. [colour_detector(image, CA, CR, WHR, MVD, Hmin, Smin, Vmin, Hmax, Smax, Vmax)]</p>
					<p>
						<bold>Input</bold>: An image and all the parameters defined.</p>
					<p>
						<bold>Output</bold>: A list containing the (x, y) coordinates of each colour band and the colour name.</p>
					<list list-type="simple">
						<list-item>
							<p>1. image &#x2190; RGB2HSV(image)</p>
						</list-item>
						<list-item>
							<p>2. masked_image &#x2190; thresholds(image)</p>
						</list-item>
						<list-item>
							<p>3. binarized_image &#x2190; bitwise_and(image, masked_image)</p>
						</list-item>
						<list-item>
							<p>4. coloured_ratio &#x2190; (# active pixels in binarized_image)/(# total pixels in binarized_image)</p>
						</list-item>
						<list-item>
							<p>5. <bold>if</bold> coloured_ratio &#x2265; CR:</p>
							<list list-type="simple">
								<list-item>
									<p>6. gray_image &#x2190; BRG2GRAY(masked_image)</p>
								</list-item>
								<list-item>
									<p>7. blured_image &#x2190; GaussianBlur(gray_image)</p>
								</list-item>
								<list-item>
									<p>8. binary_thresholded_image &#x2190; bin_threshold(blured_image). Pixels turned on are set to white, otherwise to black.</p>
								</list-item>
								<list-item>
									<p>9. Initialize a list that will store the vertical coordinate of the upper-right corner of each bounding box (yColor)</p>
								</list-item>
								<list-item>
									<p>10. Initialize a list that will store the horizontal coordinates of the bounding boxes (ys)</p>
								</list-item>
								<list-item>
									<p>11. Initialize a list that will store the vertical coordinates of the bounding boxes (xs)</p>
								</list-item>
								<list-item>
									<p>12. contours &#x2190; findContours(binary_thresholded_image)</p>
								</list-item>
								<list-item>
									<p>13. <bold>for</bold> i in contours:</p>
									<list list-type="simple">
										<list-item>
											<p>14. area &#x2190; contourArea(i)</p>
										</list-item>
										<list-item>
											<p>15. <bold>if</bold> area &gt; CA:</p>
											<list list-type="simple">
												<list-item>
													<p>16. drawContour(image, i)</p>
												</list-item>
												<list-item>
													<p>17. perimeter &#x2190; arcLenght(i)</p>
												</list-item>
												<list-item>
													<p>18. corners &#x2190; approxPolyDP(i, 0.015*perimiter)</p>
												</list-item>
												<list-item>
													<p>19. x, y, width, height &#x2190; boundintRect(corners)</p>
												</list-item>
												<list-item>
													<p>20. <bold>if</bold> width/height &#x2265; WHR:</p>
													<list list-type="simple">
														<list-item>
															<p> 21. yColor &#x2190; store(y)</p>
														</list-item>
														<list-item>
															<p> 22. xs &#x2190; store(x, x+widht)</p>
														</list-item>
														<list-item>
															<p> 23. ys &#x2190; store(y, y+height)</p>
														</list-item>
														<list-item>
															<p>24. drawRectangle(img, (x, y), (x+width, y+height))</p>
														</list-item>
													</list>
												</list-item>
											</list>
										</list-item>
									</list>
								</list-item>
								<list-item>
									<p> 25. <bold>if</bold> yColor NOT empty:</p>
									<list list-type="simple">
										<list-item>
											<p> 26. coordinates &#x2190; group if yColor if &lt; MVD value.</p>
										</list-item>
									</list>
								</list-item>
							</list>
						</list-item>
						<list-item>
							<p>27. Return dictionary with coordinates and colour name.</p>
						</list-item>
					</list>
					<p>The final algorithm (algorithm 2) takes an image as input and return the corresponding numerical code encrypted in the colour bands. All colour detection functions are integrated in its architecture. Additionally, this algorithm sorts the obtained coordinates of each colour to be able to output the numerical code in the correct order. Regarding the order in which the coordinates are sorted, this is defined by the position of the different colour bands, meaning that if the bands are placed closer to the top of the slab, the reading direction is downwards, while the reading direction changes to upwards if the bands are placed closer to the bottom of the slab. Essentially, the colour code has to be decrypted starting with the bands which are close to one of the horizontal edges, and the algorithm knows this by checking which colour band, the higher or the lower one, is close to a horizontal edge. By knowing which colour corresponds to which number, retrieving the coordinates of each colour band, and defining the appropriate reading direction, the algorithm can output the encrypted code correctly.</p>
					<p>
						<bold>Algorithm 2</bold>. [code_decryptor(image, )]</p>
					<p>
						<bold>Input</bold>: An image and a matrix with all parameters for each colour detection function.</p>
					<p>
						<bold>Output</bold>: The numerical code encrypted in the colour bands draw on the granite slates.</p>
					<list list-type="order">
						<list-item>
							<p>dict(coordinates, color_name) &#x2190; colour_detector(image, )</p>
						</list-item>
						<list-item>
							<p>dict(sorted_coordinates, sorted_color_names) &#x2190; sort(coordinates, color_name)</p>
						</list-item>
						<list-item>
							<p>numerical_code &#x2190; convert the sorted_color_names into numerical code according to <xref ref-type="table" rid="t1">Table 1</xref>.</p>
						</list-item>
						<list-item>
							<p>Return the numeric code contained in the image.</p>
						</list-item>
					</list>
				</sec>
			</sec>
			<sec id="sec2.3">
				<label>2.3.</label>
				<title>Training and validation</title>
				<p>For this task, the database, which contains a total of 130 pictures, is divided into two different sets: the training set which has 109 images, and the validation set with 21 images, which contain all colours studied and are representative of the characteristics of the database as well as the main challenges for the computer vision system. All functions are trained and validated respectively on those images that have the corresponding target colour. The same database structure was used to implement the final algorithm, which is capable of detecting all colours and decrypting the code associated. In the training process, each function analyses those images which contain their respective colour. If the detection result agrees with the ground truth provided for every image, the combination of parameters that achieved a satisfactory output is rewarded. Finally, the combination of parameters that has the better performance is considered the final input values for each corresponding colour function.</p>
				<p>Since the colour functions need initial parameters to start off the training process, they are given approximate values calculated manually based on the HSV definition of each colour for the hue, value, and saturation parameters, while CA, CR, WHR, and MVD are iterated from zero to their highest value, being the last one determined from direct analysis of the image features.</p>
			</sec>
		</sec>
		<sec id="sec3" sec-type="results|discussion">
			<label>3.</label>
			<title>Results and discussion</title>
			<p>The training process for each function defined the ideal values for the parameters that the colour detection functions depend on. These results are presented in <xref ref-type="table" rid="t3">Table 3</xref>, where the first column contains the name of the different colours present on the slabs. The next four columns contain information regarding the geometrical characteristics of the colour bands, and the rest of the columns present the hue, saturation and value limits for each colour threshold. </p>
			<p>It is noticeable how, in the training process, the colour ratio (CR) between the number of active pixels after applying the thresholds and the total number of pixels in the image tends to zero. This is due to the presence of some faint and weathered colour bands that would not be detected otherwise. If CR took higher values, some of these images, which actually contain areas of interest, would get discarded and count as a classification error. Additionally, the results presented in <xref ref-type="table" rid="t3">Table 3</xref> show how the hue measure is the most effective in isolating different colours compared to the saturation and value. The difference between the maximum and minimum hue values is the smallest in all colours except black, which need to be isolated with the aid of the value variable. This reduces the importance of the two other parameters (saturation and value), which leads to them having more wide ranges explaining the reasoning behind the higher limit of the saturation and value threshold having the maximum number possible (255) in almost all cases. An exception to this rule is the colour black, which has to be isolated with the aid of the value parameter.</p>
			<table-wrap id="t3">
				<label>Table 3</label>
				<caption>
					<title>Final input parameters for each colour function obtained by the algorithm after the training process on the 109 images available in the database. The first four parameters are directly related to the geometrical features of the colour bands, while the six last columns present the different ranges in the hue, saturation, and value for the detection of each colour.</title>
				</caption>
				<table>
					<colgroup>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
					</colgroup>
					<thead>
						<tr>
							<th align="center">Colour</th>
							<th align="center">CA</th>
							<th align="center">CR</th>
							<th align="center">WHR</th>
							<th align="center">MVD</th>
							<th align="center">Hmin</th>
							<th align="center">Smin</th>
							<th align="center">Vmin</th>
							<th align="center">Hmax</th>
							<th align="center">Smax</th>
							<th align="center">Vmax</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td align="center" style="background:#000000;color: white">Black</td>
							<td align="center">50</td>
							<td align="center">0</td>
							<td align="center">0.8</td>
							<td align="center">16</td>
							<td align="center">0</td>
							<td align="center">0</td>
							<td align="center">3</td>
							<td align="center">179</td>
							<td align="center">255</td>
							<td align="center">51</td>
						</tr>
						<tr>
							<td align="center" style="background:#833c0b">Dark Brown</td>
							<td align="center">300</td>
							<td align="center">0</td>
							<td align="center">1.2</td>
							<td align="center">72</td>
							<td align="center">5</td>
							<td align="center">49</td>
							<td align="center">64</td>
							<td align="center">15</td>
							<td align="center">255</td>
							<td align="center">128</td>
						</tr>
						<tr>
							<td align="center" style="background:#c45911">Light Brown</td>
							<td align="center">300</td>
							<td align="center">0</td>
							<td align="center">1.2</td>
							<td align="center">72</td>
							<td align="center">14</td>
							<td align="center">74</td>
							<td align="center">132</td>
							<td align="center">18</td>
							<td align="center">255</td>
							<td align="center">165</td>
						</tr>
						<tr>
							<td align="center" style="background:#ff0000">High-hue Red</td>
							<td align="center">50</td>
							<td align="center">0</td>
							<td align="center">0.4</td>
							<td align="center">22</td>
							<td align="center">171</td>
							<td align="center">100</td>
							<td align="center">103</td>
							<td align="center">179</td>
							<td align="center">255</td>
							<td align="center">255</td>
						</tr>
						<tr>
							<td align="center" style="background:#ff0000">Low-hue red</td>
							<td align="center">50</td>
							<td align="center">0</td>
							<td align="center">0.4</td>
							<td align="center">30</td>
							<td align="center">1</td>
							<td align="center">93</td>
							<td align="center">97</td>
							<td align="center">5</td>
							<td align="center">255</td>
							<td align="center">255</td>
						</tr>
						<tr>
							<td align="center" style="background:#ffc000">Orange</td>
							<td align="center">250</td>
							<td align="center">0</td>
							<td align="center">1.1</td>
							<td align="center">29</td>
							<td align="center">6</td>
							<td align="center">112</td>
							<td align="center">116</td>
							<td align="center">15</td>
							<td align="center">255</td>
							<td align="center">255</td>
						</tr>
						<tr>
							<td align="center" style="background:#ffff00">Yellow</td>
							<td align="center">150</td>
							<td align="center">0</td>
							<td align="center">0.2</td>
							<td align="center">16</td>
							<td align="center">23</td>
							<td align="center">69</td>
							<td align="center">42</td>
							<td align="center">43</td>
							<td align="center">255</td>
							<td align="center">255</td>
						</tr>
						<tr>
							<td align="center" style="background:#92d050">Green</td>
							<td align="center">150</td>
							<td align="center">0</td>
							<td align="center">0.8</td>
							<td align="center">18</td>
							<td align="center">40</td>
							<td align="center">60</td>
							<td align="center">0</td>
							<td align="center">80</td>
							<td align="center">255</td>
							<td align="center">255</td>
						</tr>
						<tr>
							<td align="center" style="background:#0070c0">Blue</td>
							<td align="center">100</td>
							<td align="center">0</td>
							<td align="center">0.6</td>
							<td align="center">32</td>
							<td align="center">81</td>
							<td align="center">113</td>
							<td align="center">0</td>
							<td align="center">109</td>
							<td align="center">255</td>
							<td align="center">255</td>
						</tr>
						<tr>
							<td align="center" style="background:#7030a0">Purple</td>
							<td align="center">200</td>
							<td align="center">0</td>
							<td align="center">0.7</td>
							<td align="center">30</td>
							<td align="center">120</td>
							<td align="center">21</td>
							<td align="center">81</td>
							<td align="center">155</td>
							<td align="center">255</td>
							<td align="center">255</td>
						</tr>
					</tbody>
				</table>
			</table-wrap>
			<p>The conditions and the success rate of every colour in the training phase along with the computation time are included in <xref ref-type="table" rid="t4">Table 4</xref>. During the development of the program, it was noticed that the colours red and brown display two different varieties. The changes in the shade of brown have their origin in the weathering of the colour, resulting in two categories: dark brown and light brown. In the case of the red colour, we hypothesize that its variance is heavily dependent on the brightness conditions under which the picture was taken. The presence of clouds in the sky or shadows projected on the granite slabs seems to be a likely cause for a high hue value, while if the light rays hit the granite slab and the shadow is projected backward the value of hue for the red colour tends to be much lower as it is shown in <xref ref-type="table" rid="t3">Table 3</xref>. In order to improve the accuracy, a double mask method was implemented in the algorithm, which works by defining two distinct thresholds for each colour variety but still identifying them as the same colour.</p>
			<table-wrap id="t4">
				<label>Table 4</label>
				<caption>
					<title>Results of the training process for each colour detection function. The average success rate stands at 84.28%. The colour light brown shows the lowest accuracy due to its similarity with orange.</title>
				</caption>
				<table>
					<colgroup>
						<col/>
						<col/>
						<col/>
						<col/>
					</colgroup>
					<thead>
						<tr>
							<th align="center">Colour</th>
							<th align="center">Images</th>
							<th align="center">Success rate</th>
							<th align="center">Total time (sec.)</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td align="center" style="background:#000000;color: white">Black</td>
							<td align="center">32</td>
							<td align="center">90.32%</td>
							<td align="center">0.37</td>
						</tr>
						<tr>
							<td align="center" style="background:#833c0b">Dark Brown</td>
							<td align="center">9</td>
							<td align="center">100.00%</td>
							<td align="center">0.13</td>
						</tr>
						<tr>
							<td align="center" style="background:#c45911">Light Brown</td>
							<td align="center">32</td>
							<td align="center">57.69%</td>
							<td align="center">0.32</td>
						</tr>
						<tr>
							<td align="center" style="background:#ff0000">High-hue Red</td>
							<td align="center">36</td>
							<td align="center">83.33%</td>
							<td align="center">0.29</td>
						</tr>
						<tr>
							<td align="center" style="background:#ff0000">Low-hue red</td>
							<td align="center">65</td>
							<td align="center">79.69%</td>
							<td align="center">0.54</td>
						</tr>
						<tr>
							<td align="center" style="background:#ffc000">Orange</td>
							<td align="center">57</td>
							<td align="center">78.95%</td>
							<td align="center">0.47</td>
						</tr>
						<tr>
							<td align="center" style="background:#ffff00">Yellow</td>
							<td align="center">60</td>
							<td align="center">88.33%</td>
							<td align="center">0.50</td>
						</tr>
						<tr>
							<td align="center" style="background:#92d050">Green</td>
							<td align="center">40</td>
							<td align="center">95.00%</td>
							<td align="center">0.32</td>
						</tr>
						<tr>
							<td align="center" style="background:#0070c0">Blue</td>
							<td align="center">32</td>
							<td align="center">83.97%</td>
							<td align="center">0.28</td>
						</tr>
						<tr>
							<td align="center" style="background:#7030a0">Purple</td>
							<td align="center">38</td>
							<td align="center">85.53%</td>
							<td align="center">0.44</td>
						</tr>
					</tbody>
				</table>
			</table-wrap>
			<p>The results of the validation process for each colour function are presented in <xref ref-type="table" rid="t5">Table 5</xref>. It can be seen in the fourth column that the times required for each calculation decrease in direct proportion to the number of images analysed. The images in this set are completely new for the algorithm, meaning that it has not been trained on them. Therefore, the high success rates in this process confirm that the parameters defined in the training stage are accurate, and the model can read the correct codes of new images which makes it valid.</p>
			<table-wrap id="t5">
				<label>Table 5</label>
				<caption>
					<title>Results for the validation process for each colour detection function. All colours average a success rate of 86.36%.</title>
				</caption>
				<table>
					<colgroup>
						<col/>
						<col/>
						<col/>
						<col/>
					</colgroup>
					<thead>
						<tr>
							<th align="center">Colour</th>
							<th align="center">Images</th>
							<th align="center">Success rate</th>
							<th align="center">Total time (sec.)</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td align="center" style="background:#000000;color: white">Black</td>
							<td align="center">8</td>
							<td align="center">88.89%</td>
							<td align="center">0.14</td>
						</tr>
						<tr>
							<td align="center" style="background:#833c0b">Dark Brown</td>
							<td align="center">4</td>
							<td align="center">75.00%</td>
							<td align="center">0.04</td>
						</tr>
						<tr>
							<td align="center" style="background:#c45911">Light Brown</td>
							<td align="center">4</td>
							<td align="center">75.00%</td>
							<td align="center">0.04</td>
						</tr>
						<tr>
							<td align="center" style="background:#ff0000">High-hue Red</td>
							<td align="center">6</td>
							<td align="center">100.00%</td>
							<td align="center">0.09</td>
						</tr>
						<tr>
							<td align="center" style="background:#ff0000">Low-hue red</td>
							<td align="center">15</td>
							<td align="center">81.25%</td>
							<td align="center">0.13</td>
						</tr>
						<tr>
							<td align="center" style="background:#ffc000">Orange</td>
							<td align="center">10</td>
							<td align="center">80.00%</td>
							<td align="center">0.09</td>
						</tr>
						<tr>
							<td align="center" style="background:#ffff00">Yellow</td>
							<td align="center">13</td>
							<td align="center">85.71%</td>
							<td align="center">0.16</td>
						</tr>
						<tr>
							<td align="center" style="background:#92d050">Green</td>
							<td align="center">9</td>
							<td align="center">100.00%</td>
							<td align="center">0.07</td>
						</tr>
						<tr>
							<td align="center" style="background:#0070c0">Blue</td>
							<td align="center">8</td>
							<td align="center">88.89%</td>
							<td align="center">0.09</td>
						</tr>
						<tr>
							<td align="center" style="background:#7030a0">Purple</td>
							<td align="center">9</td>
							<td align="center">88.89%</td>
							<td align="center">0.09</td>
						</tr>
					</tbody>
				</table>
			</table-wrap>
			<p>After the training and validation of all colour detection functions, these are included in the main architecture of the final algorithm, which is tasked with the detection of each colour band and its conversion into the correctly ordered numerical code. In this case, a result is classified as true when the output of the algorithm matches the exact numerical code an employee would read off the granite slab. Those codes obtained from the algorithm whose numbers are not the same and/or are not placed in the right orders would be considered faults. The colours which present a lower success rate tend to have an important negative effect on the final result. Particularly, light brown can be mistaken for orange, and dark brown can be confused with the low-hue red due to their proximity on the HSV colour space. These conditions make it difficult for the algorithm to achieve a very precise detection on all colours, which hijacks the results leading to a faulty detection, as can be seen in <xref ref-type="fig" rid="f6">Figure 6</xref>.</p>
			<fig id="f6">
				<label>Figure 6</label>
				<caption>
					<title>Faults in the detection of the colour brown in the training set: (a) and (b) failure in the identification of the colour brown due to its proximity to orange in the HSV colour space.</title>
				</caption>
				<graphic id="gra-6" xlink:href="MC-73-351-e323-gf6.png"/>
			</fig>
			<p>The replacement of the colour brown is proposed in order to tackle this issue. The spray paint colours cyan and light green are encouraged due to their strong contrast with the current colours in use, as shown in the HSV hexacone contained in <xref ref-type="fig" rid="f1">Figure 1</xref>. Moreover, the election of the colour pink was motivated by its great endurance to weathering, as it is demonstrated by Alonso-Villar <italic>et al.</italic> (<xref ref-type="bibr" rid="B36">36</xref>). According to these authors (<xref ref-type="bibr" rid="B36">36</xref>), the use of silicate-based paint can be considered as a future line of research to solve the detection problem associated with the erosion of the spray paints currently employed.</p>
			<p>Additionally, most colour detection systems have to operate within steady light conditions (<xref ref-type="bibr" rid="B3">3</xref>, <xref ref-type="bibr" rid="B5">5</xref>, <xref ref-type="bibr" rid="B37">37</xref>, <xref ref-type="bibr" rid="B38">38</xref>) and require stable camera positioning (<xref ref-type="bibr" rid="B39 B40 B41 B42">39-42</xref>), while the system proposed, although not perfect, achieves results in very different conditions. In this case, the algorithm shows a success rate of 74.42% on the training set, while the validation shows an efficiency of 75.00%. Several examples of correct detection are displayed in <xref ref-type="fig" rid="f7">Figure 7</xref>.</p>
			<fig id="f7">
				<label>Figure 7</label>
				<caption>
					<title>Several examples of correct detection of the different colour bands and an accurate output of the code represented by those. Images (b) and (e) display the results yielded by the algorithm in the training set, while image (h) belongs to the validation set. Images (c) and (d) show how the algorithm is able to detect colour bands that are disrupted in the horizontal axis.</title>
				</caption>
				<graphic id="gra-7" xlink:href="MC-73-351-e323-gf7.png"/>
			</fig>
			<p>Several results of the validation process for the final algorithm are shown in <xref ref-type="table" rid="t6">Table 6</xref>. The first column contains the ground truth for each image, which is the numerical code defined by the colour bands in each case. The last column shows the numerical code decrypted by the algorithm from the information represented in the corresponding image of the granite slabs. The rest of the columns contain each of the sorted numbers outputted by the system. According to the success condition previously defined, a result is correct when all numbers match the ones present in the ground truth in the correct order. Two errors can be noted in red in <xref ref-type="table" rid="t6">Table 6</xref>. The result of the fourth code presented (24036) is affected by the detection of a black area out of place, and the same happens in the case of the fifth code of the table (24066). Consequently, the rest of the numbers in the code decrypted are displaced by these anomalous detections of black areas leading to a faulty result. Considering the fact that granite has important black, areas in its structure due to the presence of mica, this becomes the main source of errors, despite the final algorithm having an accuracy of 75.00% in the testing phase.</p>
			<table-wrap id="t6">
				<label>Table 6</label>
				<caption>
					<title>Detailed results obtained by the algorithm on some examples of the validation set. The success condition turns all incorrect and/or out-of-place digits into wrong detections marked in red.</title>
				</caption>
				<table>
					<colgroup>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
						<col/>
					</colgroup>
					<thead>
						<tr>
							<th align="center">Code</th>
							<th align="center">Number 1</th>
							<th align="center">Number 2</th>
							<th align="center">Number 3</th>
							<th align="center">Number 4</th>
							<th align="center">Number 5</th>
							<th align="center">Result</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td align="center">22475</td>
							<td align="center">2</td>
							<td align="center">2</td>
							<td align="center">4</td>
							<td align="center">7</td>
							<td align="center">5</td>
							<td align="center">22475</td>
						</tr>
						<tr>
							<td align="center">23405</td>
							<td align="center">2</td>
							<td align="center">3</td>
							<td align="center">4</td>
							<td align="center">0</td>
							<td align="center">5</td>
							<td align="center">23405</td>
						</tr>
						<tr>
							<td align="center">23457</td>
							<td align="center">2</td>
							<td align="center">3</td>
							<td align="center">4</td>
							<td align="center">5</td>
							<td align="center">7</td>
							<td align="center">23457</td>
						</tr>
						<tr>
							<td align="center">24036</td>
							<td align="center" style="background:#edb1b1">4</td>
							<td align="center" style="background:#edb1b1">0</td>
							<td align="center">0</td>
							<td align="center">3</td>
							<td align="center">6</td>
							<td align="center" style="background:#edb1b1">40036</td>
						</tr>
						<tr>
							<td align="center">24066</td>
							<td align="center">2</td>
							<td align="center">4</td>
							<td align="center">0</td>
							<td align="center">6</td>
							<td align="center" style="background:#edb1b1">0</td>
							<td align="center" style="background:#edb1b1">24060</td>
						</tr>
						<tr>
							<td align="center">24227</td>
							<td align="center">2</td>
							<td align="center">4</td>
							<td align="center">2</td>
							<td align="center">2</td>
							<td align="center">7</td>
							<td align="center">24227</td>
						</tr>
						<tr>
							<td align="center">24465</td>
							<td align="center">2</td>
							<td align="center">4</td>
							<td align="center">4</td>
							<td align="center">6</td>
							<td align="center">5</td>
							<td align="center">24465</td>
						</tr>
						<tr>
							<td align="center">24526</td>
							<td align="center">2</td>
							<td align="center">4</td>
							<td align="center">5</td>
							<td align="center">2</td>
							<td align="center">6</td>
							<td align="center">24526</td>
						</tr>
					</tbody>
				</table>
			</table-wrap>
		</sec>
		<sec id="sec4" sec-type="conclusions">
			<label>4.</label>
			<title>Conclusions</title>
			<p>The traceability problem in the granite industry has been studied in the present research paper. The current method to keep track of the granite blocks until they reach the final product stage is fairly simple and cheap, consisting in the usage of graffiti spray to assign a color-coded number to each granite block. Weathering of the paint and human error due to different causes, such as fatigue, lead to a faulty reading of the numerical code represented by colour bands and ultimately to economic losses for the industry as well as pollution originated by the granite that has not been traced. In this paper, a computer vision algorithm is proposed to automate the traceability process in this industry. The computational method developed operates in the HSV colour space and makes use of a double threshold for the correction isolation of colours on the granite slabs. This is followed by the conversion of the thresholded image to grayscale and the application of Gaussian blurring to soften the edges. After the binarization of the blurred image, contours are detected and the coordinates of those shapes that approximate to rectangular colour bands are extracted. Lastly, those coordinates are sorted and converted into the decrypted numerical code.</p>
			<p>The proposed system performs an accurate detection of a combination of seven out of the eight colours used in the granite industry. It shows success rates on the reading of colour codes and the output of their corresponding numerical codes of 74.42% in the training set and 75.00% in the validation set. Moreover, these results are achieved on images that display different lighting conditions and were not taken with a fixed target distance, which increases the difficulty in the detection of different colours and adds up to the value of the results presented. In conclusion, the computer vision system presented is considered to be helpful in the granite manufacturing industry owing to its accuracy, and it is part of the first approach towards a full implementation on mobile phone devices for the corresponding users in each factory.</p>
		</sec>
	</body>
	<back>
		<ack>
			<title>Acknowledgements</title>
			<p>This work was supported by Project PID2020-116013RB-I00 financed by MCIN/AEI/10.13039/501100011033</p>
		</ack>
		<fn-group>
			<title>Author contributions</title>
			<fn fn-type="con" id="fn1">
				<p>Conceptualization: J. Mart&#xed;nez, M. Ara&#xfa;jo. Data curation: X. Rigueira, M. Ara&#xfa;jo. Formal analysis: J. Mart&#xed;nez. Funding acquisition: E. Gir&#xe1;ldez. Investigation: X. Rigueira, M. Ara&#xfa;jo, J. Mart&#xed;nez. Methodology: X. Rigueira, J, Mart&#xed;nez. Project administration: E. Gir&#xe1;ldez. Resources: A. Recam&#xe1;n. Software: X. Rigueira. Validation: X. Rigueira, M. Ara&#xfa;jo Visualization: X. Rigueira, J. Mart&#xed;nez. Writing, original draft: X. Rigueira. Writing, review &amp; editing: M. Ara&#xfa;jo, J. Mart&#xed;nez.</p>
			</fn>
		</fn-group>
		<ref-list>
			<title>References</title>
			<ref id="B1">
				<label>1</label>
				<mixed-citation publication-type="report">
					<person-group person-group-type="author">
						<collab>Direcci&#xf3;n General de Pol&#xed;tica Energ&#xe9;tica y Minas</collab>
					</person-group>
					<year>2019</year>
					<source>Estad&#xed;stica minera de Espa&#xf1;a 2019</source>
					<ext-link ext-link-type="uri" xlink:href="https://energia.gob.es/mineria/Estadistica/DatosBibliotecaConsumer/2019/estadistica mineraanual-2019.pdf">https://energia.gob.es/mineria/Estadistica/DatosBibliotecaConsumer/2019/estadistica mineraanual-2019.pdf</ext-link>
				</mixed-citation>
			</ref>
			<ref id="B2">
				<label>2</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Qi</surname>
							<given-names>C.</given-names>
						</string-name>
					</person-group>
					<year>2020</year>
					<article-title>Big data management in the mining industry</article-title>
					<source>Int. J. Miner., Metall. Mater.</source>
					<volume>27</volume>
					<issue>2</issue>
					<fpage>131</fpage>
					<lpage>139</lpage>
					<pub-id pub-id-type="doi">10.1007/s12613-019-1937-z</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B3">
				<label>3</label>
				<mixed-citation publication-type="confproc">
					<person-group person-group-type="author">
						<string-name>
							<surname>Anh Vo</surname>
							<given-names>S.</given-names>
						</string-name>
						<string-name>
							<surname>Scanlan</surname>
							<given-names>J.</given-names>
						</string-name>
						<string-name>
							<surname>Mirowski</surname>
							<given-names>L.</given-names>
						</string-name>
						<string-name>
							<surname>Turner</surname>
							<given-names>P.</given-names>
						</string-name>
					</person-group>
					<year>2018</year>
					<source>Image processing for traceability: A system prototype for the Southern Rock Lobster (SRL) supply chain</source>
					<conf-name>Proceedings of the International Conference on Digital Image Computing: Techniques and Applications</conf-name>
					<abbrev>DICTA</abbrev>
					<fpage>1</fpage>
					<lpage>8</lpage>
					<ext-link ext-link-type="uri" xlink:href="https://eprints.utas.edu.au/29370">https://eprints.utas.edu.au/29370</ext-link>
				</mixed-citation>
			</ref>
			<ref id="B4">
				<label>4</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Ara&#xfa;jo</surname>
							<given-names>M.</given-names>
						</string-name>
						<string-name>
							<surname>Mart&#xed;nez</surname>
							<given-names>J.</given-names>
						</string-name>
						<string-name>
							<surname>Ord&#xf3;&#xf1;ez</surname>
							<given-names>C.</given-names>
						</string-name>
						<string-name>
							<surname>Vil&#xe1;n</surname>
							<given-names>J.A.</given-names>
						</string-name>
					</person-group>
					<year>2010</year>
					<article-title>Identification of granite varieties from colour spectrum data</article-title>
					<source>Sensors (Basel)</source>
					<volume>10</volume>
					<issue>9</issue>
					<fpage>8572</fpage>
					<lpage>8584</lpage>
					<pub-id pub-id-type="doi">10.3390/s100908572</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B5">
				<label>5</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Underwood</surname>
							<given-names>E.E.</given-names>
						</string-name>
					</person-group>
					<year>1973</year>
					<chapter-title>Quantitative stereology for microstructural analysis</chapter-title>
					<source>microstructural analysis</source>
					<publisher-name>Springer</publisher-name>
					<publisher-loc>Boston, M.A.</publisher-loc>
					<pub-id pub-id-type="doi">10.1007/978-1-4615-8693-7_3</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B6">
				<label>6</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Underwood</surname>
							<given-names>E.E.</given-names>
						</string-name>
					</person-group>
					<year>1986</year>
					<chapter-title>Quantitative fractography</chapter-title>
					<source>Applied metallography</source>
					<publisher-name>Springer</publisher-name>
					<publisher-loc>Boston, M.A.</publisher-loc>
					<pub-id pub-id-type="doi">10.1007/978-1-4684-9084-8_8</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B7">
				<label>7</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Russ</surname>
							<given-names>J.C.</given-names>
						</string-name>
						<string-name>
							<surname>Neal</surname>
							<given-names>F.B.</given-names>
						</string-name>
					</person-group>
					<year>2016</year>
					<source>The image processing handbook</source>
					<edition>7</edition>
					<publisher-name>CRC Press</publisher-name>
					<publisher-loc>Boca Raton, F.L.</publisher-loc>
					<pub-id pub-id-type="doi">10.1201/b18983</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B8">
				<label>8</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Serra</surname>
							<given-names>J.</given-names>
						</string-name>
					</person-group>
					<year>1982</year>
					<source>lmage analysis and mathematical morphology</source>
					<publisher-name>Academic Press</publisher-name>
					<publisher-loc>Cambridge, M.A.</publisher-loc>
				</mixed-citation>
			</ref>
			<ref id="B9">
				<label>9</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Iglesias</surname>
							<given-names>C.</given-names>
						</string-name>
						<string-name>
							<surname>Mart&#xed;nez</surname>
							<given-names>J.</given-names>
						</string-name>
						<string-name>
							<surname>Taboada</surname>
							<given-names>J.</given-names>
						</string-name>
					</person-group>
					<year>2018</year>
					<article-title>Automated vision system for quality inspection of slate slabs</article-title>
					<source>Comput. Ind.</source>
					<issue>99</issue>
					<fpage>119</fpage>
					<lpage>129</lpage>
					<pub-id pub-id-type="doi">10.1016/j.compind.2018.03.030</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B10">
				<label>10</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Mart&#xed;nez</surname>
							<given-names>J.</given-names>
						</string-name>
						<string-name>
							<surname>L&#xf3;pez</surname>
							<given-names>M.</given-names>
						</string-name>
						<string-name>
							<surname>Mat&#xed;as</surname>
							<given-names>J.M.</given-names>
						</string-name>
						<string-name>
							<surname>Taboada</surname>
							<given-names>J.</given-names>
						</string-name>
					</person-group>
					<year>2013</year>
					<article-title>Classifying slate tile quality using automated learning techniques</article-title>
					<source>Math. Comp. Model.</source>
					<volume>57</volume>
					<issue>7-8</issue>
					<fpage>1716</fpage>
					<lpage>1721</lpage>
					<pub-id pub-id-type="doi">10.1016/j.mcm.2011.11.016</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B11">
				<label>11</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>L&#xf3;pez</surname>
							<given-names>M.</given-names>
						</string-name>
						<string-name>
							<surname>Mart&#xed;nez</surname>
							<given-names>J.</given-names>
						</string-name>
						<string-name>
							<surname>Mat&#xed;as</surname>
							<given-names>J.M.</given-names>
						</string-name>
						<string-name>
							<surname>Vil&#xe1;n</surname>
							<given-names>J.A.</given-names>
						</string-name>
						<string-name>
							<surname>Taboada</surname>
							<given-names>J.</given-names>
						</string-name>
					</person-group>
					<year>2010</year>
					<article-title>Application of a hybrid 3D-2D laser scanning system to the characterization of slate slabs</article-title>
					<source>Sensors (Basel)</source>
					<volume>10</volume>
					<issue>6</issue>
					<fpage>5949</fpage>
					<lpage>5961</lpage>
					<pub-id pub-id-type="doi">10.3390/s100605949</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B12">
				<label>12</label>
				<mixed-citation publication-type="confproc">
					<person-group person-group-type="author">
						<string-name>
							<surname>Ozkan</surname>
							<given-names>F.</given-names>
						</string-name>
						<string-name>
							<surname>Ulutas</surname>
							<given-names>B.</given-names>
						</string-name>
					</person-group>
					<year>2016</year>
					<source>Use of an eye-tracker to assess workers in ceramic tile surface defect detection</source>
					<conf-name>Proceedings of the International Conference on Control, Decision and Information Technologies</conf-name>
					<abbrev>coDIT</abbrev>
					<pub-id pub-id-type="doi">10.1109/CoDIT.2016.7593540</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B13">
				<label>13</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Hanzaei</surname>
							<given-names>S. H.</given-names>
						</string-name>
						<string-name>
							<surname>Afshar</surname>
							<given-names>A.</given-names>
						</string-name>
						<string-name>
							<surname>Barazandeh</surname>
							<given-names>F.</given-names>
						</string-name>
					</person-group>
					<year>2017</year>
					<article-title>Automatic detection and classification of the ceramic tiles&#x2019; Surface defects</article-title>
					<source>Pattern. Recogni</source>
					<volume>66</volume>
					<fpage>174</fpage>
					<lpage>189</lpage>
					<pub-id pub-id-type="doi">10.1016/J.PATCOG.2016.11.021</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B14">
				<label>14</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Sioma</surname>
							<given-names>A.</given-names>
						</string-name>
					</person-group>
					<year>2020</year>
					<article-title>Automated control of surface defects on ceramic tiles using 3D image analysis</article-title>
					<source>Materials (Basel)</source>
					<volume>13</volume>
					<issue>5</issue>
					<elocation-id>1250</elocation-id>
					<pub-id pub-id-type="doi">10.3390/ma13051250</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B15">
				<label>15</label>
				<mixed-citation publication-type="confproc">
					<person-group person-group-type="author">
						<string-name>
							<surname>Hocenski</surname>
							<given-names>Z.</given-names>
						</string-name>
						<string-name>
							<surname>Matic</surname>
							<given-names>T.</given-names>
						</string-name>
						<string-name>
							<surname>Vidovic</surname>
							<given-names>I.</given-names>
						</string-name>
					</person-group>
					<year>2016</year>
					<source>Technology transfer of computer vision defect detection to ceramic tiles industry</source>
					<conf-name>Proceedings of the International Conference on Smart Systems and Technologies</conf-name>
					<abbrev>SST</abbrev>
					<fpage>301</fpage>
					<lpage>305</lpage>
					<pub-id pub-id-type="doi">10.1109/SST.2016.7765678</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B16">
				<label>16</label>
				<mixed-citation publication-type="confproc">
					<person-group person-group-type="author">
						<string-name>
							<surname>Samarawickrama</surname>
							<given-names>Y.C.</given-names>
						</string-name>
						<string-name>
							<surname>Wickramasinghe</surname>
							<given-names>C.D.</given-names>
						</string-name>
					</person-group>
					<year>2017</year>
					<source>Matlab based automated surface defect detection system for ceremic tiles using image processing</source>
					<conf-name>Proceedings of the National Conference on Technology and Management</conf-name>
					<abbrev>NCTM</abbrev>
					<fpage>34</fpage>
					<lpage>39</lpage>
					<pub-id pub-id-type="doi">10.1109/NCTM.2017.7872824</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B17">
				<label>17</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Avci</surname>
							<given-names>D.</given-names>
						</string-name>
						<string-name>
							<surname>Sert</surname>
							<given-names>E.</given-names>
						</string-name>
					</person-group>
					<year>2021</year>
					<article-title>An effective Turkey marble classification system: Convolutional neural network with genetic algorithm -wavelet kernel- extreme learning machine</article-title>
					<source>Colloq. Traitement. Signal. Imag.</source>
					<volume>38</volume>
					<issue>4</issue>
					<fpage>1229</fpage>
					<lpage>1235</lpage>
					<pub-id pub-id-type="doi">10.18280/ts.380434</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B18">
				<label>18</label>
				<mixed-citation publication-type="confproc">
					<person-group person-group-type="author">
						<string-name>
							<surname>Panda</surname>
							<given-names>G.</given-names>
						</string-name>
						<string-name>
							<surname>Satapathy</surname>
							<given-names>S.C.</given-names>
						</string-name>
						<string-name>
							<surname>Biswal</surname>
							<given-names>B.</given-names>
						</string-name>
						<string-name>
							<surname>Ramesh</surname>
							<given-names>B.</given-names>
						</string-name>
					</person-group>
					<year>2018</year>
					<source>Microelectronics, electromagnetics and telecommunications</source>
					<conf-name>Proceedings of the International Conference on Micro-Electronics, Electromagnetics and Telecommunications</conf-name>
					<abbrev>ICMEET</abbrev>
					<ext-link ext-link-type="uri" xlink:href="https://www.springerprofessional.de/en/microelectronics-electromagnetics-and-telecommunications">https://www.springerprofessional.de/en/microelectronics-electromagnetics-and-telecommunications</ext-link>
				</mixed-citation>
			</ref>
			<ref id="B19">
				<label>19</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>L&#xf3;pez</surname>
							<given-names>M.</given-names>
						</string-name>
						<string-name>
							<surname>Mart&#xed;nez</surname>
							<given-names>J.</given-names>
						</string-name>
						<string-name>
							<surname>Mat&#xed;as</surname>
							<given-names>J.M.</given-names>
						</string-name>
						<string-name>
							<surname>Taboada</surname>
							<given-names>J.</given-names>
						</string-name>
						<string-name>
							<surname>Vil&#xe1;n</surname>
							<given-names>J.A.</given-names>
						</string-name>
					</person-group>
					<year>2010</year>
					<article-title>Functional classification of ornamental stone using machine learning techiniques</article-title>
					<source>J. Comput. App. Math.</source>
					<volume>234</volume>
					<issue>4</issue>
					<fpage>1338</fpage>
					<lpage>1345</lpage>
					<pub-id pub-id-type="doi">10.1016/J.CAM.2010.01.054</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B20">
				<label>20</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Kang</surname>
							<given-names>H.</given-names>
						</string-name>
					</person-group>
					<year>2006</year>
					<source>Computational Color Technology</source>
					<edition>1</edition>
					<publisher-name>Spie Press</publisher-name>
					<publisher-loc>Bellingham, WA</publisher-loc>
				</mixed-citation>
			</ref>
			<ref id="B21">
				<label>21</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Bianconi</surname>
							<given-names>F.</given-names>
						</string-name>
						<string-name>
							<surname>Fern&#xe1;ndez</surname>
							<given-names>A.</given-names>
						</string-name>
						<string-name>
							<surname>Gonz&#xe1;lez</surname>
							<given-names>E.</given-names>
						</string-name>
						<string-name>
							<surname>Saetta</surname>
							<given-names>S.A.</given-names>
						</string-name>
					</person-group>
					<year>2013</year>
					<article-title>Performance analysis of the colour descriptors for parquet sorting</article-title>
					<source>Expert. Syst. Appl.</source>
					<volume>40</volume>
					<issue>5</issue>
					<fpage>1636</fpage>
					<lpage>1644</lpage>
					<pub-id pub-id-type="doi">10.1016/j.eswa.2012.09.007</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B22">
				<label>22</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Paschos</surname>
							<given-names>G.</given-names>
						</string-name>
					</person-group>
					<year>2000</year>
					<article-title>Fast colour texture recognition using chromaticity moments</article-title>
					<source>Pattern Recognit. Lett.</source>
					<volume>21</volume>
					<issue>9</issue>
					<fpage>837</fpage>
					<lpage>841</lpage>
					<pub-id pub-id-type="doi">10.1016/S0167-8655(00)00043-X</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B23">
				<label>23</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Xiong</surname>
							<given-names>N.N.</given-names>
						</string-name>
						<string-name>
							<surname>Shen</surname>
							<given-names>Y.</given-names>
						</string-name>
						<string-name>
							<surname>Yang</surname>
							<given-names>K.</given-names>
						</string-name>
						<string-name>
							<surname>Lee</surname>
							<given-names>C.</given-names>
						</string-name>
						<string-name>
							<surname>Wu</surname>
							<given-names>C.</given-names>
						</string-name>
					</person-group>
					<year>2018</year>
					<article-title>Color sensors and their applications based on real-time color image segmentation for cyber physical systems</article-title>
					<source>EURASIP J Image Video Process</source>
					<year>2018</year>
					<elocation-id>23</elocation-id>
					<pub-id pub-id-type="doi">10.1186/s13640-018-0258-x</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B24">
				<label>24</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Ibraheem</surname>
							<given-names>N.A.</given-names>
						</string-name>
						<string-name>
							<surname>Hasan</surname>
							<given-names>N.M.</given-names>
						</string-name>
						<string-name>
							<surname>Khan</surname>
							<given-names>R.Z.</given-names>
						</string-name>
						<string-name>
							<surname>Mishra</surname>
							<given-names>P.K.</given-names>
						</string-name>
					</person-group>
					<year>2012</year>
					<article-title>Understanding color models: a review</article-title>
					<source>ARPN J. Eng. Appl. Sci.</source>
					<volume>2</volume>
					<issue>3</issue>
					<fpage>365</fpage>
					<lpage>275</lpage>
					<ext-link ext-link-type="uri" xlink:href="https://haralick.org/DV/understanding_color_models.pdf">https://haralick.org/DV/understanding_color_models.pdf</ext-link>
				</mixed-citation>
			</ref>
			<ref id="B25">
				<label>25</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Sebastian</surname>
							<given-names>P.</given-names>
						</string-name>
						<string-name>
							<surname>Voon</surname>
							<given-names>Y.V.</given-names>
						</string-name>
						<string-name>
							<surname>Comley</surname>
							<given-names>R.</given-names>
						</string-name>
					</person-group>
					<year>2010</year>
					<article-title>Colour space effect on tracking in video surveillance</article-title>
					<source>Int. J. Electr. Eng. Inform.</source>
					<volume>2</volume>
					<issue>4</issue>
					<fpage>298</fpage>
					<lpage>312</lpage>
					<pub-id pub-id-type="doi">10.15676/ijeei.2010.2.4.5</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B26">
				<label>26</label>
				<mixed-citation publication-type="confproc">
					<person-group person-group-type="author">
						<string-name>
							<surname>Smith</surname>
							<given-names>A.R.</given-names>
						</string-name>
					</person-group>
					<year>1978</year>
					<source>Color gamut transform pairs</source>
					<conf-name>Proceedings of the Conference on Computer Graphics and Interactive Techniques ACM SIGGRAPH Computer Graphics</conf-name>
					<volume>12</volume>
					<issue>3</issue>
					<fpage>12</fpage>
					<lpage>19</lpage>
					<pub-id pub-id-type="doi">10.1145/800248.807361</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B27">
				<label>27</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Roger</surname>
							<given-names>D.F.</given-names>
						</string-name>
					</person-group>
					<year>2016</year>
					<source>Procedural elements of computer graphics</source>
					<edition>1</edition>
					<publisher-name>McGraw-Hill</publisher-name>
					<publisher-loc>New York City, New York</publisher-loc>
				</mixed-citation>
			</ref>
			<ref id="B28">
				<label>28</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Bhatia</surname>
							<given-names>P.K.</given-names>
						</string-name>
					</person-group>
					<year>2013</year>
					<source>Computer graphics</source>
					<edition>3</edition>
					<publisher-name>I.K. International</publisher-name>
					<publisher-loc>Daryaganj, New Delhi, Delhi</publisher-loc>
				</mixed-citation>
			</ref>
			<ref id="B29">
				<label>29</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Shapiro</surname>
							<given-names>L.</given-names>
						</string-name>
						<string-name>
							<surname>Stockman</surname>
							<given-names>G.</given-names>
						</string-name>
					</person-group>
					<year>2001</year>
					<source>Computer vision</source>
					<edition>1</edition>
					<fpage>137</fpage>
					<lpage>150</lpage>
					<publisher-name>Prentice Hall.</publisher-name>
					<publisher-loc>New York City, New York</publisher-loc>
					<year>2001</year>
					<ext-link ext-link-type="uri" xlink:href="https://theswissbay.ch/pdf/">https://theswissbay.ch/pdf/</ext-link>
				</mixed-citation>
			</ref>
			<ref id="B30">
				<label>30</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Nixon</surname>
							<given-names>M.</given-names>
						</string-name>
						<string-name>
							<surname>Aguado</surname>
							<given-names>A.</given-names>
						</string-name>
					</person-group>
					<year>2019</year>
					<source>Feature extraction and image processing for computer vision</source>
					<edition>1</edition>
					<size units="pages">650</size>
					<publisher-name>Academic Press</publisher-name>
					<publisher-loc>Cambridge, MA</publisher-loc>
				</mixed-citation>
			</ref>
			<ref id="B31">
				<label>31</label>
				<mixed-citation publication-type="book">
					<source>OpenCV: The OpenCV reference manual</source>
					<version>2.4.13.7</version>
					<year>2014</year>
					<publisher-name>OpenCV</publisher-name>
				</mixed-citation>
			</ref>
			<ref id="B32">
				<label>32</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Suziki</surname>
							<given-names>S.</given-names>
						</string-name>
						<string-name>
							<surname>Abe</surname>
							<given-names>K.</given-names>
						</string-name>
					</person-group>
					<year>1985</year>
					<article-title>Topological structural analysis of digitalized binary images by border following</article-title>
					<source>Comput. Vis Image Underst.</source>
					<volume>30</volume>
					<issue>1</issue>
					<fpage>32</fpage>
					<lpage>46</lpage>
					<pub-id pub-id-type="doi">10.1016/0734-189X(85)90016-7</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B33">
				<label>33</label>
				<mixed-citation publication-type="book">
					<person-group person-group-type="author">
						<string-name>
							<surname>Edwards</surname>
							<given-names>C.</given-names>
						</string-name>
						<string-name>
							<surname>Penney</surname>
							<given-names>D.</given-names>
						</string-name>
					</person-group>
					<year>1982</year>
					<source>Calculus and analytical geometry</source>
					<edition>1</edition>
					<fpage>859</fpage>
					<lpage>866</lpage>
					<publisher-name>Prentice Hall</publisher-name>
					<publisher-name>Upper Saddle River</publisher-name>
					<publisher-loc>NJ</publisher-loc>
				</mixed-citation>
			</ref>
			<ref id="B34">
				<label>34</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Ramer</surname>
							<given-names>U.</given-names>
						</string-name>
					</person-group>
					<year>1972</year>
					<article-title>An iterative procedure for the polygonal approximation of plane curves</article-title>
					<source>Comput. Graph. Image Process.</source>
					<volume>1</volume>
					<issue>3</issue>
					<fpage>244</fpage>
					<lpage>256</lpage>
					<pub-id pub-id-type="doi">10.1016/S0146-664X(72)80017-0</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B35">
				<label>35</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Douglas</surname>
							<given-names>D.H.</given-names>
						</string-name>
						<string-name>
							<surname>Peucker</surname>
							<given-names>T.H.</given-names>
						</string-name>
					</person-group>
					<year>1973</year>
					<article-title>Algorithms for the reduction of the number of points required to represent a digitalized line or its caricature</article-title>
					<source>Cartographica</source>
					<volume>10</volume>
					<issue>2</issue>
					<fpage>112</fpage>
					<lpage>122</lpage>
					<pub-id pub-id-type="doi">10.3138/FM57-6770-U75U-7727</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B36">
				<label>36</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Alonso-Villar</surname>
							<given-names>E.M.</given-names>
						</string-name>
						<string-name>
							<surname>Rivas</surname>
							<given-names>T.</given-names>
						</string-name>
						<string-name>
							<surname>Pozo-Antonio</surname>
							<given-names>J.S.</given-names>
						</string-name>
					</person-group>
					<year>2021</year>
					<article-title>Resistance to artificial daylight of paints used in urban artworks. Influence of paint composition and substrate</article-title>
					<source>Prog. Org. Coat.</source>
					<volume>154</volume>
					<elocation-id>106180</elocation-id>
					<pub-id pub-id-type="doi">10.1016/J.PORGCOAT.2021.106180</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B37">
				<label>37</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Kondo</surname>
							<given-names>N.</given-names>
						</string-name>
					</person-group>
					<year>2009</year>
					<article-title>Robotization in fruit grading system</article-title>
					<source>Sens. Instrum. Food Qual. Saf.</source>
					<volume>3</volume>
					<issue>1</issue>
					<fpage>81</fpage>
					<lpage>87</lpage>
					<pub-id pub-id-type="doi">10.1007/s11694-008-9065-x</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B38">
				<label>38</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Burgus-Artizzu</surname>
							<given-names>X.P.</given-names>
						</string-name>
						<string-name>
							<surname>Ribeiro</surname>
							<given-names>A.</given-names>
						</string-name>
						<string-name>
							<surname>Guijarro</surname>
							<given-names>M.</given-names>
						</string-name>
						<string-name>
							<surname>Pajares</surname>
							<given-names>G.</given-names>
						</string-name>
					</person-group>
					<year>2011</year>
					<article-title>Real-time image processing for crop/weed discrimination in maize fields</article-title>
					<source>Comput. Electron. Agric.</source>
					<volume>75</volume>
					<issue>2</issue>
					<fpage>337</fpage>
					<lpage>346</lpage>
					<pub-id pub-id-type="doi">10.1016/j.compag.2010.12.011</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B39">
				<label>39</label>
				<mixed-citation publication-type="confproc">
					<person-group person-group-type="author">
						<string-name>
							<surname>Carew</surname>
							<given-names>T.</given-names>
						</string-name>
						<string-name>
							<surname>Ghita</surname>
							<given-names>O.</given-names>
						</string-name>
						<string-name>
							<surname>Whelan</surname>
							<given-names>P.F.</given-names>
						</string-name>
					</person-group>
					<year>2003</year>
					<source>Exploring the effects of a factory-type test-bed on a painted slate defect detection system</source>
					<conf-name>Proceeding of the International Conference on Mechatronics</conf-name>
					<abbrev>ICOM</abbrev>
					<fpage>365</fpage>
					<lpage>370</lpage>
					<ext-link ext-link-type="uri" xlink:href="https://doras.dcu.ie/18806/1/whelan_2003_126.pdf">https://doras.dcu.ie/18806/1/whelan_2003_126.pdf</ext-link>
				</mixed-citation>
			</ref>
			<ref id="B40">
				<label>40</label>
				<mixed-citation publication-type="confproc">
					<person-group person-group-type="author">
						<string-name>
							<surname>Andrew</surname>
							<given-names>W.</given-names>
						</string-name>
						<string-name>
							<surname>Hannuna</surname>
							<given-names>S.</given-names>
						</string-name>
						<string-name>
							<surname>Campbell</surname>
							<given-names>N.</given-names>
						</string-name>
						<string-name>
							<surname>Burghardt</surname>
							<given-names>T.</given-names>
						</string-name>
					</person-group>
					<year>2016</year>
					<source>Automatic individual Holstein Friesian cattle identification via selective local coat pattern matching in RGB-D imagery</source>
					<conf-name>Proceedings of the International Conference on Image Processing</conf-name>
					<conf-date>August 2016</conf-date>
					<abbrev>ICIP</abbrev>
					<fpage>484</fpage>
					<lpage>488</lpage>
					<pub-id pub-id-type="doi">10.1109/ICIP.2016.7532404</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B41">
				<label>41</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Ghita</surname>
							<given-names>O.</given-names>
						</string-name>
						<string-name>
							<surname>Whelan</surname>
							<given-names>P.F.</given-names>
						</string-name>
						<string-name>
							<surname>Carew</surname>
							<given-names>T.</given-names>
						</string-name>
						<string-name>
							<surname>Padmapriya</surname>
							<given-names>N.</given-names>
						</string-name>
					</person-group>
					<year>2005</year>
					<article-title>Quality grading of painted slates using texture analysis</article-title>
					<source>Comput. Ind.</source>
					<volume>56</volume>
					<issue>8-9</issue>
					<fpage>802</fpage>
					<lpage>815</lpage>
					<pub-id pub-id-type="doi">10.1016/j.compind.2005.05.008</pub-id>
				</mixed-citation>
			</ref>
			<ref id="B42">
				<label>42</label>
				<mixed-citation publication-type="journal">
					<person-group person-group-type="author">
						<string-name>
							<surname>Ghita</surname>
							<given-names>O.</given-names>
						</string-name>
						<string-name>
							<surname>Carew</surname>
							<given-names>T.</given-names>
						</string-name>
						<string-name>
							<surname>Whelan</surname>
							<given-names>P.</given-names>
						</string-name>
					</person-group>
					<year>2006</year>
					<article-title>A vision-based system for inspecting painted slated</article-title>
					<source>Sens. Rev.</source>
					<volume>26</volume>
					<issue>2</issue>
					<fpage>108</fpage>
					<lpage>115</lpage>
					<pub-id pub-id-type="art-access-id">10.1108/02602280610652695</pub-id>
				</mixed-citation>
			</ref>
		</ref-list>
	</back>
</article>