KR20230052014A - Method and apparatus for classifying foreign matter - Google Patents

Method and apparatus for classifying foreign matter Download PDF

Info

Publication number
KR20230052014A
KR20230052014A KR1020210135092A KR20210135092A KR20230052014A KR 20230052014 A KR20230052014 A KR 20230052014A KR 1020210135092 A KR1020210135092 A KR 1020210135092A KR 20210135092 A KR20210135092 A KR 20210135092A KR 20230052014 A KR20230052014 A KR 20230052014A
Authority
KR
South Korea
Prior art keywords
pixel
processor
value
image
entire image
Prior art date
Application number
KR1020210135092A
Other languages
Korean (ko)
Inventor
손국진
김영덕
곽동훈
Original Assignee
재단법인대구경북과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 재단법인대구경북과학기술원 filed Critical 재단법인대구경북과학기술원
Priority to KR1020210135092A priority Critical patent/KR20230052014A/en
Publication of KR20230052014A publication Critical patent/KR20230052014A/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/94Investigating contamination, e.g. dust
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J3/00Spectrometry; Spectrophotometry; Monochromators; Measuring colours
    • G01J3/46Measurement of colour; Colour measuring devices, e.g. colorimeters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/001Image restoration
    • G06T5/002Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/007Dynamic range modification
    • G06T5/70
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N2021/1765Method using an image detector and processing of image signal
    • G01N2021/177Detector of the video camera type
    • G01N2021/1776Colour camera
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques

Abstract

A method and a device for selecting foreign substances are disclosed. The method for selecting foreign substances according to an embodiment of the present disclosure comprises the steps of: acquiring an entire image including an object to be selected and performing preprocessing to distinguish a background and the object to be selected from the entire image; detecting color information for each pixel based on a color space of the preprocessed image; calculating a color range corresponding to a normal object based on color information for each detected pixel; and determining whether there is a foreign substance in the object image according to a result of comparing the color information for each pixel based on the calculated color range.

Description

이물질 선별 방법 및 장치{METHOD AND APPARATUS FOR CLASSIFYING FOREIGN MATTER}Method and apparatus for screening foreign substances {METHOD AND APPARATUS FOR CLASSIFYING FOREIGN MATTER}

본 개시는 객체 내의 이물질 검출 시, 객체가 촬영된 이미지 내의 색상 정보를 검출하여 정상 객체와 이물질을 분류할 수 있는 색상 범위를 산출하는 이물질 선별 방법 및 장치에 관한 것이다.The present disclosure relates to a foreign material sorting method and apparatus for calculating a color range capable of classifying a normal object and a foreign material by detecting color information in an image in which the object is photographed when detecting a foreign material in an object.

색채 선별기(색상 선별기)는 색으로 객체(상품)를 선별하는 장치로, 선별 과정에서 정상인 객체(양품)를 제외한 이물질(이물질이 포함된 불량품)을 걸러낼 수 있다. 이러한 색채 선별기는 일반적으로 색채인식 감지기(센서)를 통해 미리 정해진 색깔을 제외한 모든 원료를 불량으로 인식할 수 있다. A color sorter (color sorter) is a device that sorts objects (products) by color, and can filter out foreign substances (defective goods containing foreign substances) excluding normal objects (good goods) in the sorting process. Such a color sorter can generally recognize all raw materials except for a predetermined color as defective through a color recognition detector (sensor).

즉, 색채 선별기는 수동적인 색상정보(사용자가 임의로 지정한 색상정보)를 바탕으로 정상 객체와 이물질을 분류하는 것으로, 색상 정보를 기반으로 이물질을 검출하는 선행기술 1도 임계값을 설정한 후 해당 임계값을 기반으로 이물질을 검출하는 것에 대해 개시하고 있다.That is, the color sorter classifies normal objects and foreign substances based on passive color information (color information arbitrarily designated by the user), and sets a prior art threshold of 1 degree for detecting foreign substances based on color information, and then sets the threshold value. It is disclosed about detecting foreign matter based on the value.

이와 같이, 종래의 색상 정보 기반 이물질 검출 기술들은 특정 객체에 중점을 맞춰 사용자가 임계값을 설정해야 해당 객체의 검출이 가능하였다. As such, conventional color information-based foreign material detection techniques have been able to detect a corresponding object only when a user sets a threshold value to focus on a specific object.

그러나 예를 들어, 고구마 스틱과 같이 생산 환경에 따라 색상 변동이 크거나 정상 객체의 색상을 일정 범위로 한정하기 어려운 객체에 대해 이물질을 검출해야 하는 경우에는, 색채 선별이 제대로 되지 않는다는 문제가 있다. 즉, 고구마 스틱의 경우 주재료인 고구마의 수확시기, 장소 등 다양한 환경적인 영향에 따라 다양한 색상을 갖기 때문에 같은 공정에서 생산된 고구마 스틱이라고 하더라도 서로 다른 색상을 가지는 특징이 있다.However, there is a problem in that color sorting is not performed properly when a foreign substance is to be detected for an object whose color variation is large depending on the production environment or for which it is difficult to limit the color of a normal object to a certain range, such as, for example, sweet potato sticks. That is, in the case of sweet potato sticks, since they have various colors depending on various environmental influences such as harvest time and place of sweet potato, which is the main material, even sweet potato sticks produced in the same process have different colors.

따라서, 종래의 색채 선별기와 같이 수동적인 색상정보를 바탕으로 이물질을 검출하는 경우, 서로 다른 색상 정보를 갖는 고구마 스틱에서는 정상적으로 동작하지 않을 수 있으며, 선별 결과의 정확도가 감소하게 되는 문제가 있다. Therefore, when foreign matter is detected based on passive color information like a conventional color sorter, sweet potato sticks having different color information may not operate normally, and there is a problem in that the accuracy of the sorting result is reduced.

전술한 배경기술은 발명자가 본 발명의 도출을 위해 보유하고 있었거나, 본 발명의 도출 과정에서 습득한 기술 정보로서, 반드시 본 발명의 출원 전에 일반 공중에게 공개된 공지기술이라 할 수는 없다.The foregoing background art is technical information that the inventor possessed for derivation of the present invention or acquired during the derivation process of the present invention, and cannot necessarily be said to be known art disclosed to the general public prior to filing the present invention.

선행기술 1: 한국등록특허 제10-1751681호(2017.06.22.등록)Prior Art 1: Korean Patent Registration No. 10-1751681 (registered on June 22, 2017)

본 개시의 실시 예의 일 과제는, 객체 내의 이물질 검출 시, 객체를 촬영한 이미지에서 픽셀 별 색상 정보를 검출하여 정상 객체와 이물질을 분류할 수 있는 색상 범위를 산출하고, 산출한 색상 범위를 기반으로 이물질 검출을 수행하는데 있다. An object of an embodiment of the present disclosure is to calculate a color range capable of classifying a normal object and a foreign material by detecting color information for each pixel in an image of a photographed object when detecting a foreign material in an object, and based on the calculated color range It is to perform foreign matter detection.

본 개시의 실시예의 목적은 이상에서 언급한 과제에 한정되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시 예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 알 수 있을 것이다.The purpose of the embodiments of the present disclosure is not limited to the above-mentioned tasks, and other objects and advantages of the present invention not mentioned above can be understood by the following description and will be more clearly understood by the embodiments of the present invention. will be. It will also be seen that the objects and advantages of the present invention may be realized by means of the instrumentalities and combinations indicated in the claims.

본 개시의 일 실시 예에 따른 이물질 선별 방법은, 선별 대상 객체를 포함하는 전체 이미지를 획득하여, 전체 이미지에서 배경과 선별 대상 객체를 구분하기 위한 전처리를 수행하는 단계와, 전처리를 수행한 이미지의 색 공간(color space)에 기반하여 각 픽셀별 색상 정보를 검출하는 단계와, 검출한 각 픽셀 별 색상 정보를 기반으로 정상 객체에 해당하는 색상 범위를 산출하는 단계와, 산출한 색상 범위를 기준으로 각 픽셀 별 색상 정보와 비교한 결과에 따라 객체 이미지 내 이물질 여부를 판단하는 단계를 포함할 수 있다.A foreign material screening method according to an embodiment of the present disclosure includes obtaining an entire image including a target object to be screened, performing preprocessing to distinguish a background and an object to be screened from the entire image, and Detecting color information for each pixel based on a color space, calculating a color range corresponding to a normal object based on the detected color information for each pixel, and based on the calculated color range A step of determining whether there is a foreign substance in the object image according to a result of comparison with color information for each pixel may be included.

이 외에도, 본 발명의 구현하기 위한 다른 방법, 다른 시스템 및 상기 방법을 실행하기 위한 컴퓨터 프로그램이 저장된 컴퓨터로 판독 가능한 기록매체가 더 제공될 수 있다.In addition to this, another method for implementing the present invention, another system, and a computer-readable recording medium storing a computer program for executing the method may be further provided.

전술한 것 외의 다른 측면, 특징, 이점이 이하의 도면, 특허청구범위 및 발명의 상세한 설명으로부터 명확해질 것이다.Other aspects, features and advantages other than those described above will become apparent from the following drawings, claims and detailed description of the invention.

본 개시의 실시 예에 의하면, 객체 내의 이물질 검출 시, 객체를 촬영한 이미지에서 픽셀 별 색상 정보를 검출하여 정상 객체와 이물질을 분류할 수 있는 색상 범위를 산출하고, 산출한 색상 범위를 기반으로 이물질 검출을 수행함으로써, 객체의 다양한 색상 범위에 상관 없이 이물질 검출의 정확도를 향상시킬 수 있다.According to an embodiment of the present disclosure, when detecting a foreign substance in an object, color information for each pixel is detected in an image of the object, and a color range capable of classifying a normal object and a foreign substance is calculated, and the foreign substance is based on the calculated color range. By performing the detection, the accuracy of foreign matter detection can be improved regardless of the various color ranges of the object.

또한, 수동적인 색상 정보가 아닌 실시간성을 가지고 객체의 정상 색상 범위를 검출하여 이물질을 선별함으로써, 다양한 색상을 갖는 객체의 이물질 검출에 있어, 비교적 저렴한 비용으로 높은 성능의 이물질 검출이 가능하도록 할 수 있다.In addition, by detecting the normal color range of an object in real time rather than passive color information to select foreign substances, it is possible to detect foreign substances with high performance at a relatively low cost in detecting foreign substances in objects having various colors. there is.

본 발명의 효과는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 효과들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해될 수 있을 것이다.The effects of the present invention are not limited to those mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art from the description below.

도 1은 본 개시의 일 실시 예에 따른 이물질 선별 시스템 환경을 개략적으로 개시한 도면이다.
도 2는 본 개시의 일 실시 예에 따른 고구마 스틱 이미지의 예시도이다.
도 3은 본 개시의 일 실시 예에 따른 이물질 선별 장치를 개략적으로 나타낸 블록도이다.
도 4는 본 개시의 일 실시 예에 따른 고구마 스틱 이미지의 전처리 과정을 설명하기 위한 예시도이다.
도 5는 본 개시의 일 실시 예에 따른 고구마 스틱 이미지의 HSV 변환 과정을 설명하기 위한 예시도이다.
도 6은 본 개시의 일 실시 예에 따른 고구마 스틱 이미지의 이물 선별 결과를 나타낸 예시도이다.
도 7은 본 개시의 일 실시 예에 따른 이물질 선별 방법을 설명하기 위한 흐름도이다.
1 is a diagram schematically illustrating a foreign material screening system environment according to an embodiment of the present disclosure.
2 is an exemplary view of a sweet potato stick image according to an embodiment of the present disclosure.
3 is a block diagram schematically illustrating a foreign material sorting apparatus according to an embodiment of the present disclosure.
4 is an exemplary diagram for explaining a pre-processing process of a sweet potato stick image according to an embodiment of the present disclosure.
5 is an exemplary diagram for explaining an HSV conversion process of a sweet potato stick image according to an embodiment of the present disclosure.
6 is an exemplary view showing a foreign material screening result of a sweet potato stick image according to an embodiment of the present disclosure.
7 is a flowchart illustrating a foreign material screening method according to an embodiment of the present disclosure.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 설명되는 실시 예들을 참조하면 명확해질 것이다.Advantages and features of the present invention, and methods for achieving them will become clear with reference to the detailed description of embodiments in conjunction with the accompanying drawings.

그러나 본 발명은 아래에서 제시되는 실시 예들로 한정되는 것이 아니라, 서로 다른 다양한 형태로 구현될 수 있고, 본 발명의 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 아래에 제시되는 실시 예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.However, it should be understood that the present invention is not limited to the embodiments presented below, but may be implemented in a variety of different forms, and includes all conversions, equivalents, and substitutes included in the spirit and scope of the present invention. . The embodiments presented below are provided to complete the disclosure of the present invention and to fully inform those skilled in the art of the scope of the invention to which the present invention belongs. In describing the present invention, if it is determined that a detailed description of related known technologies may obscure the gist of the present invention, the detailed description will be omitted.

본 출원에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms used in this application are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, the terms "include" or "have" are intended to designate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, but one or more other features It should be understood that the presence or addition of numbers, steps, operations, components, parts, or combinations thereof is not precluded. Terms such as first and second may be used to describe various components, but components should not be limited by the terms. These terms are only used for the purpose of distinguishing one component from another.

이하, 본 발명에 따른 실시 예들을 첨부된 도면을 참조하여 상세히 설명하기로 하며, 첨부 도면을 참조하여 설명함에 있어, 동일하거나 대응하는 구성요소는 동일한 도면번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings. In the description with reference to the accompanying drawings, the same or corresponding components are assigned the same reference numerals, and overlapping descriptions thereof are omitted. I'm going to do it.

도 1은 본 개시의 일 실시 예에 따른 이물질 선별 시스템 환경을 개략적으로 개시한 도면이고, 도 2는 본 개시의 일 실시 예에 따른 고구마 스틱 이미지의 예시도이다.1 is a diagram schematically illustrating a foreign material sorting system environment according to an embodiment of the present disclosure, and FIG. 2 is an exemplary view of a sweet potato stick image according to an embodiment of the present disclosure.

도 1을 참조하면, 본 실시 예의 이물질 선별 시스템(1)은 이물질 선별 장치(100), 사용자 단말(200), 서버(300) 및 네트워크(400)를 포함할 수 있다.Referring to FIG. 1 , the foreign material sorting system 1 of this embodiment may include a foreign material sorting device 100 , a user terminal 200 , a server 300 and a network 400 .

일 실시 예의 이물질 선별 시스템(1)은, 객체 내의 이물질 검출 시, 객체를 촬영한 이미지에서 픽셀 별 색상 정보를 검출하여 정상 객체와 이물질을 분류할 수 있는 색상 범위를 산출하고, 산출한 색상 범위를 기반으로 이물질 검출을 수행하는 것에 관한 것이다.The foreign matter sorting system 1 of an embodiment, when detecting a foreign matter in an object, detects color information for each pixel in an image of the object, calculates a color range capable of classifying a normal object and foreign matter, and calculates the color range. It relates to performing foreign material detection based on the present invention.

특히 일 실시 예에서는, 이물질 검출을 수행할 객체에 대해, 평균적으로 유사한 색상을 갖는 객체가 아니라, 객체의 생산 과정 등의 영향으로 인해 다양한 색상을 가질 수 있는 객체에 관한 것으로, 이하에서는 고구마 스틱을 실시 예로 하여 설명하도록 한다. In particular, in one embodiment, for objects to be detected foreign matter, it is not an object having a similar color on average, but an object that can have various colors due to the influence of the object's production process, etc. Hereinafter, sweet potato sticks It will be described as an example.

고구마 스틱의 경우, 주재료인 고구마의 수확시기, 장소 등 다양한 환경적인 영향에 따라 다양한 색상을 갖기 때문에, 같은 공정에서 생산된 고구마 스틱이라고 하더라도 서로 다른 색상을 가지는 특징이 있다.In the case of sweet potato sticks, since they have various colors depending on various environmental influences such as harvest time and place of sweet potato, which is the main material, even sweet potato sticks produced in the same process have different colors.

일반적으로 곡물과 이물을 분류하는 색상 선별기의 경우, 수동적인 색상정보(사용자가 임의로 지정한 색상정보)를 바탕으로 곡물과 이물을 분류한다. 그러나 도 2에 도시된 바와 같이, 서로 다른 색상 정보를 갖는 고구마 스틱에서는 수동적인 색상정보를 바탕으로 이물을 분류할 경우, 정상적으로 동작하지 않는 문제가 발생할 수 있다. Generally, in the case of a color sorter that classifies grains and foreign matters, grains and foreign matters are classified based on passive color information (color information arbitrarily designated by a user). However, as shown in FIG. 2 , sweet potato sticks having different color information may not operate normally when foreign matter is classified based on passive color information.

따라서, 일 실시 예에서는, 고구마 스틱의 수동적인 색상정보가 아닌 실시간으로 획득된 이미지의 색상정보를 바탕으로 고구마 스틱과 이물을 구분할 수 있도록 하는 것이다.Therefore, in one embodiment, sweet potato sticks and foreign substances can be distinguished based on color information of an image obtained in real time, rather than passive color information of sweet potato sticks.

일 실시 예에서, 이물질 선별 장치(100)는 챔버, 조명, 머신비전, 모니터, 경광등을 포함하여 구성되며, 컨베이어벨트를 통해 이물질을 선별하고자 하는 객체가 이동되도록 구성될 수 있다. 챔버는 머신비전이 외부환경의 영향을 최소화하기 위한 것이며, 모니터 및 경광등을 이용해 이물질 여부를 표시하여 관리자에게 알릴 수 있도록 할 수 있다. 모니터 및 경광등을 후술하는 사용자 인터페이스(120, 도 3 참조)에 포함될 수 있다.In one embodiment, the foreign matter sorting apparatus 100 includes a chamber, lighting, machine vision, a monitor, and a warning light, and may be configured to move an object to sort foreign matter through a conveyor belt. The chamber is for machine vision to minimize the influence of the external environment, and can be used to indicate foreign matter using a monitor and a warning light so that a manager can be notified. A monitor and a warning light may be included in the user interface 120 (see FIG. 3) described below.

일 실시 예에서, 고구마 스틱은 낱개로 분리되어 컨베이어벨트를 통해 이동되고 이동 과정에 이물질 선별 장치(100)를 통과하게 된다. In one embodiment, the sweet potato sticks are separated individually and moved through a conveyor belt, and pass through the foreign matter sorting device 100 during the moving process.

즉 일 실시 예에서는, 이물질 선별 장치(100)를 통과할 때 머신비전을 이용해 고구마 스틱을 촬영한 이미지가 획득되며, 이러한 이미지에서 고구마 스틱의 색상 범위를 검출하고 이를 기반으로 이물을 선별해내는 것이다. 이물 선별 과정에 대한 구체적인 설명은 후술하도록 한다.That is, in one embodiment, when passing through the foreign matter sorting device 100, an image of a sweet potato stick photographed using machine vision is obtained, and a color range of the sweet potato stick is detected in this image, and foreign matter is sorted out based on this . A detailed description of the foreign material selection process will be described later.

한편 일 실시 예에서는, 사용자들이 사용자 단말(200)에서 구현되는 어플리케이션 또는 웹사이트에 접속하여, 이물질 선별을 위한 대상 객체 이미지를 입력하거나, 이물질 선별 결과에 따라 이물질을 제거하거나, 이물질 선별 결과를 확인하는 등의 과정을 수행할 수 있다. 이러한 사용자 단말(200)은 이물질 선별 어플리케이션 또는 이물질 선별 웹사이트에 접속한 후 인증 과정을 통하여 이물질 선별 서비스를 제공받을 수 있다. 인증 과정은 회원가입 등 사용자 정보를 입력하는 인증, 사용자 단말에 대한 인증 등을 포함할 수 있으나, 이에 한정되지 않고 이물질 선별 장치(100) 및/또는 서버(300)에서 전송되는 링크에 접속하는 것만으로 인증 과정이 수행될 수도 있다. 또한 본 실시 예에서, 사용자는 식품 제조 단계에서 식품 내 이물질 선별 등의 업무를 수행하는 사용자를 의미할 수 있다. Meanwhile, in one embodiment, users access an application or website implemented in the user terminal 200, input an image of a target object for screening foreign substances, remove foreign substances according to a result of screening foreign substances, or check a result of screening foreign substances. and so on can be performed. The user terminal 200 may receive a foreign material sorting service through an authentication process after accessing a foreign material sorting application or a foreign material sorting website. The authentication process may include authentication of inputting user information such as membership registration, authentication of a user terminal, etc., but is not limited thereto, and only accessing a link transmitted from the foreign substance sorting device 100 and/or the server 300 The authentication process may be performed as Also, in this embodiment, the user may mean a user who performs tasks such as sorting foreign substances in food in the food manufacturing step.

일 실시 예에서, 사용자 단말(200)은 사용자가 조작하는 데스크 탑 컴퓨터, 스마트폰, 노트북, 태블릿 PC, 스마트 TV, 휴대폰, PDA(personal digital assistant), 랩톱, 미디어 플레이어, 마이크로 서버, GPS(global positioning system) 장치, 전자책 단말기, 디지털방송용 단말기, 네비게이션, 키오스크, MP3 플레이어, 디지털 카메라, 가전기기 및 기타 모바일 또는 비모바일 컴퓨팅 장치일 수 있으나, 이에 제한되지 않는다. 또한, 사용자 단말(200)은 통신 기능 및 데이터 프로세싱 기능을 구비한 시계, 안경, 헤어 밴드 및 반지 등의 웨어러블 단말기 일 수 있다. 사용자 단말(200)은 상술한 내용에 제한되지 아니하며, 웹 브라우징이 가능한 단말기는 제한 없이 차용될 수 있다.In one embodiment, the user terminal 200 is a desktop computer operated by a user, a smart phone, a laptop computer, a tablet PC, a smart TV, a mobile phone, a personal digital assistant (PDA), a laptop, a media player, a micro server, a global GPS (GPS). positioning system) device, e-reader, digital broadcast terminal, navigation, kiosk, MP3 player, digital camera, home appliance, and other mobile or non-mobile computing device, but is not limited thereto. In addition, the user terminal 200 may be a wearable terminal such as a watch, glasses, hair band, and ring having a communication function and a data processing function. The user terminal 200 is not limited to the above, and a terminal capable of web browsing may be borrowed without limitation.

또한, 일 실시 예에서, 이물질 선별 장치(100)는 물품 생산 기기, 생산물품 검사 기기 등의 내부 구성 요소로서 구현되거나, 다른 실시 예에서는 그 일부 또는 전체가 서버(300)로 구현될 수 있다.In addition, in one embodiment, the foreign material sorting device 100 may be implemented as an internal component of a product production device or a product inspection device, or may be partially or entirely implemented as the server 300 in another embodiment.

서버(300)로 구현되는 경우, 물품 생산 기기, 생산물품 검사 기기 등에서 촬영한 영상 또는 이물질을 선별한 결과를 서버(300)로 전송하고, 서버(300)는 촬영된 영상에서 색상 정보를 검출하고 색상 정보를 기반으로 이물질을 선별하거나 이물질 선별 결과를 수정할 수 있다. 아래의 실시 예들은 이물질 선별 장치가 물품 생산 기기, 생산물품 검사 기기 등의 내부 구성 요소(100)로서 구현되는 것을 전제로 하여 설명한다.When implemented as the server 300, images captured by product production equipment, product inspection equipment, etc., or a result of selecting foreign substances are transmitted to the server 300, and the server 300 detects color information from the captured images, Based on the color information, foreign matter can be sorted or the foreign matter sorting result can be modified. The following embodiments will be described on the premise that the foreign matter sorting device is implemented as an internal component 100 of a product production device or a product inspection device.

일 실시 예에서, 서버(300)는 이물질 선별 장치(100)가 포함되는 이물질 선별 시스템(1)을 운용하기 위한 서버이거나 이물질 선별 장치(100)의 일부분 또는 전 부분을 구현하는 서버일 수 있다.In one embodiment, the server 300 may be a server for operating the foreign material sorting system 1 including the foreign material sorting apparatus 100 or a server implementing part or all of the foreign material sorting apparatus 100.

일 실시 예에서, 서버(300)는 이물질을 선별하고자 하는 객체를 촬영하고 촬영된 이미지에서 색상 정보를 검출하며 검출한 색상 정보를 기반으로 정상 객체와 이물질을 분류하여 객체에서 이물질을 선별할 수 있는 전반의 프로세스에 대한 이물질 선별 장치(100)의 동작을 제어하는 서버일 수 있다.In one embodiment, the server 300 photographs an object for which foreign substances are to be screened, detects color information from the captured image, and classifies a normal object and a foreign substance based on the detected color information to select foreign substances from the object. It may be a server that controls the operation of the foreign matter sorting device 100 for the overall process.

또한, 서버(300)는 이물질 선별 장치(100)를 동작시키는 데이터를 제공하는 데이터베이스 서버일 수 있다. 그 밖에 서버(300)는 웹 서버 또는 어플리케이션 서버 또는 딥러닝 네트워크 제공 서버를 포함할 수 있다.Also, the server 300 may be a database server that provides data for operating the foreign material sorting device 100 . In addition, the server 300 may include a web server, an application server, or a deep learning network providing server.

그리고 서버(300)는 각종 인공 지능 알고리즘을 적용하는데 필요한 빅데이터 서버 및 AI 서버, 각종 알고리즘의 연산을 수행하는 연산 서버 등을 포함할 수 있다.In addition, the server 300 may include a big data server and an AI server required to apply various artificial intelligence algorithms, a calculation server that performs calculations of various algorithms, and the like.

또한 본 실시 예에서, 서버(300)는 상술하는 서버들을 포함하거나 이러한 서버들과 네트워킹 할 수 있다. Also, in this embodiment, the server 300 may include the aforementioned servers or network with these servers.

이물질 선별 시스템(1)에서 이물질 선별 장치(100) 및 서버(300)는 네트워크(400)에 의해 연결될 수 있다. 이러한 네트워크(400)는 예컨대 LANs(local area networks), WANs(Wide area networks), MANs(metropolitan area networks), ISDNs(integrated service digital networks) 등의 유선 네트워크나, 무선 LANs, CDMA, 블루투스, 위성 통신 등의 무선 네트워크를 망라할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다. 또한 네트워크(400)는 근거리 통신 및/또는 원거리 통신을 이용하여 정보를 송수신할 수 있다. In the foreign material sorting system 1 , the foreign material sorting device 100 and the server 300 may be connected by a network 400 . Such a network 400 may be wired networks such as LANs (local area networks), WANs (wide area networks), MANs (metropolitan area networks), ISDNs (integrated service digital networks), wireless LANs, CDMA, Bluetooth, satellite communication However, the scope of the present invention is not limited thereto. In addition, the network 400 may transmit and receive information using short-range communication and/or long-distance communication.

또한, 네트워크(400)는 허브, 브리지, 라우터, 스위치 및 게이트웨이와 같은 네트워크 요소들의 연결을 포함할 수 있다. 네트워크(400)는 인터넷과 같은 공용 네트워크 및 안전한 기업 사설 네트워크와 같은 사설 네트워크를 비롯한 하나 이상의 연결된 네트워크들, 예컨대 다중 네트워크 환경을 포함할 수 있다. 네트워크(400)에의 액세스는 하나 이상의 유선 또는 무선 액세스 네트워크들을 통해 제공될 수 있다. 더 나아가 네트워크(400)는 사물 등 분산된 구성 요소들 간에 정보를 주고받아 처리하는 IoT(Internet of Things, 사물인터넷) 망 및/또는 5G 통신을 지원할 수 있다.Also, the network 400 may include connections of network elements such as hubs, bridges, routers, switches, and gateways. Network 400 may include one or more connected networks, such as a multiple network environment, including a public network such as the Internet and a private network such as a secure corporate private network. Access to network 400 may be provided through one or more wired or wireless access networks. Furthermore, the network 400 may support an Internet of Things (IoT) network and/or 5G communication in which information is exchanged and processed between distributed components such as things.

도 3은 본 개시의 일 실시 예에 따른 이물질 선별 장치를 개략적으로 나타낸 블록도이고, 도 4는 본 개시의 일 실시 예에 따른 고구마 스틱 이미지의 전처리 과정을 설명하기 위한 예시도이며, 도 5는 본 개시의 일 실시 예에 따른 고구마 스틱 이미지의 HSV 변환 과정을 설명하기 위한 예시도이고, 도 6은 본 개시의 일 실시 예에 따른 고구마 스틱 이미지의 이물 선별 결과를 나타낸 예시도이다.3 is a block diagram schematically illustrating a foreign material sorting apparatus according to an embodiment of the present disclosure, FIG. 4 is an exemplary diagram for explaining a preprocessing process of a sweet potato stick image according to an embodiment of the present disclosure, and FIG. 5 is 6 is an exemplary diagram illustrating a process of HSV conversion of sweet potato stick images according to an embodiment of the present disclosure, and FIG.

도 3을 참조하면, 이물질 선별 장치(100)는, 통신부(110), 사용자 인터페이스(120), 메모리(130) 및 프로세서(140)를 포함할 수 있다.Referring to FIG. 3 , the foreign material sorting apparatus 100 may include a communication unit 110 , a user interface 120 , a memory 130 and a processor 140 .

통신부(110)는 네트워크(400)와 연동하여 외부 장치간의 송수신 신호를 패킷 데이터 형태로 제공하는 데 필요한 통신 인터페이스를 제공할 수 있다. 또한 통신부(110)는 다른 네트워크 장치와 유무선 연결을 통해 제어 신호 또는 데이터 신호와 같은 신호를 송수신하기 위해 필요한 하드웨어 및 소프트웨어를 포함하는 장치일 수 있다.The communication unit 110 may provide a communication interface required to provide a transmission/reception signal between external devices in the form of packet data in conjunction with the network 400 . In addition, the communication unit 110 may be a device including hardware and software necessary for transmitting and receiving signals such as control signals or data signals to and from other network devices through wired or wireless connections.

즉, 프로세서(140)는 통신부(110)를 통해 연결된 외부 장치로부터 각종 데이터 또는 정보를 수신할 수 있으며, 외부 장치로 각종 데이터 또는 정보를 전송할 수도 있다. That is, the processor 140 may receive various data or information from an external device connected through the communication unit 110 and may transmit various data or information to the external device.

일 실시 예에서, 사용자 인터페이스(120)는 이물질 선별 장치(100)의 동작(예컨대, 색 공간 변환 알고리즘의 파라미터 변경, 촬영 환경에 기반하여 색상 범위 산출을 위한 가중치 조정 등)을 제어하기 위한 사용자 요청 및 명령들이 입력되는 입력 인터페이스를 포함할 수 있다.In one embodiment, the user interface 120 is a user request for controlling the operation of the foreign matter sorting apparatus 100 (eg, changing parameters of a color space conversion algorithm, adjusting weights for calculating a color range based on a photographing environment, etc.) and an input interface through which commands are input.

그리고 일 실시 예에서, 사용자 인터페이스(120)는 이물질 선별 결과 등이 출력되는 출력 인터페이스를 포함할 수 있다. 즉, 사용자 인터페이스(120)는 사용자 요청 및 명령에 따른 결과를 출력할 수 있다. 이러한 사용자 인터페이스(120)의 입력 인터페이스와 출력 인터페이스는 동일한 인터페이스에서 구현될 수 있다.And, in one embodiment, the user interface 120 may include an output interface for outputting results of foreign substance screening and the like. That is, the user interface 120 may output results according to user requests and commands. An input interface and an output interface of the user interface 120 may be implemented in the same interface.

메모리(130)는 이물질 선별 장치(100)의 동작 및/또는 서버(300)의 제어(연산)에 필요한 각종 정보들을 저장하고, 제어 소프트웨어를 저장할 수 있는 것으로, 휘발성 또는 비휘발성 기록 매체를 포함할 수 있다. The memory 130 may store various information necessary for the operation of the foreign material sorting apparatus 100 and/or control (operation) of the server 300 and store control software, and may include a volatile or non-volatile recording medium. can

메모리(130)는 하나 이상의 프로세서(140)와 연결되는 것으로, 프로세서(140)에 의해 실행될 때, 프로세서(140)로 하여금 이물질 선별 장치(100) 및/또는 서버(300)를 제어하도록 야기하는(cause) 코드들을 저장할 수 있다.The memory 130 is connected to one or more processors 140 and, when executed by the processor 140, causes the processor 140 to control the foreign material sorting device 100 and/or the server 300 ( cause) codes can be saved.

여기서, 메모리(130)는 자기 저장 매체(magnetic storage media) 또는 플래시 저장 매체(flash storage media) 등의 비 일시적 저장매체이거나 램(RAM) 등의 일시적 저장매체를 포함할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다. 이러한 메모리(130)는 내장 메모리 및/또는 외장 메모리를 포함할 수 있으며, DRAM, SRAM, 또는 SDRAM 등과 같은 휘발성 메모리, OTPROM(one time programmable ROM), PROM, EPROM, EEPROM, mask ROM, flash ROM, NAND 플래시 메모리, 또는 NOR 플래시 메모리 등과 같은 비휘발성 메모리, SSD. CF(compact flash) 카드, SD 카드, Micro-SD 카드, Mini-SD 카드, Xd 카드, 또는 메모리 스틱(memory stick) 등과 같은 플래시 드라이브, 또는 HDD와 같은 저장 장치를 포함할 수 있다. 그리고, 메모리(130)에는 본 개시에 따른 학습을 수행하기 위한 알고리즘에 관련된 정보가 저장될 수 있다. 그 밖에도 본 개시의 목적을 달성하기 위한 범위 내에서 필요한 다양한 정보가 메모리(130)에 저장될 수 있으며, 메모리(130)에 저장된 정보는 서버 또는 외부 장치로부터 수신되거나 사용자에 의해 입력됨에 따라 갱신될 수도 있다.Here, the memory 130 may include non-temporary storage media such as magnetic storage media or flash storage media, or temporary storage media such as RAM, but the scope of the present invention is not limited thereto. The memory 130 may include built-in memory and/or external memory, and may include volatile memory such as DRAM, SRAM, or SDRAM, one time programmable ROM (OTPROM), PROM, EPROM, EEPROM, mask ROM, flash ROM, Non-volatile memory such as NAND flash memory, or NOR flash memory, SSD. It may include a compact flash (CF) card, a flash drive such as an SD card, a Micro-SD card, a Mini-SD card, an Xd card, or a memory stick, or a storage device such as an HDD. Also, information related to an algorithm for performing learning according to the present disclosure may be stored in the memory 130 . In addition, various information necessary within the scope of achieving the object of the present disclosure may be stored in the memory 130, and the information stored in the memory 130 may be updated as received from a server or an external device or input by a user. may be

프로세서(140)는 이물질 선별 장치(100)의 전반적인 동작을 제어할 수 있다. 구체적으로, 프로세서(140)는 메모리(130)를 포함하는 이물질 선별 장치(100)의 구성과 연결되며, 메모리(130)에 저장된 적어도 하나의 명령을 실행하여 이물질 선별 장치(100)의 동작을 전반적으로 제어할 수 있다.The processor 140 may control the overall operation of the foreign material sorting apparatus 100 . Specifically, the processor 140 is connected to the configuration of the foreign material sorting apparatus 100 including the memory 130, and executes at least one command stored in the memory 130 to perform the overall operation of the foreign material sorting apparatus 100. can be controlled with

일 실시 예에서, 프로세서(140)는 머신비전을 이용해 도 4(a)에 도시된 바와 같이, RGB(Red, Green, Blue) 색 공간(color space)을 갖는 RGB 이미지를 획득한다. 획득된 RGB 이미지에는 객체(고구마 스틱), 이물질(이물질이 존재하는 경우), 배경(컨베이어벨트)이 포함될 수 있다.In one embodiment, the processor 140 obtains an RGB image having a red, green, blue (RGB) color space as shown in FIG. 4(a) using machine vision. The acquired RGB image may include an object (sweet potato stick), a foreign substance (if a foreign substance exists), and a background (conveyor belt).

한편, 색 공간(色空間, color space)이란, 색 표시계(color system)를 3차원으로 표현한 공간 개념으로, 색 표시계의 모든 색들은 이 색 공간에서 3차원 좌표로 나타낸다. Meanwhile, a color space is a concept of a space in which a color system is expressed in three dimensions, and all colors of the color display system are represented by three-dimensional coordinates in this color space.

RGB 색 공간은 색을 혼합하면 명도가 올라가는 가산 혼합 방식으로 색을 표현한다. RGB 가산혼합의 삼원색은 빨강(Red), 녹색(Green), 파랑(Blue)을 뜻한다. RGB 색 공간은 삼원색에 해당하는 세 가지 채널의 밝기를 기준으로 색을 지정한다. RGB 색 공간은 웹 색상 표현의 기본 원리이다.The RGB color space expresses colors in an additive mixing method in which brightness increases when colors are mixed. The three primary colors of RGB additive mixing mean red, green, and blue. The RGB color space specifies colors based on the brightness of three channels corresponding to the three primary colors. The RGB color space is the basic principle of color representation on the web.

프로세서(140)는 RGB 이미지를 획득한 후, 배경에서 객체를 분리하기 위한 영상 전처리를 수행할 수 있다. After acquiring the RGB image, the processor 140 may perform image preprocessing to separate the object from the background.

즉 프로세서(140)는 배경을 제거하기 위해 획득한 RGB 이미지에서 이진화를 수행하여 도 4(c)와 같이 마스크 이미지를 생성할 수 있다. 머신비전을 이용해 획득한 RGB 이미지의 배경은 고구마 스틱 운반에 사용되는 컨베이어벨트이며, 컨베이어벨트는 식품 공정의 특성상 흰색이 사용되는 것을 전제로 한다. 따라서, 흰색 컨베이어 벨트의 특성상 높은 색상 값을 가지기 때문에, 아래 수학식 1을 통해 배경과 객체를 구분할 수 있다.That is, the processor 140 may generate a mask image as shown in FIG. 4(c) by performing binarization on the acquired RGB image to remove the background. The background of the RGB image obtained using machine vision is a conveyor belt used for transporting sweet potato sticks, and it is assumed that white color is used for the conveyor belt due to the nature of the food process. Therefore, since the white conveyor belt has a high color value due to its characteristics, the background and the object can be distinguished through Equation 1 below.

Figure pat00001
Figure pat00001

여기서, Tr은 빈 컨베이어 벨트에서 측정한 색상의 회색조 값(gray value)의 평균값이며 g(x,y)는 이미지 좌표 (x,y)의 회색조 값(gray value)을 나타낼 수 있다.Here, Tr is an average value of gray values of colors measured on an empty conveyor belt, and g(x,y) may represent a gray value of image coordinates (x,y).

이때 일 실시 예에서, 프로세서(140)는 획득한 RGB 이미지에 노이즈가 발생할 수 있다고 판단되는 경우, 도 4(b)에 도시된 바와 같이, 블러(Blur)처리를 적용할 수 있다. 다만 실시 예에 따라, 블러 처리를 적용하는 것은 생략될 수도 있다.In this case, in one embodiment, the processor 140 may apply blur processing as shown in FIG. 4(b) when it is determined that noise may occur in the acquired RGB image. However, depending on embodiments, applying blur processing may be omitted.

즉 머신비전을 통해 획득한 이미지의 픽셀은 RGB(Red, Green, Blue) 3채널 값을 가진다. 그러나 고구마 스틱에 포함되는 다양한 이물질은 색상뿐만 아니라 두께, 빛의 투과 정도 등 다양한 특징을 가지므로, 일 실시 예에서 프로세서(140)는, 도 5(a)에 도시된 바와 같이, 해당 이미지의 단순 색상 정보인 RGB 색 공간을 아래의 수학식 2를 통해 HSV(Hue, Saturation, Value) 색 공간으로 변환할 수 있다.That is, pixels of an image acquired through machine vision have RGB (Red, Green, Blue) 3-channel values. However, since various foreign substances included in the sweet potato stick have various characteristics such as thickness and light transmission as well as color, in one embodiment, the processor 140, as shown in FIG. An RGB color space, which is color information, may be converted into a Hue, Saturation, Value (HSV) color space through Equation 2 below.

Figure pat00002
Figure pat00002

여기서, HSV 색 공간은, HSV 색 공간 또는 HSV 색상모델이라고 할 수 있으며, 색을 표현하는 하나의 방법이자, 그 방법에 따라 색을 배치하는 방식이다. 색상(Hue), 채도(Saturation), 명도(Value)의 좌표를 써서 특정한 색을 지정한다. 색상값 H는 가시광선 스펙트럼을 고리모양으로 배치한 색상환에서 가장 파장이 긴 빨강을 0°로 하였을 때 상대적인 배치 각도를 의미한다. 이 때문에 H 값은 0°~360°의 범위를 갖고 360°와 0°는 같은 색상 빨강을 가리킨다.Here, the HSV color space may be referred to as an HSV color space or a HSV color model, and is a method of expressing colors and a method of arranging colors according to the method. A specific color is specified using the coordinates of Hue, Saturation, and Value. The color value H means a relative arrangement angle when 0° is set to red having the longest wavelength on the color wheel in which the visible light spectrum is arranged in a ring shape. Because of this, H values range from 0° to 360°, with 360° and 0° pointing to the same color red.

채도값 S는 특정한 색상의 가장 진한 상태를 100%로 하였을 때 진함의 정도를 나타낸다. 채도값 0%는 같은 명도의 무채색을 나타낸다. 그리고 명도값 V는 흰색, 빨간색 등을 100%, 검은색을 0%로 하였을 때 밝은 정도를 나타낸다.The saturation value S represents the degree of deepness when the deepest state of a specific color is 100%. A saturation value of 0% represents an achromatic color with the same brightness. In addition, the brightness value V represents the degree of brightness when white, red, etc. are 100% and black is 0%.

일 실시 예에서, HSV 색 공간에서, 도 5(b), 도 5(c) 및 도 5(d)와 같이, 색상(Hue), 채도(Saturation), 명도(Value) 각각에 대한 채널 이미지로 변환될 수 있으며, 이러한 색상, 채도, 명도 각각에 대해 설정된 범위는 서로 영향을 주지 않고 독립적으로 동작할 수 있다.In one embodiment, in the HSV color space, as shown in FIGS. 5(b), 5(c), and 5(d), as channel images for each of Hue, Saturation, and Value It can be converted, and the ranges set for each of these hue, saturation, and lightness can operate independently without affecting each other.

그리고 프로세서(140)는 분리한 H, S, V 채널별 각각에 대해 픽셀 값의 평균을 구한다. 이때, 픽셀 값의 평균은 배경을 제외한 영역의 각 채널별 픽셀들의 평균값을 의미한다. 즉 일 실시 예에서, 프로세서(140)는 각 채널별 픽셀의 평균값을 파악하므로 현재 획득된 이미지에 존재하는 고구마 스틱의 평균 HSV 값을 구할 수 있는 것이다. 이는 아래 수학식 3과 같이 표현할 수 있다.Then, the processor 140 calculates an average of pixel values for each of the separated H, S, and V channels. In this case, the average of pixel values means an average value of pixels for each channel in an area excluding the background. That is, in one embodiment, since the processor 140 recognizes the average value of pixels for each channel, it is possible to obtain an average HSV value of sweet potato sticks present in the currently obtained image. This can be expressed as Equation 3 below.

Figure pat00003
Figure pat00003

그리고, 일 실시 예에서, 이미지에 포함된 객체의 픽셀 당 HSV 값은

Figure pat00004
와 같이 표현할 수 있다.And, in one embodiment, the HSV value per pixel of the object included in the image is
Figure pat00004
can be expressed as

일 실시 예에서, 배경을 제외한 전체 이미지의 HSV 평균 값과 각 픽셀의 HSV 값을 비교하면 해당 픽셀이 평균 값과 얼마나 차이를 가지는지 알 수 있다. 이는 아래 수학식 4와 같이 나타낼 수 있다.In an embodiment, by comparing the HSV average value of the entire image excluding the background with the HSV value of each pixel, how much the corresponding pixel differs from the average value can be known. This can be expressed as in Equation 4 below.

Figure pat00005
Figure pat00005

여기서, w는 가중치를 나타내며, 가중치(w) 값은 기본적으로 1을 사용할 수 있다. 다만 일 실시 예에서, 이미지의 촬영 환경 등 이미지에 대한 환경에 따라 픽셀 값을 조정해야 할 경우, 가중치를 조절할 수 있다. 예를 들어 이미지가 밝다면 가중치를 1보다 적게 설정할 수 있고, 어둡다면 1보다 크게 설정할 수 있다. 예를 들어, 가중치는 주로 조명에 의해 변하는 환경에 의해 조절될 수 있으며, 조명에 의해 변하는 환경에는 밝기뿐만 아니라 HSV에 해당하는 채도, 색상, 명도 모두가 포함될 수 있다. Here, w represents a weight, and a weight (w) value of 1 can be used by default. However, in one embodiment, when a pixel value needs to be adjusted according to an environment for an image, such as an environment for capturing an image, the weight may be adjusted. For example, if the image is bright, the weight can be set to less than 1, and if the image is dark, it can be set to greater than 1. For example, the weight may be mainly adjusted by an environment changed by lighting, and the environment changed by lighting may include not only brightness but also saturation, color, and lightness corresponding to HSV.

일 실시 예에서, 가중치는 사용자에 의해 조절될 수 있는데, 예를 들어, 사용자의 판단 하에 이물 선별 환경이 암막으로 구성되어 조명의 간섭이 적거나 없다고 판단되면 가중치를 1로 설정할 수 있다. 반면, 조명이 밝아졌다가 어두워지는 것과 같이 변화가 심한 환경이라면 환경에 따라 가중치를 설정하여 HSV 값을 일부 조정해줄 수 있다.In one embodiment, the weight may be adjusted by the user. For example, if it is determined that the foreign object screening environment is composed of a blackout curtain and there is little or no interference of lighting under the user's judgment, the weight may be set to 1. On the other hand, if the environment changes drastically, such as when the lighting brightens and then darkens, the HSV value can be partially adjusted by setting weights according to the environment.

다른 실시 예에서, 이미지 환경을 예측할 수 있는 센서가 구비되는 경우, 이미지 환경을 자동으로 인식하여 가중치가 조절되도록 할 수 있다. 예를 들어, 조도센서를 설치하여 조도의 변화를 수시로 감지하여 가중치를 적용할 수 있다.In another embodiment, when a sensor capable of predicting an image environment is provided, the image environment may be automatically recognized and the weight may be adjusted. For example, by installing an illuminance sensor, a change in illuminance can be frequently sensed and a weight can be applied.

다음으로 프로세서(140)는 수학식 5를 사용하여 편차(배경을 제외한 전체 이미지의 HSV 평균 값과 각 픽셀의 HSV 값의 차이)의 평균을 구해 객체의 픽셀이 가지는 편차의 평균값을 파악할 수 있다.Next, the processor 140 calculates the average of the deviations (the difference between the average HSV value of the entire image excluding the background and the HSV value of each pixel) using Equation 5 to determine the average value of the deviations of the pixels of the object.

Figure pat00006
Figure pat00006

다시 말하면, 우선 프로세서(140)는 각각의 H, S, V 채널 값을 이용하여 전체 이미지(전체 이미지의 HSV 평균 값)와 i 번째 픽셀의 편차의 벡터 거리를 구할 수 있다. 예를 들어, 프로세서(140)는 H 채널의 전체 이미지의 평균 값과 i 번째 픽셀의 차이 값, S 채널의 전체 이미지의 평균 값과 i 번째 픽셀의 차이 값, V 채널의 전체 이미지의 평균 값과 i 번째 픽셀의 차이 값을 구할 수 있다. 즉, 전체 이미지의 HSV 각 벡터의 값과 i 번째 픽셀의 HSV 각 벡터 값의 차이를 구하게 되면 HSV 총 3개의 벡터 값을 가지게 된다. In other words, first, the processor 140 may obtain a vector distance between the entire image (the HSV average value of the entire image) and the deviation of the ith pixel using the respective H, S, and V channel values. For example, the processor 140 calculates the difference between the average value of all images in the H channel and the ith pixel, the difference value between the average value of all images in the S channel and the ith pixel, and the average value of all images in the V channel. The difference value of the i-th pixel can be obtained. That is, when the difference between the HSV vector value of the entire image and the HSV vector value of the ith pixel is obtained, a total of three HSV vector values are obtained.

이때 프로세서(140)는 예를 들어, 3 개의 벡터들을 동일한 비율로 L2 Norm을 이용해 HSV 벡터 거리를 구할 수 있다. 따라서, 수학식 5를 참조하면, 전체 이미지와 i 번째 픽셀의 벡터 거리 값을 총 j+1개 갖게 되고 평균을 구할 수 있다. 그리고 일 실시 예에서 상기 평균을 이용해 고구마 스틱과 이물로 의심되는 영역을 분류하는 기준으로 사용할 수 있다.At this time, the processor 140 may obtain the HSV vector distance by using the L2 Norm of the three vectors at the same rate, for example. Therefore, referring to Equation 5, a total of j+1 vector distance values of the entire image and the ith pixel can be obtained, and an average can be obtained. In one embodiment, the average may be used as a criterion for classifying regions suspected of being foreign objects and sweet potato sticks.

즉, 일 실시 예에서, 객체의 픽셀이 가지는 편차의 평균을 기준으로 특정 픽셀과, 평균(객체의 픽셀이 가지는 편차의 평균)의 거리를 비교하면, 정상 고구마 스틱의 HSV 범위를 파악할 수 있다. That is, in an embodiment, the HSV range of normal sweet potato sticks can be determined by comparing the distance between a specific pixel and the average (average of deviations of object pixels) based on the average deviation of object pixels.

따라서, 프로세서(140)는 객체 중 특정 픽셀과 평균(객체의 픽셀이 가지는 편차의 평균)의 거리가 객체의 모든 픽셀이 가지는 편차의 평균 거리보다 가깝다면 정상적인 고구마 스틱으로 판단할 수 있으며, 반대로 멀다면 이물질로 분류할 수 있다. 이는 아래 수학식 6과 같이 수식으로 표현할 수 있다.Therefore, the processor 140 may determine that the sweet potato stick is normal if the average distance (average of deviations of pixels of the object) from a specific pixel of the object is closer than the average distance of deviations of all pixels of the object, and conversely, it is far. It can be classified as a foreign substance. This can be expressed as a formula as shown in Equation 6 below.

Figure pat00007
Figure pat00007

즉, 프로세서(140)는 수학식 6을 이용하여 고구마 스틱에 포함된 이물질을 선별할 수 있으며, 이는 도 6(a)와 같은 결과를 출력할 수 있다.That is, the processor 140 may select foreign substances included in the sweet potato stick using Equation 6, which may output a result as shown in FIG. 6(a).

그러나 일 실시 예에서는, 도 6(a)를 참조하면, 이물질 선별 결과뿐만 아니라, 고구마 스틱의 윤곽선 역시 함께 추출될 수 있다. 이는 고구마 스틱의 윤곽선은 중심부에 비해 두께가 얇아 조명의 영향을 많이 받지만 고구마 스틱에서 차지하는 영역이 크지 않아 이물질로 함께 검출될 수 있기 때문이다.However, in one embodiment, referring to FIG. 6 (a), not only the foreign matter screening result, but also the outline of the sweet potato stick may be extracted together. This is because the contour of the sweet potato stick is thinner than the central portion and thus is greatly affected by lighting, but the area occupied by the sweet potato stick is not large, so it can be detected together as a foreign substance.

이에 일 실시 예에서는, 프로세서(140)는 이물질을 선별한 후, 머신비전에서 획득한 이미지에서 객체의 윤곽선을 검출할 수 있다. 예를 들어, 일 실시 예에서, 머신비전을 이용해 획득한 RGB 이미지의 배경은 고구마 스틱 운반에 사용되는 컨베이어벨트이며, 컨베이어벨트는 식품 공정의 특성상 흰색이 사용되는 것을 전제로 하기 때문에, 배경의 정보를 알고 있다고 할 수 있다. Accordingly, in one embodiment, the processor 140 may select the foreign material and then detect the outline of the object from the image obtained from machine vision. For example, in one embodiment, the background of the RGB image obtained using machine vision is a conveyor belt used for transporting sweet potato sticks, and since the conveyor belt assumes that white is used due to the nature of the food process, the background information can be said to know

따라서, 일 실시 예에서는 배경의 정보를 알고 있으므로, 배경과 전경(고구마 스틱)의 구분이 가능하기 때문에, 배경과 전경을 이진화 할 수 있다. 이후 이진화된 영역의 경계면을 이어주면 윤곽선을 검출 할 수 있다. Accordingly, in one embodiment, since the background information is known, it is possible to distinguish the background and the foreground (sweet potato sticks), so the background and the foreground can be binarized. Then, if the boundary of the binarized area is connected, the contour can be detected.

다만, 일 실시 예에서, 객체의 윤곽선을 검출하는 방법은 이에 한정되지 않으며, 다양한 윤곽선 검출 알고리즘이 차용될 수 있다.However, in one embodiment, a method of detecting the contour of an object is not limited thereto, and various contour detection algorithms may be employed.

프로세서(140)는 윤곽선 검출 후 이물질과 윤곽선이 포함된 이미지에서 윤곽선 이미지를 제외할 수 있다. 그 결과 도 6(b)에 도시된 바와 같이, 고구마 스틱의 경계면이 이물질로 추출되는 문제점은 해결되고 이물질만 남은 결과를 추출할 수 있게 된다.After detecting the contour, the processor 140 may exclude the contour image from the image including the foreign matter and the contour. As a result, as shown in FIG. 6 (b), the problem of the boundary surface of the sweet potato stick being extracted with foreign substances is solved, and only foreign substances can be extracted as a result.

그리고 프로세서(140)는 이물질이 발견되면 작업자가 알 수 있게 알람 혹은 화면(사용자 인터페이스)에 표시할 수 있거나, 실시 예에 따라서 자동으로 이물질이 검출된 객체가 제거되도록 할 수도 있다. 이때 이물질이 검출되지 않는다면 다시 처음부터 작업을 시작할 수 있다.Also, when a foreign substance is found, the processor 140 may display an alarm or a screen (user interface) so that an operator can know it, or may automatically remove an object in which a foreign substance is detected according to an embodiment. If foreign substances are not detected at this time, the work can be started again from the beginning.

상술한 바와 같이, 종래에는 정상제품의 HSV 값의 범위를 사전에 구해 미리 설정하고, 객체의 픽셀 당 HSV 값이 미리 설정한 해당 범위 안의 HSV 값을 가질 경우 정상제품으로 판단하였다. 그러나 고구마 스틱과 같이 색상이 다양한 객체의 경우, 정상 고구마 스틱이지만 서로 다른 HSV 값을 가질 확률이 높으므로, 사전에 HSV 값을 지정하여 분류하는데 어려움이 있다. 따라서 일 실시 예에서는, 실시간으로 획득된 이미지의 색상 정보를 바탕으로 고구마 스틱과 이물질을 구분하는 것이다. As described above, in the related art, the HSV value range of a normal product is obtained in advance and set in advance, and when the HSV value per pixel of an object has a HSV value within the preset range, it is determined to be a normal product. However, objects of various colors, such as sweet potato sticks, are highly likely to have different HSV values even though they are normal sweet potato sticks, and thus it is difficult to classify objects by specifying HSV values in advance. Therefore, in one embodiment, sweet potato sticks and foreign substances are distinguished based on the color information of the image obtained in real time.

도 7은 본 개시의 일 실시 예에 따른 이물질 선별 방법을 설명하기 위한 흐름도이다. 도 7을 참조하여, 객체에서 색상 정보를 검출하고 색상 정보에 기반하여 정상 객체의 색상 범위를 파악하고, 파악한 색상 범위를 기준으로 이물질을 선별하는 일련의 과정을 설명한다.7 is a flowchart illustrating a foreign material screening method according to an embodiment of the present disclosure. Referring to FIG. 7 , a series of processes of detecting color information from an object, identifying a color range of a normal object based on the color information, and selecting a foreign substance based on the identified color range will be described.

S100단계에서, 프로세서(140)는 선별 대상 객체를 포함하는 전체 이미지를 획득한다.In step S100, the processor 140 acquires the entire image including the object to be sorted.

S200단계에서, 프로세서(140)는 전체 이미지에서 배경과 선별 대상 객체를 구분하기 위한 전처리를 수행한다.In step S200, the processor 140 performs preprocessing for distinguishing the background and the object to be selected from the entire image.

이때 프로세서(140)는 배경 이미지를 획득하여 배경 이미지에서 각 픽셀별로 측정된 회색조 값(gray value)을 획득하고, 배경 이미지의 각 픽셀의 회색조 값의 평균값을 산출할 수 있다. 이러한 과정은 전처리를 수행하기 이전에, 즉 객체 선별을 위해 이미지가 획득되기 이전에 미리 설정되어 입력될 수 있으나, 실시 예에 따라서, 전처리를 수행하는 과정에 포함되어 수행될 수도 있다.At this time, the processor 140 may obtain a background image, obtain a gray value measured for each pixel in the background image, and calculate an average value of gray values of each pixel of the background image. This process may be set and input prior to preprocessing, that is, before an image is obtained for object selection, but may be included in the preprocessing process according to embodiments.

프로세서(140)는 배경 이미지의 각 픽셀의 회색조 값의 평균값과 상기 전체 이미지의 각 픽셀들을 비교한 결과에 기초하여 이진화를 수행할 수 있다. 그리고 프로세서(140)는 이진화를 수행하기 전에, 전체 이미지의 노이즈를 제거할 수 있으며, 예를 들어 블러 처리 등을 수행할 수 있으나 이는 실시 예에 따라 생략될 수 있다.The processor 140 may perform binarization based on a result of comparing the average value of grayscale values of each pixel of the background image with each pixel of the entire image. Also, the processor 140 may remove noise from the entire image before performing binarization, for example, may perform blur processing, but this may be omitted according to embodiments.

S300단계에서, 프로세서(140)는 전처리를 수행한 이미지의 색 공간(color space)에 기반하여 각 픽셀별 색상 정보를 검출한다.In step S300, the processor 140 detects color information for each pixel based on the color space of the preprocessed image.

프로세서(140)는 전체 이미지에서 선별 대상 객체 영역의 픽셀별 RGB(Red, Green, Blue) 값을 획득한다. 그리고 기 설정된 색 공간 변환 알고리즘에 기반하여 선별 대상 객체 영역의 픽셀별 RGB 값을 HSV(Hue, Saturation, Value) 값으로 변환할 수 있다. The processor 140 obtains RGB (Red, Green, Blue) values for each pixel of the target object region in the entire image. In addition, based on a preset color space conversion algorithm, RGB values for each pixel of the target object region may be converted into Hue, Saturation, Value (HSV) values.

이때 기 설정된 색 공간 변환 알고리즘은, 선별 대상 객체 영역의 픽셀별 RGB 값을 색상(Hue)값, 채도(Saturation)값 및 명도(Value)값 각각으로 변환하도록 설정된 것일 수 있다(수학식 2 참조).In this case, the preset color space conversion algorithm may be set to convert RGB values of each pixel of the object region to be screened into hue, saturation, and brightness values, respectively (see Equation 2). .

S400단계에서, 프로세서(140)는 검출한 각 픽셀 별 색상 정보를 기반으로 정상 객체에 해당하는 색상 범위를 산출한다.In step S400, the processor 140 calculates a color range corresponding to a normal object based on the detected color information for each pixel.

프로세서(140)는 배경을 제외한 전체 이미지의 모든 픽셀의 HSV 평균값을 산출하고, 모든 픽셀의 HSV 평균값과 배경을 제외한 전체 이미지의 각 픽셀의 HSV 값을 비교하여, 편차를 산출할 수 있다. 그리고 프로세서(140)는 편차의 평균값을 산출하여 정상 객체에 해당하는 색상 범위로 설정할 수 있다.The processor 140 may calculate the HSV average value of all pixels of the entire image excluding the background, compare the HSV average value of all pixels with the HSV value of each pixel of the entire image excluding the background, and calculate the deviation. Also, the processor 140 may calculate an average value of the deviations and set them to a color range corresponding to a normal object.

이때 프로세서(140)는 전체 이미지 촬영 환경에 기반하여 색상 범위 산출을 위한 가중치를 조정할 수 있으며, 전체 이미지 촬영 환경의 밝기를 검출하여, 검출한 밝기에 따라 가중치를 조정할 수 있다.In this case, the processor 140 may adjust weights for calculating the color range based on the entire image capturing environment, detect brightness of the entire image capturing environment, and adjust weights according to the detected brightness.

S500단계에서, 프로세서(140)는 산출한 색상 범위(정상 객체 색상 범위)를 기준으로 각 픽셀 별 색상 정보와 비교한 결과에 따라 객체 이미지 내 이물질 여부를 판단한다.In step S500, the processor 140 determines whether there is a foreign substance in the object image according to the result of comparing the color information for each pixel based on the calculated color range (normal object color range).

프로세서(140)는 전체 이미지 내 특정 픽셀의 HSV 값과 모든 픽셀의 HSV 평균값의 편차와, 정상 객체에 해당하는 색상 범위의 편차의 평균값을 비교할 수 있다. 프로세서(140)는 비교 결과, 전체 이미지 내 특정 픽셀의 HSV 값과 모든 픽셀의 HSV 평균값의 편차가 정상 색상 범위 값 이하이면 정상 객체로 판단하고, 그렇지 않으면 이물질로 판단할 수 있다.The processor 140 may compare a deviation between the HSV value of a specific pixel and an average HSV value of all pixels in the entire image and an average value of deviations of a color range corresponding to a normal object. As a result of the comparison, the processor 140 may determine that the object is a normal object if the deviation between the HSV value of a specific pixel and the average HSV value of all pixels in the entire image is less than or equal to the normal color range value, and otherwise determine it as a foreign substance.

그리고 프로세서(140)는 객체 이미지 내 이물질이 있는 것으로 판단되면, 해당 객체 이미지의 윤곽선을 검출한 후, 검출된 윤곽선을 제거할 수 있다.Also, if it is determined that there is a foreign substance in the object image, the processor 140 may detect the contour of the corresponding object image and then remove the detected contour.

S600단계에서, 프로세서(140)는 이물질 판단 결과를 출력한다.In step S600, the processor 140 outputs the foreign matter determination result.

즉, 프로세서(140)는 윤곽선까지 검출하여 제거한 최종 이미지를 이물질 판단 결과로서 출력할 수 있다. 다시 말하면, 선별된 이물질 이미지만 추출하여 출력할 수 있다. 다만 실시 예에 따라서, 이물질 이미지와 이물질이 검출된 객체 이미지가 함께 출력될 수 있다.That is, the processor 140 may output a final image obtained by detecting and removing the outline as a foreign matter determination result. In other words, only the selected foreign material image can be extracted and output. However, according to an embodiment, the image of the foreign substance and the image of the object in which the foreign substance is detected may be output together.

이러한, 프로세서(140)는 다양한 방식으로 구현될 수 있다. 예를 들어, 프로세서(140)는 주문형 집적 회로(Application Specific Integrated Circuit, ASIC), 임베디드 프로세서, 마이크로 프로세서, 하드웨어 컨트롤 로직, 하드웨어 유한 상태 기계(Hardware Finite State Machine, FSM), 디지털 신호 프로세서(Digital Signal Processor, DSP) 중 적어도 하나로 구현될 수 있다. Such processor 140 may be implemented in various ways. For example, the processor 140 may include an application specific integrated circuit (ASIC), an embedded processor, a microprocessor, hardware control logic, a hardware finite state machine (FSM), a digital signal processor Processor, DSP) may be implemented as at least one.

프로세서(140)는 일종의 중앙처리장치로서 메모리(130)에 탑재된 제어 소프트웨어를 구동하여 이물질 선별 장치(100) 전체의 동작을 제어할 수 있다. 프로세서(140)는 데이터를 처리할 수 있는 모든 종류의 장치를 포함할 수 있다. 여기서, '프로세서(processor)'는, 예를 들어 프로그램 내에 포함된 코드 또는 명령어로 표현된 기능을 수행하기 위해 물리적으로 구조화된 회로를 갖는, 하드웨어에 내장된 데이터 처리 장치를 의미할 수 있다.The processor 140, as a kind of central processing unit, may control the entire operation of the foreign material sorting apparatus 100 by driving control software loaded in the memory 130. The processor 140 may include any type of device capable of processing data. Here, a 'processor' may refer to a data processing device embedded in hardware having a physically structured circuit to perform functions expressed by codes or instructions included in a program, for example.

이상 설명된 본 발명에 따른 실시 예는 컴퓨터 상에서 다양한 구성요소를 통하여 실행될 수 있는 컴퓨터 프로그램의 형태로 구현될 수 있으며, 이와 같은 컴퓨터 프로그램은 컴퓨터로 판독 가능한 매체에 기록될 수 있다. 이때, 매체는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등과 같은, 프로그램 명령어를 저장하고 실행하도록 특별히 구성된 하드웨어 장치를 포함할 수 있다.Embodiments according to the present invention described above may be implemented in the form of a computer program that can be executed on a computer through various components, and such a computer program may be recorded on a computer-readable medium. At this time, the medium is a magnetic medium such as a hard disk, a floppy disk and a magnetic tape, an optical recording medium such as a CD-ROM and a DVD, a magneto-optical medium such as a floptical disk, and a ROM hardware devices specially configured to store and execute program instructions, such as RAM, flash memory, and the like.

한편, 상기 컴퓨터 프로그램은 본 발명을 위하여 특별히 설계되고 구성된 것이거나 컴퓨터 소프트웨어 분야의 통상의 기술자에게 공지되어 사용 가능한 것일 수 있다. 컴퓨터 프로그램의 예에는, 컴파일러에 의하여 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용하여 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함될 수 있다.Meanwhile, the computer program may be specially designed and configured for the present invention, or may be known and usable to those skilled in the art in the field of computer software. Examples of computer programs may include not only machine language codes generated by a compiler but also high-level language codes that can be executed by a computer using an interpreter or the like.

본 발명의 명세서(특히 특허청구범위에서)에서 "상기"의 용어 및 이와 유사한 지시 용어의 사용은 단수 및 복수 모두에 해당하는 것일 수 있다. 또한, 본 발명에서 범위(range)를 기재한 경우 상기 범위에 속하는 개별적인 값을 적용한 발명을 포함하는 것으로서(이에 반하는 기재가 없다면), 발명의 상세한 설명에 상기 범위를 구성하는 각 개별적인 값을 기재한 것과 같다. In the specification of the present invention (particularly in the claims), the use of the term "above" and similar indicating terms may correspond to both singular and plural. In addition, when a range is described in the present invention, it includes an invention in which individual values belonging to the range are applied (unless there is a description to the contrary), and each individual value constituting the range is described in the detailed description of the invention Same as

본 발명에 따른 방법을 구성하는 단계들에 대하여 명백하게 순서를 기재하거나 반하는 기재가 없다면, 상기 단계들은 적당한 순서로 행해질 수 있다. 반드시 상기 단계들의 기재 순서에 따라 본 발명이 한정되는 것은 아니다. 본 발명에서 모든 예들 또는 예시적인 용어(예들 들어, 등등)의 사용은 단순히 본 발명을 상세히 설명하기 위한 것으로서 특허청구범위에 의해 한정되지 않는 이상 상기 예들 또는 예시적인 용어로 인해 본 발명의 범위가 한정되는 것은 아니다. 또한, 통상의 기술자는 다양한 수정, 조합 및 변경이 부가된 특허청구범위 또는 그 균등물의 범주 내에서 설계 조건 및 팩터에 따라 구성될 수 있음을 알 수 있다.The steps constituting the method according to the present invention may be performed in any suitable order unless an order is explicitly stated or stated to the contrary. The present invention is not necessarily limited according to the order of description of the steps. The use of all examples or exemplary terms (eg, etc.) in the present invention is simply to explain the present invention in detail, and the scope of the present invention is limited due to the examples or exemplary terms unless limited by the claims. it is not going to be In addition, those skilled in the art can appreciate that various modifications, combinations and changes can be made according to design conditions and factors within the scope of the appended claims or equivalents thereof.

따라서, 본 발명의 사상은 상기 설명된 실시 예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 또는 이로부터 등가적으로 변경된 모든 범위는 본 발명의 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention should not be limited to the above-described embodiments and should not be determined, and all scopes equivalent to or equivalently changed from the claims as well as the claims described below are within the scope of the spirit of the present invention. will be said to belong to

1 : 이물질 선별 시스템
100 : 이물질 선별 장치
110 : 통신부
120 : 사용자 인터페이스
130 : 메모리
140 : 프로세서
200 : 사용자 단말
300 : 서버
400 : 네트워크
1: Foreign matter screening system
100: foreign matter sorting device
110: Communication Department
120: user interface
130: memory
140: processor
200: user terminal
300: server
400: Network

Claims (20)

각 단계의 적어도 일부가 프로세서에 의해 수행되는 이물질 선별 방법으로서,
선별 대상 객체를 포함하는 전체 이미지를 획득하여, 상기 전체 이미지에서 배경과 상기 선별 대상 객체를 구분하기 위한 전처리를 수행하는 단계;
상기 전처리를 수행한 이미지의 색 공간(color space)에 기반하여 각 픽셀별 색상 정보를 검출하는 단계;
상기 검출한 각 픽셀 별 색상 정보를 기반으로 정상 객체에 해당하는 색상 범위를 산출하는 단계; 및
상기 산출한 색상 범위를 기준으로 각 픽셀 별 색상 정보와 비교한 결과에 따라 객체 이미지 내 이물질 여부를 판단하는 단계를 포함하는,
이물질 선별 방법.
A foreign material screening method in which at least a part of each step is performed by a processor,
acquiring an entire image including the object to be sorted, and performing preprocessing for distinguishing the object from the background in the entire image;
detecting color information for each pixel based on a color space of the preprocessed image;
calculating a color range corresponding to a normal object based on the detected color information for each pixel; and
Determining whether there is a foreign substance in the object image according to the result of comparing the color information for each pixel based on the calculated color range,
Foreign material screening method.
제 1 항에 있어서,
상기 전처리를 수행하는 단계 이전에, 배경 이미지를 획득하여 상기 배경 이미지에서 각 픽셀별로 측정된 회색조 값(gray value)을 획득하는 단계; 및
상기 배경 이미지의 각 픽셀의 회색조 평균값을 산출하는 단계를 더 포함하고,
상기 전처리를 수행하는 단계는,
상기 배경 이미지의 각 픽셀의 회색조 평균값과 상기 전체 이미지의 각 픽셀들을 비교한 결과에 기초하여 이진화를 수행하는 단계를 포함하는,
이물질 선별 방법.
According to claim 1,
obtaining a background image and a gray value measured for each pixel in the background image before performing the preprocessing; and
Calculating an average grayscale value of each pixel of the background image;
Performing the preprocessing step,
Performing binarization based on a result of comparing the grayscale average value of each pixel of the background image with each pixel of the entire image,
Foreign material screening method.
제 2 항에 있어서,
상기 전처리를 수행하는 단계는,
상기 이진화를 수행하는 단계 이전에, 상기 전체 이미지의 노이즈를 제거하는 단계를 더 포함하는,
이물질 선별 방법.
According to claim 2,
Performing the preprocessing step,
Before the step of performing the binarization, further comprising removing noise from the entire image,
Foreign material screening method.
제 1 항에 있어서,
상기 각 픽셀별 색상 정보를 검출하는 단계는,
상기 전체 이미지에서 상기 선별 대상 객체 영역의 픽셀별 RGB(Red, Green, Blue) 값을 획득하는 단계; 및
기 설정된 색 공간 변환 알고리즘에 기반하여 상기 선별 대상 객체 영역의 픽셀별 RGB 값을 HSV(Hue, Saturation, Value) 값으로 변환하는 단계를 포함하는,
이물질 선별 방법.
According to claim 1,
In the step of detecting color information for each pixel,
acquiring red, green, and blue (RGB) values for each pixel of the target object region in the entire image; and
Converting RGB values of each pixel of the target object region to HSV (Hue, Saturation, Value) values based on a preset color space conversion algorithm.
Foreign material screening method.
제 4 항에 있어서,
상기 기 설정된 색 공간 변환 알고리즘은,
아래의 수학식 1을 기반으로, 상기 선별 대상 객체 영역의 픽셀별 RGB 값을 색상(Hue)값, 채도(Saturation)값 및 명도(Value)값 각각으로 변환하도록 설정된,
이물질 선별 방법.
수학식 1
Figure pat00008

According to claim 4,
The preset color space conversion algorithm,
Based on Equation 1 below, RGB values for each pixel of the object region to be sorted are set to be converted into Hue values, Saturation values, and Value values, respectively.
Foreign material screening method.
Equation 1
Figure pat00008

제 4 항에 있어서,
상기 정상 객체에 해당하는 색상 범위를 산출하는 단계는,
배경을 제외한 상기 전체 이미지의 모든 픽셀의 HSV 평균값을 산출하는 단계;
상기 모든 픽셀의 HSV 평균값과 상기 배경을 제외한 상기 전체 이미지의 각 픽셀의 HSV 값을 비교하여, 편차를 산출하는 단계; 및
상기 편차의 평균값을 산출하여 상기 정상 객체에 해당하는 색상 범위로 설정하는 단계를 포함하는,
이물질 선별 방법.
According to claim 4,
Calculating the color range corresponding to the normal object,
Calculating an average HSV value of all pixels of the entire image excluding the background;
calculating a deviation by comparing the average HSV value of all pixels with the HSV value of each pixel of the entire image excluding the background; and
Comprising the step of calculating the average value of the deviation and setting it as a color range corresponding to the normal object,
Foreign material screening method.
제 6 항에 있어서,
상기 정상 객체에 해당하는 색상 범위를 산출하는 단계는,
상기 전체 이미지 촬영 환경에 기반하여 색상 범위 산출을 위한 가중치를 조정하는 단계를 포함하는,
이물질 선별 방법.
According to claim 6,
Calculating the color range corresponding to the normal object,
Adjusting weights for color range calculation based on the entire image capturing environment,
Foreign material screening method.
제 7 항에 있어서,
상기 가중치를 조정하는 단계는,
상기 전체 이미지 촬영 환경의 밝기를 검출하는 단계; 및
상기 검출한 밝기에 따라 상기 가중치를 조정하는 단계를 포함하는,
이물질 선별 방법.
According to claim 7,
In the step of adjusting the weight,
detecting the brightness of the entire image capturing environment; and
Including the step of adjusting the weight according to the detected brightness,
Foreign material screening method.
제 6 항에 있어서,
상기 객체 이미지 내 이물질 여부를 판단하는 단계는,
상기 전체 이미지 내 특정 픽셀의 HSV 값과 상기 모든 픽셀의 HSV 평균값의 편차와, 상기 정상 객체에 해당하는 색상 범위의 편차의 평균값을 비교하는 단계; 및
상기 비교 결과, 상기 전체 이미지 내 특정 픽셀의 HSV 값과 상기 모든 픽셀의 HSV 평균값의 편차가 상기 정상 색상 범위 값 이하이면 정상 객체로 판단하고, 그렇지 않으면 이물질로 판단하는 단계를 포함하는,
이물질 선별 방법.
According to claim 6,
The step of determining whether or not there is a foreign substance in the object image,
comparing a deviation between an HSV value of a specific pixel and an average HSV value of all pixels in the entire image and an average value of deviations of a color range corresponding to the normal object; and
As a result of the comparison, if the deviation between the HSV value of a specific pixel and the average HSV value of all the pixels in the entire image is less than or equal to the normal color range value, determining the object as a normal object, otherwise determining it as a foreign substance.
Foreign material screening method.
제 1 항에 있어서,
상기 객체 이미지 내 이물질이 있는 것으로 판단되면, 해당 객체 이미지의 윤곽선을 검출하는 단계; 및
상기 검출된 윤곽선을 제거하는 단계를 더 포함하는,
이물질 선별 방법.
According to claim 1,
detecting an outline of the corresponding object image when it is determined that there is a foreign substance in the object image; and
Further comprising the step of removing the detected contour,
Foreign material screening method.
적어도 하나의 프로세서에 의해 실행될 때, 상기 적어도 하나의 프로세서로 하여금 제 1 항 내지 제 10 항 중 어느 하나의 항의 방법을 수행하게 하는 프로그램이 기록된, 컴퓨터에서 판독 가능한 기록 매체.
A computer-readable recording medium having recorded thereon a program that, when executed by at least one processor, causes the at least one processor to perform the method of any one of claims 1 to 10.
이물질 선별 장치로서,
적어도 하나의 명령어를 저장하는 메모리; 및
상기 메모리와 연동되어 상기 명령어를 실행하는 적어도 하나의 프로세서를 포함하되,
상기 명령어는 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금,
선별 대상 객체를 포함하는 전체 이미지를 획득하여, 상기 전체 이미지에서 배경과 상기 선별 대상 객체를 구분하기 위한 전처리를 수행하고,
상기 전처리를 수행한 이미지의 색 공간(color space)에 기반하여 각 픽셀별 색상 정보를 검출하며,
상기 검출한 각 픽셀 별 색상 정보를 기반으로 정상 객체에 해당하는 색상 범위를 산출하고,
상기 산출한 색상 범위를 기준으로 각 픽셀 별 색상 정보와 비교한 결과에 따라 객체 이미지 내 이물질 여부를 판단하도록 설정되는,
이물질 선별 장치.
As a foreign matter screening device,
a memory storing at least one instruction; and
Including at least one processor for executing the command in conjunction with the memory,
When the instruction is executed by the processor, it causes the processor to:
Obtaining an entire image including a target object to be sorted, and performing preprocessing for distinguishing the background and the object to be sorted in the entire image;
Detecting color information for each pixel based on a color space of the preprocessed image;
Based on the detected color information for each pixel, a color range corresponding to a normal object is calculated;
Based on the calculated color range, it is set to determine whether or not there is a foreign substance in the object image according to the result of comparing the color information for each pixel.
Foreign matter sorting device.
제 12 항에 있어서,
상기 명령어는 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금,
상기 전처리를 수행하기 전에, 배경 이미지를 획득하여 상기 배경 이미지에서 각 픽셀별로 측정된 회색조 값(gray value)을 획득하고,
상기 배경 이미지의 각 픽셀의 회색조 평균값을 산출하도록 설정되며,
상기 배경 이미지의 각 픽셀의 회색조 평균값과 상기 전체 이미지의 각 픽셀들을 비교한 결과에 기초해 이진화를 수행하여 전처리를 수행하도록 설정되는,
이물질 선별 장치.
According to claim 12,
When the instruction is executed by the processor, it causes the processor to:
Before performing the preprocessing, obtaining a background image to obtain a gray value measured for each pixel in the background image;
It is set to calculate the grayscale average value of each pixel of the background image,
Set to perform preprocessing by performing binarization based on a result of comparing the grayscale average value of each pixel of the background image with each pixel of the entire image,
Foreign matter sorting device.
제 12 항에 있어서,
상기 명령어는 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금,
상기 전체 이미지에서 상기 선별 대상 객체 영역의 픽셀별 RGB(Red, Green, Blue) 값을 획득하고,
기 설정된 색 공간 변환 알고리즘에 기반하여 상기 선별 대상 객체 영역의 픽셀별 RGB 값을 HSV(Hue, Saturation, Value) 값으로 변환해, 각 픽셀별 색상 정보를 검출하도록 설정되는,
이물질 선별 장치.
According to claim 12,
When the instruction is executed by the processor, it causes the processor to:
Obtaining RGB (Red, Green, Blue) values for each pixel of the object region to be sorted in the entire image;
Based on a preset color space conversion algorithm, RGB values for each pixel of the target object region are converted to HSV (Hue, Saturation, Value) values to detect color information for each pixel.
Foreign matter sorting device.
제 14 항에 있어서,
상기 기 설정된 색 공간 변환 알고리즘은,
아래의 수학식 1을 기반으로, 상기 선별 대상 객체 영역의 픽셀별 RGB 값을 색상(Hue)값, 채도(Saturation)값 및 명도(Value)값 각각으로 변환하도록 설정된,
이물질 선별 장치.
수학식 1
Figure pat00009

15. The method of claim 14,
The preset color space conversion algorithm,
Based on Equation 1 below, RGB values for each pixel of the object region to be sorted are set to be converted into Hue values, Saturation values, and Value values, respectively.
Foreign matter sorting device.
Equation 1
Figure pat00009

제 14 항에 있어서,
상기 명령어는 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금,
배경을 제외한 상기 전체 이미지의 모든 픽셀의 HSV 평균값을 산출하고,
상기 모든 픽셀의 HSV 평균값과 상기 배경을 제외한 상기 전체 이미지의 각 픽셀의 HSV 값을 비교하여, 편차를 산출하며,
상기 편차의 평균값을 산출하여 상기 정상 객체에 해당하는 색상 범위로 결정하도록 설정되는,
이물질 선별 장치.
15. The method of claim 14,
When the instruction is executed by the processor, it causes the processor to:
Calculate the HSV average value of all pixels of the entire image excluding the background;
Comparing the HSV average value of all the pixels with the HSV value of each pixel of the entire image excluding the background to calculate a deviation;
Set to determine the color range corresponding to the normal object by calculating the average value of the deviation,
Foreign matter sorting device.
제 16 항에 있어서,
상기 명령어는 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금,
상기 정상 객체에 해당하는 색상 범위 산출 시, 상기 전체 이미지 촬영 환경에 기반하여 색상 범위 산출을 위한 가중치를 조정하도록 설정되는,
이물질 선별 장치.
17. The method of claim 16,
When the instruction is executed by the processor, it causes the processor to:
When calculating the color range corresponding to the normal object, it is set to adjust the weight for calculating the color range based on the entire image shooting environment,
Foreign matter sorting device.
제 17 항에 있어서,
상기 명령어는 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금,
상기 가중치 조정 시, 상기 전체 이미지 촬영 환경의 밝기를 검출하고,
상기 검출한 밝기에 따라 상기 가중치를 조정하도록 설정되는,
이물질 선별 장치.
18. The method of claim 17,
When the instruction is executed by the processor, it causes the processor to:
Detecting the brightness of the entire image capturing environment when adjusting the weights;
Set to adjust the weight according to the detected brightness,
Foreign matter sorting device.
제 16 항에 있어서,
상기 명령어는 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금,
상기 전체 이미지 내 특정 픽셀의 HSV 값과 상기 모든 픽셀의 HSV 평균값의 편차와, 상기 정상 객체에 해당하는 색상 범위의 편차의 평균값을 비교하고,
상기 비교 결과, 상기 전체 이미지 내 특정 픽셀의 HSV 값과 상기 모든 픽셀의 HSV 평균값의 편차가 상기 정상 색상 범위 값 이하이면 정상 객체로 판단하고, 그렇지 않으면 이물질로 판단하도록 설정되는,
이물질 선별 장치.
17. The method of claim 16,
When the instruction is executed by the processor, it causes the processor to:
Comparing a deviation between the HSV value of a specific pixel in the entire image and an average HSV value of all pixels, and an average value of deviations of a color range corresponding to the normal object;
As a result of the comparison, if the deviation between the HSV value of a specific pixel and the average HSV value of all pixels in the entire image is less than or equal to the normal color range value, it is determined as a normal object, and otherwise determined as a foreign substance.
Foreign matter sorting device.
제 12 항에 있어서,
상기 명령어는 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금,
상기 객체 이미지 내 이물질이 있는 것으로 판단되면, 해당 객체 이미지의 윤곽선을 검출하고,
상기 검출된 윤곽선을 제거하도록 설정되는,
이물질 선별 장치.
According to claim 12,
When the instruction is executed by the processor, it causes the processor to:
If it is determined that there is a foreign substance in the object image, detecting the contour of the object image,
Set to remove the detected contour,
Foreign matter sorting device.
KR1020210135092A 2021-10-12 2021-10-12 Method and apparatus for classifying foreign matter KR20230052014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210135092A KR20230052014A (en) 2021-10-12 2021-10-12 Method and apparatus for classifying foreign matter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210135092A KR20230052014A (en) 2021-10-12 2021-10-12 Method and apparatus for classifying foreign matter

Publications (1)

Publication Number Publication Date
KR20230052014A true KR20230052014A (en) 2023-04-19

Family

ID=86142144

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210135092A KR20230052014A (en) 2021-10-12 2021-10-12 Method and apparatus for classifying foreign matter

Country Status (1)

Country Link
KR (1) KR20230052014A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117250200A (en) * 2023-11-07 2023-12-19 山东恒业金属制品有限公司 Square pipe production quality detection system based on machine vision

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101751681B1 (en) 2015-12-04 2017-06-29 충북대학교 산학협력단 System for detecting foreign substance

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101751681B1 (en) 2015-12-04 2017-06-29 충북대학교 산학협력단 System for detecting foreign substance

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117250200A (en) * 2023-11-07 2023-12-19 山东恒业金属制品有限公司 Square pipe production quality detection system based on machine vision
CN117250200B (en) * 2023-11-07 2024-02-02 山东恒业金属制品有限公司 Square pipe production quality detection system based on machine vision

Similar Documents

Publication Publication Date Title
CN110516609B (en) Fire disaster video detection and early warning method based on image multi-feature fusion
US11087447B2 (en) Systems and methods for quality assurance of image recognition model
AU2016374520B2 (en) Method and apparatus for identifying fragmented material portions within an image
JP5496509B2 (en) System, method, and apparatus for image processing for color classification and skin color detection
CN108197546B (en) Illumination processing method and device in face recognition, computer equipment and storage medium
US9070044B2 (en) Image adjustment
JPS59218084A (en) Visible image processing method
CN111815564B (en) Method and device for detecting silk ingots and silk ingot sorting system
RU2581567C2 (en) System and method for digital image signal compression using true images
KR101891631B1 (en) Image learnig device, image analysis system and method using the device, computer readable medium for performing the method
KR102397396B1 (en) Image processing method and device for auto white balance
Oliveira Santos et al. Automatic mapping of cracking patterns on concrete surfaces with biological stains using hyper‐spectral images processing
CN113792827B (en) Target object recognition method, electronic device, and computer-readable storage medium
Toylan et al. A real-time apple grading system using multicolor space
KR20230052014A (en) Method and apparatus for classifying foreign matter
JP5740147B2 (en) Light source estimation apparatus and light source estimation method
US8526717B2 (en) Rich color transition curve tracking method
JP2000306191A (en) Area division and device for extracting object
CN112257501A (en) Face feature enhancement display method and device, electronic equipment and medium
KR20200011727A (en) Method for selecting spectral bandwidth of hyperspectral image and spectral bandwidth selection apparatus using the same
Dehesa‐González et al. Lighting source classification applied in color images to contrast enhancement
Shen et al. A holistic image segmentation framework for cloud detection and extraction
KR102015620B1 (en) System and Method for detecting Metallic Particles
WO2020216938A1 (en) Method and system for generating optical spectra
Schwalbe et al. Profile based sub-pixel-classification of hemispherical images for solar radiation analysis in forest ecosystems

Legal Events

Date Code Title Description
E902 Notification of reason for refusal