KR102144474B1 - Method for detecting injurious insect in image - Google Patents

Method for detecting injurious insect in image Download PDF

Info

Publication number
KR102144474B1
KR102144474B1 KR1020190090804A KR20190090804A KR102144474B1 KR 102144474 B1 KR102144474 B1 KR 102144474B1 KR 1020190090804 A KR1020190090804 A KR 1020190090804A KR 20190090804 A KR20190090804 A KR 20190090804A KR 102144474 B1 KR102144474 B1 KR 102144474B1
Authority
KR
South Korea
Prior art keywords
pest
image
crop
mask
calculating
Prior art date
Application number
KR1020190090804A
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 KR1020190090804A priority Critical patent/KR102144474B1/en
Application granted granted Critical
Publication of KR102144474B1 publication Critical patent/KR102144474B1/en

Links

Images

Classifications

    • G06K9/00362
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • G06K9/4652
    • G06K9/6201
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4015Image demosaicing, e.g. colour filter arrays [CFA] or Bayer patterns
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Catching Or Destruction (AREA)
  • Image Processing (AREA)

Abstract

The present invention relates to a method for detecting a pest in an image. More specifically, after generating an image from which a background area has been removed using a mask calculated by considering properties of the crop included in the image, and detecting pests located in a crop region in the image, the method for detecting a pest can more accurately detects pests existing in the crop from the image photographed from various environments. The present invention, the method of detecting a pest from an image by a pest detection system comprises: a first image acquisition step of obtaining a first image including a first crop; a mask generation step of generating a first mask for a region corresponding to the first crop in the first image in consideration of the property of the first crop; a second image calculating step of calculating a second image from which the background of the first crop has been removed from the first image using the first mask; and a pest detection step of detecting the pest from the second image.

Description

영상에서의 해충 검출 방법{METHOD FOR DETECTING INJURIOUS INSECT IN IMAGE}How to detect pests in images{METHOD FOR DETECTING INJURIOUS INSECT IN IMAGE}

본 발명은 영상에서의 해충 검출 방법에 관한 것으로서, 보다 구체적으로는 영상에 포함되는 작물의 속성을 고려하여 산출되는 마스크를 이용해 배경 영역이 제거된 영상을 생성한 후, 상기 영상에서 작물 영역에 위치하는 해충을 검출함으로써, 다양한 환경에서 촬영된 영상에서 작물에 존재하는 해충을 보다 정확하게 검출할 수 있는 해충 검출 방법에 관한 것이다.The present invention relates to a method of detecting pests in an image, and more specifically, after generating an image from which a background region has been removed using a mask calculated in consideration of the properties of a crop included in the image, the image is positioned in the crop region. The present invention relates to a pest detection method capable of more accurately detecting pests present in crops from images photographed in various environments by detecting the pest.

최근 농업 분야에서도 사물인터넷(IoT), 로봇, 인공지능 등의 신기술을 도입하여 지능화된 농장 즉 스마트팜(Smart Farm)을 구현하여 고품질의 농산물을 보다 높은 생산성으로 생산하기 위한 시도가 활발하게 이루어지고 있다. 보다 구체적으로, 파프리카 등과 같은 온실 작물 재배는 경제성이 높고 대량 재배가 가능하다는 장점이 있어 스마트팜에 적용하기에 유리하다. In recent years, in the agricultural field, attempts to produce high-quality agricultural products with higher productivity by implementing new technologies such as Internet of Things (IoT), robots, and artificial intelligence have been actively made by implementing an intelligent farm, that is, a smart farm. have. More specifically, cultivation of greenhouse crops such as paprika is advantageous for application to smart farms because it has the advantage that it is economical and enables mass cultivation.

그런데, 위와 같은 온실 작물 재배를 위해서는 효과적인 해충 방제가 중요하며, 종래에는 농약을 살포하여 해충을 방제하는 방식이 주로 사용되었다. 그러나, 최근에는 농약의 과다 사용으로 인한 환경 오염 문제, 친환경 농산물 수요의 급격한 증가 등으로 인하여 농약 사용을 최소화하면서도 효율적으로 해충을 방제하기 위한 방안이 요구되고 있다.However, effective pest control is important for cultivation of greenhouse crops as described above, and conventionally, a method of controlling pests by spraying pesticides has been mainly used. However, in recent years, due to environmental pollution problems due to excessive use of pesticides, rapid increase in demand for eco-friendly agricultural products, and the like, there is a demand for a method for efficiently controlling pests while minimizing the use of pesticides.

이와 관련하여, 농약 사용량을 줄이면서 효과적인 해충 방제를 구현하기 위해서는 농작물에 존재하는 해충의 종류 및 개체수 등에 대한 정확한 파악이 요구되나, 종래에는 이를 위하여 통상 작업자가 직접 육안으로 해충의 종류와 개체수를 파악하면서 상당한 시간과 노력이 소요될 뿐만 아니라 수집되는 데이터의 신뢰도도 떨어지는 문제점이 있었다.In this regard, in order to implement effective pest control while reducing the use of pesticides, it is required to accurately identify the type and number of pests present in the crop, but conventionally, for this purpose, workers usually directly identify the type and number of pests with the naked eye. While doing so, it takes considerable time and effort, and there is a problem that the reliability of the collected data is also poor.

이에 대하여, 대한민국 공개특허 제10-2018-0057851호에서는 카메라 등을 이용하여 촬영된 영상을 분석하여 해충의 종류 및 개체수를 파악하는 기술을 개시하고 있다. 그런데, 위 기술에서는 컬러 영상을 흑백 영상으로 변환한 뒤 잡음을 제거하고 샤프닝(sharpening) 필터를 통과시켜 영상에 있는 해충의 윤곽선을 부각시킨 후, 상기 윤곽선을 데이터베이스에 저장된 해충의 패턴과 비교하여 해충의 종류 및 개체수를 파악하는 방법을 사용하고 있다. On the other hand, Korean Patent Application Publication No. 10-2018-0057851 discloses a technology for determining the type and number of pests by analyzing images captured using a camera or the like. However, in the above technology, after converting a color image into a black and white image, noise is removed, a sharpening filter is passed to highlight the contour of the pest in the image, and the contour is compared with the pattern of the pest stored in the database. We are using a method to determine the type and number of species.

그러나, 이러한 경우 컬러 영상을 흑백 영상으로 변환하게 되면서 작물이나 배경에 대한 정보를 추출하는데 제한을 받게 되며, 나아가 실제 촬영된 영상에는 작물과 해충뿐만 아니라 배경에도 다양한 객체가 포함될 수 있어 해충 외에 다양한 객체의 윤곽선으로 인한 오류 발생 가능성이 커지게 된다.However, in this case, as the color image is converted into a black-and-white image, it is limited in extracting information on the crop or background. Furthermore, the actual captured image may contain various objects in the background as well as crops and pests. The possibility of error due to the outline of is increased.

이에 따라, 영상에 포함되는 작물의 색상 등을 고려하여 영상에서 작물 영역과 배경 영역을 구분하고, 작물 영역에 위치하는 해충을 보다 정확하게 검출할 수 있는 영상에서의 해충 검출 방법의 개발이 요구되고 있다.Accordingly, there is a need to develop a method for detecting pests in an image that can distinguish a crop area and a background area in an image by considering the color of a crop included in the image, and more accurately detect pests located in the crop area. .

대한민국 공개특허 제10-2018-0057851호(2018년 5월 31일 공개)Republic of Korea Patent Publication No. 10-2018-0057851 (published on May 31, 2018)

본 발명은 상기와 같은 종래 기술의 문제점을 해결하기 위해 창안된 것으로, 영상에서 작물 영역과 배경 영역을 구분한 후 상기 작물 영역에서 해충을 검출함으로써, 다양한 환경에서 촬영된 영상에서 작물 상에 존재하는 해충을 보다 정확하게 검출할 수 있는 해충 검출 방법을 제공하는 것을 목적으로 한다.The present invention was invented to solve the problems of the prior art as described above, and by detecting pests in the crop area after dividing the crop area and the background area in the image, An object of the present invention is to provide a pest detection method capable of more accurately detecting pests.

그 외 본 발명의 세부적인 목적은 아래에 기재되는 구체적인 내용을 통하여 이 기술 분야의 전문가나 연구자에게 자명하게 파악되고 이해될 수 있을 것이다.In addition, detailed objects of the present invention will be clearly understood and understood by experts or researchers in this technical field through the detailed contents described below.

상기 과제를 해결하기 위한 본 발명의 한 측면에 따른 영상에서의 해충 검출 방법은, 해충 검출 시스템이 영상에서 해충을 검출하는 방법에 있어서, 제1 작물을 포함하는 제1 영상을 획득하는 제1 영상 획득 단계; 상기 제1 작물의 속성을 고려하여 상기 제1 영상에서 상기 제1 작물에 대응하는 영역에 대한 제1 마스크를 생성하는 마스크 생성 단계; 상기 제1 마스크를 이용하여 상기 제1 영상에서 상기 제1 작물에 대한 배경이 제거된 제2 영상을 산출하는 제2 영상 산출 단계; 및 상기 제2 영상에서 해충을 검출하는 해충 검출 단계;를 포함하는 것을 특징으로 한다.In the method of detecting pests in an image according to an aspect of the present invention for solving the above problem, in the method for detecting pests in an image by a pest detection system, a first image for obtaining a first image including a first crop Acquisition phase; A mask generation step of generating a first mask for a region corresponding to the first crop in the first image in consideration of the property of the first crop; A second image calculating step of calculating a second image from which the background of the first crop has been removed from the first image using the first mask; And a pest detection step of detecting the pest from the second image.

이때, 상기 마스크 생성 단계는, 상기 제1 영상을 HSV 색상 좌표계로 변환하여 제1 변환 영상을 생성하는 색상 좌표계 변환 단계; 및 상기 제1 작물의 색상(Hue)을 고려하여 상기 제1 변환 영상으로부터 상기 제1 작물에 대응하는 영역을 제1 마스크로 산출하는 제1 마스크 산출 단계;를 포함할 수 있다.In this case, the generating of the mask may include transforming the first image into an HSV color coordinate system to generate a first transformed image; And a first mask calculating step of calculating a region corresponding to the first crop from the first transformed image in consideration of the hue of the first crop as a first mask.

또한, 상기 마스크 생성 단계는, 상기 산출된 제1 마스크에 대하여 팽창(dilation) 연산을 통해 상기 해충에 해당하는 영역을 복구하는 단계;를 더 포함할 수 있다.In addition, the generating of the mask may further include restoring a region corresponding to the pest through a dilation operation on the calculated first mask.

여기서, 상기 제1 마스크 산출 단계에서는, 상기 제1 작물의 채도(Satruration) 또는 명도(Value) 중 하나 이상을 상기 제1 작물의 색상(Hue)과 함께 고려하여 상기 제1 마스크를 산출할 수 있다.Here, in the first mask calculation step, the first mask may be calculated by considering at least one of the saturation or the value of the first crop together with the hue of the first crop. .

또한, 상기 제2 영상 산출 단계에서, 상기 제2 영상은 상기 제1 작물에 대응하는 영역에 대한 컬러 정보를 포함하는 컬러 영상일 수 있다.In addition, in the second image calculation step, the second image may be a color image including color information on a region corresponding to the first crop.

또한, 상기 해충 검출 단계는, 상기 제2 영상에 대하여 분류기를 이용하여 해충 후보 영역을 산출하는 해충 후보 영역 산출 단계; 및 검출하고자 하는 상기 해충에 대해 미리 정해진 색상(Hue)을 고려하여 상기 해충 후보 영역에서 해충을 선별하는 해충 검증 단계;를 포함할 수 있다.In addition, the pest detection step may include: a pest candidate region calculating step of calculating a pest candidate region using a classifier for the second image; And a pest verification step of selecting a pest from the pest candidate region in consideration of a predetermined hue for the pest to be detected.

이때, 상기 해충 후보 영역 산출 단계에서는, 상기 제2 영상에 대하여 미리 저장된 해충의 템플릿(template) 데이터를 대비하여 해충 후보 영역을 산출할 수 있다.In this case, in the step of calculating the pest candidate region, the pest candidate region may be calculated by comparing template data of the pest previously stored with respect to the second image.

나아가, 상기 해충 검증 단계에서는, 상기 해충의 채도(Satruration) 또는 명도(Value) 중 하나 이상을 상기 해충의 색상(Hue)과 함께 고려하여 상기 해충 후보 영역에서 해충을 선별할 수 있다.Further, in the pest verification step, the pest can be selected from the pest candidate region by considering at least one of the saturation or the value of the pest together with the hue of the pest.

또한, 상기 해충 검증 단계에서는, 상기 해충의 색상(Hue)과 함께 상기 해충 후보 영역의 고유 벡터(eigen vector)와 고유값(eigen value)을 고려하여 상기 해충 후보 영역에서 해충을 선별할 수 있다.In addition, in the pest verification step, a pest may be selected from the pest candidate area by considering an eigen vector and an eigen value of the pest candidate area along with the hue of the pest.

이에 따라, 본 발명의 일 실시예에 따른 영상에서의 해충 검출 방법에서는, 작물을 촬영한 영상에서 작물의 속성을 고려하여 산출된 마스크를 이용해 배경 영역이 제거된 영상을 생성한 후, 상기 영상에서 작물 영역에 존재하는 해충을 검출함으로써, 다양한 작업 환경의 영상에서 작물에 존재하는 해충을 보다 정확하게 검출할 할 수 있게 된다.Accordingly, in the method of detecting pests in an image according to an embodiment of the present invention, an image from which a background region is removed is generated using a mask calculated in consideration of the property of a crop from an image photographed of a crop. By detecting the pests present in the crop region, it is possible to more accurately detect the pests present in the crop from images of various working environments.

또한, 본 발명의 일 실시예에 따른 영상에서의 해충 검출 방법에서는, 영상에서 배경 영역을 제거함으로써, 영상 처리에 소요되는 시간 및 전산 자원을 효과적으로 절감할 수 있게 된다.In addition, in the method for detecting pests in an image according to an exemplary embodiment of the present invention, by removing a background region from an image, it is possible to effectively save time and computing resources required for image processing.

본 발명에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부도면은 본 발명에 대한 실시예를 제공하고, 상세한 설명과 함께 본 발명의 기술적 사상을 설명한다.
도 1은 본 발명의 일 실시예에 따른 해충 검출 시스템의 동작을 설명하는 도면이다.
도 2는 본 발명의 일 실시예에 따른 해충 검출 방법의 순서도이다.
도 3은 본 발명의 일 실시예에 따른 해충 검출 시스템의 구성도이다.
도 4는 본 발명의 일 실시예에 따른 해충 검출 방법의 동작을 설명하는 도면이다.
도 5는 본 발명의 일 실시예에 따른 해충 검출 방법에서 마스크 생성 단계에 대한 구체적인 순서도이다.
도 6a와 도 6b는 본 발명의 일 실시예에 따른 해충 검출 방법에서의 마스크 생성을 예시하는 도면이다.
도 7은 본 발명의 일 실시예에 따른 해충 검출 방법에서 해충 검출 단계에 대한 구체적인 순서도이다.
도 8은 본 발명의 일 실시예에 따른 해충 검출 방법에서 해충 검출 결과를 예시하는 도면이다.
도 9는 본 발명의 일 실시예에 따른 해충 검출 방법의 구체적인 실시예를 예시하는 순서도이다.
The accompanying drawings, which are included as part of the detailed description to aid in understanding of the present invention, provide embodiments for the present invention, and describe the technical idea of the present invention together with the detailed description.
1 is a diagram illustrating an operation of a pest detection system according to an embodiment of the present invention.
2 is a flow chart of a pest detection method according to an embodiment of the present invention.
3 is a configuration diagram of a pest detection system according to an embodiment of the present invention.
4 is a view for explaining the operation of the pest detection method according to an embodiment of the present invention.
5 is a detailed flowchart of a mask generation step in a method for detecting pests according to an embodiment of the present invention.
6A and 6B are diagrams illustrating mask generation in a method for detecting pests according to an embodiment of the present invention.
7 is a detailed flow chart for a pest detection step in the pest detection method according to an embodiment of the present invention.
8 is a diagram illustrating a pest detection result in a pest detection method according to an embodiment of the present invention.
9 is a flow chart illustrating a specific embodiment of a pest detection method according to an embodiment of the present invention.

본 발명은 다양한 변환을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 이하에서는 특정 실시예들을 첨부된 도면을 기초로 상세히 설명하고자 한다.The present invention may apply various transformations and may have various embodiments. Hereinafter, specific embodiments will be described in detail based on the accompanying drawings.

이하의 실시예는 본 명세서에서 기술된 방법, 장치 및/또는 시스템에 대한 포괄적인 이해를 돕기 위해 제공된다. 그러나 이는 예시에 불과하며 본 발명은 이에 제한되지 않는다.The following examples are provided to aid in a comprehensive understanding of the methods, apparatus and/or systems described herein. However, this is only an example and the present invention is not limited thereto.

본 발명의 실시예들을 설명함에 있어서, 본 발명과 관련된 공지기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. 상세한 설명에서 사용되는 용어는 단지 본 발명의 실시 예들을 기술하기 위한 것이며, 결코 제한적이어서는 안 된다. 명확하게 달리 사용되지 않는 한, 단수 형태의 표현은 복수 형태의 의미를 포함한다. 본 설명에서, "포함" 또는 "구비"와 같은 표현은 어떤 특성들, 숫자들, 단계들, 동작들, 요소들, 이들의 일부 또는 조합을 가리키기 위한 것이며, 기술된 것 이외에 하나 또는 그 이상의 다른 특성, 숫자, 단계, 동작, 요소, 이들의 일부 또는 조합의 존재 또는 가능성을 배제하도록 해석되어서는 안 된다. In describing the embodiments of the present invention, when it is determined that a detailed description of known technologies related to the present invention may unnecessarily obscure the subject matter of the present invention, a detailed description thereof will be omitted. In addition, terms to be described later are terms defined in consideration of functions in the present invention, which may vary according to the intention or custom of users or operators. Therefore, the definition should be made based on the contents throughout this specification. The terms used in the detailed description are only for describing the embodiments of the present invention, and should not be limiting. Unless explicitly used otherwise, expressions in the singular form include the meaning of the plural form. In this description, expressions such as "comprising" or "feature" are intended to refer to certain features, numbers, steps, actions, elements, some or combination thereof, and one or more other than those described. It should not be construed to exclude the presence or possibility of other features, numbers, steps, actions, elements, any part or combination thereof.

또한, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되는 것은 아니며, 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.In addition, terms such as first and second may be used to describe various components, but the components are not limited by the terms, and the terms are used to distinguish one component from other components. Is only used.

아래에서는, 본 발명의 일 실시예에 따른 영상에서의 해충 검출 방법 및 시스템에 대한 예시적인 실시 형태들을 첨부된 도면을 참조하여 차례로 설명한다.Hereinafter, exemplary embodiments of a method and system for detecting a pest in an image according to an embodiment of the present invention will be described in order with reference to the accompanying drawings.

먼저, 도 1에서는 본 발명의 일 실시예에 따른 해충 검출 시스템(100)의 동작을 설명하는 도면을 예시하고 있다. 이때, 본 발명의 일 실시예에 따른 해충 검출 시스템(100)은 이동 수단을 구비하는 로봇 등의 형태로 구성될 수 있다. 또한, 상기 해충 검출 시스템(100)은 카메라 등 영상 촬영 수단을 구비하여 작물에 대한 영상을 획득할 수 있다.First, FIG. 1 illustrates a diagram for explaining the operation of the pest detection system 100 according to an embodiment of the present invention. In this case, the pest detection system 100 according to an embodiment of the present invention may be configured in the form of a robot including a moving means. In addition, the pest detection system 100 may acquire an image of a crop by including an image photographing means such as a camera.

이에 따라, 상기 해충 검출 시스템(100)은 도 1에서 볼 수 있는 바와 같이 작업지를 순차적으로 이동하면서(도 1의 ①, ②, ③) 작물에 대한 영상을 주기적 또는 비주기적으로 획득할 수 있다.Accordingly, the pest detection system 100 may acquire images of crops periodically or aperiodically while sequentially moving the work site as shown in FIG. 1 (1, 2, 3 of FIG. 1).

또한, 본 발명의 일 실시예에 따른 해충 검출 시스템(100)은 상기 획득된 작물에 대한 영상을 분석하여 작물에 존재하는 해충의 종류 및 개체수를 산출할 수 있다. 나아가, 상기 해충 검출 시스템(100)은 상기 작업지를 복수의 작업 영역으로 나누어 각 작업 영역 별로(예를 들어, 도 1의 (A1), (A2), (A3)) 작물에 존재하는 해충의 종류 및 개체수를 파악할 수도 있다.In addition, the pest detection system 100 according to an embodiment of the present invention may calculate the type and number of pests present in the crop by analyzing the acquired image of the crop. Further, the pest detection system 100 divides the work area into a plurality of work areas, and each work area (for example, (A1), (A2), (A3) of FIG. 1) And it is also possible to determine the number of individuals.

그러나, 본 발명이 반드시 이에 한정되는 것은 아니며, 본 발명에서 해충 검출 시스템(100)은 이동 수단을 구비하지 않거나 카메라 등 영상 촬영 수단을 구비하지 않고 구성하는 것도 가능하다. 예를 들어, 상기 해충 검출 시스템(100)은 상기 작업지 외부의 특정 공간에 배치되는 서버 등으로 구성되어, 작업자 등이 카메라를 구비하는 장치 등으로 촬영한 작물에 대한 영상을 전송받아 분석하여 작물에 존재하는 해충의 종류 및 개체수를 산출할 수 있으며, 또는 작업자가 휴대하는 스마트폰 등의 장치에 설치되어 구동되는 어플리케이션 등 다양한 형태로 구현될 수 있다.However, the present invention is not necessarily limited thereto, and in the present invention, the pest detection system 100 may be configured without a moving means or an image photographing means such as a camera. For example, the pest detection system 100 is composed of a server disposed in a specific space outside the work site, and receives and analyzes an image of a crop captured by a device equipped with a camera by a worker, etc. It is possible to calculate the type and the number of pests present in, or can be implemented in various forms such as an application installed and driven in a device such as a smartphone carried by a worker.

또한, 도 2에서는 본 발명의 일 실시예에 따른 해충 검출 방법의 순서도를 도시하고 있다. 도 2에서 볼 수 있는 바와 같이, 본 발명의 일 실시예에 따른 해충 검출 방법은, 해충 검출 시스템(100)이 영상에서 해충을 검출하는 방법으로서, 제1 작물을 포함하는 제1 영상을 획득하는 제1 영상 획득 단계(S110), 상기 제1 작물의 속성을 고려하여 상기 제1 영상에서 상기 제1 작물에 대응하는 영역에 대한 제1 마스크를 생성하는 마스크 생성 단계(S120), 상기 제1 마스크를 이용하여 상기 제1 영상에서 상기 제1 작물에 대한 배경이 제거된 제2 영상을 산출하는 제2 영상 산출 단계(S130) 및 상기 제2 영상에서 해충을 검출하는 해충 검출 단계(S140)를 포함할 수 있다.In addition, Figure 2 shows a flow chart of a pest detection method according to an embodiment of the present invention. As can be seen in FIG. 2, the pest detection method according to an embodiment of the present invention is a method for the pest detection system 100 to detect pests in an image, in which a first image including a first crop is acquired. A first image acquisition step (S110), a mask generation step (S120) of generating a first mask for a region corresponding to the first crop in the first image in consideration of the property of the first crop, the first mask Including a second image calculation step (S130) of calculating a second image from which the background of the first crop has been removed from the first image and a pest detection step (S140) of detecting a pest from the second image. can do.

또한, 도 3에서는 본 발명의 일 실시예에 따른 해충 검출 시스템(100)의 구성도를 도시하고 있다. 도 3에서 볼 수 있는 바와 같이, 본 발명의 일 실시예에 따른 해충 검출 시스템(100)은, 제1 작물을 포함하는 제1 영상을 획득하는 제1 영상 획득부(110), 상기 제1 작물의 속성을 고려하여 상기 제1 영상에서 상기 제1 작물에 대응하는 영역에 대한 제1 마스크를 생성하는 마스크 생성부(120), 상기 제1 마스크를 이용하여 상기 제1 영상에서 상기 제1 작물에 대한 배경이 제거된 제2 영상을 산출하는 제2 영상 산출부(130), 제2 영상에서 해충을 검출하는 해충 검출부(140) 및 이들을 제어하는 제어부(150)를 포함하여 구성될 수 있다.In addition, Figure 3 shows a configuration diagram of a pest detection system 100 according to an embodiment of the present invention. As can be seen in FIG. 3, the pest detection system 100 according to an embodiment of the present invention includes a first image acquisition unit 110 for acquiring a first image including a first crop, and the first crop A mask generator 120 that generates a first mask for a region corresponding to the first crop in the first image in consideration of the property of, and uses the first mask to apply the first crop to the first crop in the first image. A second image calculation unit 130 for calculating a second image from which a background image has been removed, a pest detection unit 140 for detecting pests from the second image, and a control unit 150 for controlling them.

이에 따라, 본 발명의 일 실시예에 따른 해충 검출 방법 및 시스템(100)에서는, 도 4에서 볼 수 있는 바와 같이, 영상에 포함되는 제1 작물의 속성을 고려하여 산출되는 제1 마스크를 이용해 배경 영역이 제거된 제2 영상을 생성한 후, 상기 제2 영상에서 작물 영역에 위치하는 해충(예를 들어, 도 4의 (a))을 검출함으로써, 다양한 환경에서 촬영된 영상에서 나타날 수 있는 오류(예를 들어, 도 4(b)의 "템플릿 매칭 오류")를 효과적으로 방지하고 작물에 존재하는 해충을 보다 정확하게 검출할 수 있게 된다. Accordingly, in the pest detection method and system 100 according to an embodiment of the present invention, as can be seen in FIG. 4, a background using a first mask calculated in consideration of the attribute of the first crop included in the image After generating the second image from which the region has been removed, the second image detects pests located in the crop region (e.g., Fig. 4(a)), so that errors that may appear in images taken in various environments (For example, "template matching error" in Fig. 4(b)) can be effectively prevented and pests present in crops can be more accurately detected.

이하, 도 2와 도 3을 참조하여 본 발명의 일 실시예에 따른 해충 검출 방법 및 시스템(100)을 각 구성 별로 나누어 보다 자세하게 설명한다.Hereinafter, a pest detection method and system 100 according to an embodiment of the present invention will be described in more detail by dividing each component with reference to FIGS. 2 and 3.

먼저, 상기 제1 영상 획득 단계(S110)에서는 상기 해충 검출 시스템(100)이 제1 작물을 포함하는 제1 영상을 획득하게 된다.First, in the first image acquisition step (S110), the pest detection system 100 acquires a first image including a first crop.

이때, 상기 해충 검출 시스템(100)은 카메라 등 영상 촬영 장치를 구비하여 직접 제1 작물에 대한 영상을 촬영할 수도 있으나, 본 발명이 반드시 이에 한정되는 것은 아니며, 유무선 통신 등을 통해 외부 장치에서 촬영된 제1 작물에 대한 영상을 수신하는 등 다양한 방식으로 구현하는 것도 가능하다.At this time, the pest detection system 100 may be provided with an image photographing device such as a camera to directly capture an image of the first crop, but the present invention is not necessarily limited thereto, and the image captured by an external device through wired or wireless communication, etc. It is also possible to implement in various ways, such as receiving an image of the first crop.

이어서, 상기 마스크 생성 단계(S120)에서는 상기 제1 작물의 속성을 고려하여 상기 제1 영상에서 상기 제1 작물에 대응하는 영역에 대한 제1 마스크를 생성하게 된다.Subsequently, in the mask generation step (S120), a first mask is generated for an area corresponding to the first crop in the first image in consideration of the property of the first crop.

이때, 상기 제1 작물의 속성으로서 상기 제1 작물의 색상 정보를 고려할 수 있겠으나, 본 발명이 반드시 이에 한정되는 것은 아니다.In this case, the color information of the first crop may be considered as an attribute of the first crop, but the present invention is not limited thereto.

이에 따라, 상기 마스크 생성 단계(S120)에서는 상기 제1 작물의 색상 정보 등을 고려하여 상기 제1 영상에서 상기 제1 작물에 대응하는 영역에 대한 제1 마스크를 생성할 수 있게 된다.Accordingly, in the mask generation step S120, a first mask may be generated for a region corresponding to the first crop in the first image in consideration of color information of the first crop.

보다 구체적으로, 도 5에서 볼 수 있는 바와 같이, 상기 마스크 생성 단계(S120)는, 상기 제1 영상을 HSV(Hue Saturation Value) 색상 좌표계로 변환하여 제1 변환 영상을 생성하는 색상 좌표계 변환 단계(S121) 및 상기 제1 작물의 색상(Hue)을 고려하여 상기 제1 변환 영상으로부터 상기 제1 작물에 대응하는 영역을 제1 마스크로 산출하는 제1 마스크 산출 단계(S122)를 포함할 수 있다.More specifically, as can be seen in FIG. 5, in the mask generation step S120, a color coordinate system conversion step of generating a first transformed image by converting the first image into a hue saturation value (HSV) color coordinate system ( S121) and calculating a region corresponding to the first crop from the first transformed image in consideration of the hue of the first crop as a first mask (S122).

나아가, 상기 마스크 생성 단계(S120)는, 상기 산출된 제1 마스크에 대하여 팽창(dilation) 연산을 통해 상기 해충에 해당하는 영역을 복구하는 단계(S123)를 더 포함할 수도 있다.Further, the mask generation step (S120) may further include restoring a region corresponding to the pest through a dilation operation on the calculated first mask (S123).

이때, 상기 색상 좌표계 변환 단계(S121)에서는 RGB(Red Green Blue) 색상 좌표계(색공간) 등으로 생성된 제1 영상을 HSV 색상 좌표계(색공간)으로 변환할 수 있다.In this case, in the color coordinate system conversion step (S121), the first image generated using a red green blue (RGB) color coordinate system (color space) or the like may be converted into an HSV color coordinate system (color space).

이에 따라, 상기 제1 마스크 산출 단계(S122)에서는 상기 제1 작물의 색상(Hue)을 고려하여 상기 제1 변환 영상으로부터 상기 제1 작물에 대응하는 영역을 제1 마스크로 산출할 수 있게 된다.Accordingly, in the first mask calculation step S122, a region corresponding to the first crop from the first transformed image may be calculated as the first mask in consideration of the hue of the first crop.

보다 구체적인 예를 들어, 도 6a에서 볼 수 있는 제1 작물(파프리카)을 포함하는 제1 영상의 경우, 제1 작물(파프리카)이 녹색 계열의 색상을 가지므로 상기 제1 작물(파프리카)의 색상에 해당하는 60~180도 범위의 색상을 가지는 작물 영역(즉, 제1 작물에 대응하는 영역)을 제1 마스크로 산출하게 된다.For a more specific example, in the case of the first image including the first crop (paprika) as seen in FIG. 6A, the first crop (paprika) has a green color, so the color of the first crop (paprika) A crop region (ie, a region corresponding to the first crop) having a color in the range of 60 to 180 degrees corresponding to is calculated as the first mask.

또한, 상기 제1 마스크 산출 단계(S122)에서는, 상기 제1 작물의 채도(Satruration) 또는 명도(Value) 중 하나 이상을 상기 제1 작물의 색상(Hue)과 함께 고려하여 상기 제1 마스크를 산출함으로써, 상기 제1 작물에 대응하는 영역에 대한 제1 마스크를 보다 정확하게 산출할 수도 있다.In addition, in the first mask calculation step (S122), the first mask is calculated by considering one or more of the saturation or the value of the first crop together with the hue of the first crop. By doing so, it is possible to more accurately calculate the first mask for the region corresponding to the first crop.

나아가, 상기 마스크 생성 단계(S120)에는, 상기 산출된 제1 마스크에 대하여 팽창(dilation) 연산을 통해 상기 해충에 해당하는 영역을 복구하는 단계(S123)가 더 포함될 수 있다.Further, the mask generation step S120 may further include a step S123 of restoring a region corresponding to the pest through a dilation operation on the calculated first mask.

보다 구체적인 예를 들어, 도 6a에서 상기 제1 작물(파프리카)의 색상(Hue) 등의 정보 만을 이용하여 제1 마스크를 생성하는 경우, 상기 제1 작물(파프리카)의 색상(녹색)과 다른 색상을 가지는 해충의 경우(예를 들어, 도 4(a)의 적색 해충) 상기 제1 마스크에서 제외되면서 제2 영상에서 배경과 함께 제거되어 해충 검출이 어려워지는 문제가 따를 수 있다.For a more specific example, when the first mask is generated using only information such as the hue of the first crop (paprika) in FIG. 6A, a color different from the color (green) of the first crop (paprika) In the case of a pest having a (for example, a red pest of FIG. 4A), it may be removed from the first mask and removed together with the background from the second image, thereby making it difficult to detect the pest.

이에 따라, 본 발명에서는 상기 마스크 생성 단계(S120)에서 상기 산출된 제1 마스크에 대하여 팽창(dilation) 연산을 통해 상기 해충에 해당하는 영역을 복구하는 단계(S123)를 포함하여 상기 해충에 해당하는 영역을 복구하여 제1 마스크에 포함되도록 할 수 있다.Accordingly, in the present invention, including the step (S123) of restoring a region corresponding to the pest through a dilation operation on the first mask calculated in the mask generation step (S120), The region may be restored to be included in the first mask.

다음으로, 상기 제2 영상 산출 단계(S130)에서는, 상기 제1 마스크를 이용하여 상기 제1 영상에서 상기 제1 작물에 대한 배경이 제거된 제2 영상을 산출하게 된다.Next, in the second image calculating step (S130), a second image from which the background of the first crop is removed from the first image is calculated using the first mask.

이에 따라, 상기 제2 영상 산출 단계(S130)에서는, 도 6b에서 볼 수 있는 바와 같이, 상기 제1 영상에서 상기 제1 작물에 대한 배경이 제거된 제2 영상을 얻을 수 있게 된다.Accordingly, in the second image calculation step (S130), as shown in FIG. 6B, a second image from which the background of the first crop is removed from the first image may be obtained.

이때, 상기 제2 영상 산출 단계(S130)을 거쳐 생성되는 상기 제2 영상은, 도 6b에서 볼 수 있는 바와 같이, 상기 제1 작물에 대응하는 영역에 대한 컬러 정보를 포함하는 컬러 영상일 수 있다.In this case, the second image generated through the second image calculation step (S130) may be a color image including color information on a region corresponding to the first crop, as shown in FIG. 6B. .

이에 따라, 본 발명의 일 실시예에 따른 해충 검출 방법 및 시스템(100)에서는 상기 제1 작물 및 해충에 대한 컬러 정보를 포함하는 제2 영상을 이용하여 해충을 검출함으로써, 보다 정확하게 해충을 검출할 수 있게 된다.Accordingly, in the pest detection method and system 100 according to an embodiment of the present invention, by detecting the pest by using the second image including color information on the first crop and the pest, the pest can be more accurately detected. You will be able to.

또한, 상기 해충 검출 단계(S140)에서는 상기 제2 영상에서 해충을 검출하게 된다.In addition, in the pest detection step (S140), the pest is detected from the second image.

이때, 상기 제2 영상에서 해충을 검출하기 위하여 템플릿 매칭 기법을 사용할 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니다. 나아가, 상기 해충 검출 단계(S140)에서는 상기 제2 영상을 흑백 영상으로 변환시키지 않고 컬러 영상인 상태에서 템플릿 매칭 기법을 적용하여 해충을 검출할 수 있다.In this case, a template matching technique may be used to detect pests in the second image, but the present invention is not limited thereto. Further, in the pest detection step S140, the second image is not converted into a black-and-white image, and a template matching technique may be applied while the second image is a color image to detect the pest.

보다 구체적으로, 도 8에서 볼 수 있는 바와 같이, 상기 해충 검출 단계(S140)는, 상기 제2 영상에 대하여 분류기를 이용하여 해충 후보 영역을 산출하는 해충 후보 영역 산출 단계(S141) 및 검출하고자 하는 상기 해충에 대해 미리 정해진 색상(Hue)을 고려하여 상기 해충 후보 영역에서 해충을 선별하는 해충 검증 단계(S142)를 포함할 수 있다.More specifically, as can be seen in FIG. 8, the pest detection step (S140) includes a pest candidate region calculation step (S141) of calculating a pest candidate region using a classifier for the second image, and It may include a pest verification step (S142) of selecting a pest from the pest candidate area in consideration of a predetermined color (Hue) for the pest.

이때, 상기 해충 후보 영역 산출 단계(S141)에서는, 상기 제2 영상에 대하여 미리 저장된 해충의 템플릿(template) 데이터를 대비하여 해충 후보 영역을 산출할 수 있다.In this case, in the calculating of the pest candidate region (S141), the pest candidate region may be calculated by comparing the template data of the pest previously stored with respect to the second image.

이에 따라, 상기 해충 후보 영역 산출 단계(S141)에서 상기 제2 영상에 대하여 분류기를 이용하여 해충 후보 영역을 산출한 후, 상기 해충 검증 단계(S142)에서 검출하고자 하는 상기 해충에 대해 미리 정해진 색상(Hue)을 고려하여 상기 해충 후보 영역에서 해충을 선별할 수 있으며, 나아가 상기 해충의 채도(Satruration) 또는 명도(Value) 중 하나 이상을 상기 해충의 색상(Hue)과 함께 고려하여 상기 해충 후보 영역에서 해충을 선별할 수도 있다.Accordingly, after calculating a pest candidate region using a classifier for the second image in the pest candidate region calculating step (S141), a predetermined color for the pest to be detected in the pest verifying step (S142) ( Hue) can be selected in the pest candidate region, and furthermore, one or more of the saturation or brightness of the pest is considered together with the color (Hue) of the pest in the pest candidate region. You can also screen for pests.

이때, 상기 분류기는 미리 저장된 해충의 템플릿 데이터를 대비하여 해충을 선별할 수도 있겠으나, 본 발명이 반드시 이에 한정되는 것은 아니며, 이외에도 기계 학습 등 영상을 분류하는 다양한 기법들을 이용하여 상기 분류기를 구성하는 것도 가능하다.In this case, the classifier may select pests by comparing pre-stored template data of pests, but the present invention is not necessarily limited thereto, and in addition, the classifier is configured using various techniques for classifying images such as machine learning. It is also possible.

이에 따라, 본 발명의 일 실시예에 따른 해충 검출 방법 및 시스템(100)에서는 분류기를 이용하여 해충 후보 영역을 산출한 후, 상기 해충 후보 영역에 대하여 색상 등을 고려하여 해충을 선별하여 줌으로써 해충의 오검출을 억제할 수 있게 된다.Accordingly, in the method and system 100 for detecting pests according to an embodiment of the present invention, after calculating a pest candidate area using a classifier, the pest candidate area is selected in consideration of color, etc. It becomes possible to suppress false detection.

보다 구체적으로, 상기 해충 후보 영역에서 해충에 대응하는 색상의 비율이 미리 정해진 기준치를 충족하는지를 기준으로 상기 해충에 해당하는지 여부를 선별할 수 있다.More specifically, it is possible to select whether the pest candidate region corresponds to the pest based on whether the ratio of the color corresponding to the pest satisfies a predetermined reference value.

보다 구체적인 예를 들어, 도 8에서 볼 수 있는 바와 같이, 해충 후보 영역 (B1), (B2), (B3)의 경우를 살펴보면, (B1) 및 (B2)의 경우 해충의 색상에 해당하는 영역(적색)과 작물의 색상에 해당하는 영역(녹색)의 비율이 미리 정해진 기준치(예를 들어 50%)를 초과하므로 해충으로 판단될 수 있겠으나, (B3)의 경우 적색 영역이 작아 미리 정해진 기준치를 만족시키지 못하여 해충이 아닌 것으로 판단될 수 있다.For a more specific example, as can be seen in FIG. 8, looking at the pest candidate regions (B1), (B2), and (B3), in the case of (B1) and (B2), the regions corresponding to the color of the pest Since the ratio of (red) and the area corresponding to the color of the crop (green) exceeds a predetermined reference value (for example, 50%), it may be judged as a pest. It can be determined that it is not a pest because it does not satisfy.

나아가, 상기 해충 검증 단계(S142)에서는 상기 해충의 색상(Hue)과 함께 상기 해충 후보 영역의 고유값(eigen value)을 고려하여 상기 해충 후보 영역에서 해충을 선별할 수 있다.Further, in the pest verification step (S142), a pest may be selected from the pest candidate area in consideration of an eigen value of the pest candidate area together with the color Hue of the pest.

보다 구체적으로, 해충은 그 종류에 따라 길쭉하거나 동그란 형상을 가지는 등 일정한 형상을 가지는 바, 그에 따라 상기 형상의 장축 및 단축의 길이도 일정한 비율을 가지게 된다. 이에 따라, 본 발명에서는 상기 해충 후보 영역의 고유 벡터(eigen vector) 및 고유값(eigen value)을 고려하여 해충 형상의 장축과 단축의 비율을 산출하고 이를 기준으로 해충에 해당하는지 여부를 추가적으로 선별하여 줌으로써, 보다 정확하게 해충을 선별할 수 있게 된다.More specifically, the pest has a certain shape, such as having an elongated or round shape according to the type, and accordingly, the length of the long axis and the short axis of the shape also have a certain ratio. Accordingly, in the present invention, the ratio of the long axis and the short axis of the pest shape is calculated by considering the eigen vector and the eigen value of the pest candidate region, and additionally selecting whether it corresponds to a pest based on this By giving, it is possible to more accurately screen pests.

또한, 도 9에서는 본 발명의 일 실시예에 따른 해충 검출 방법의 구체적인 실시예를 예시하고 있다. 이하, 도 9를 참조하여 본 발명의 일 실시예에 따른 해충 검출 방법을 보다 구체적으로 살핀다.In addition, Figure 9 illustrates a specific embodiment of a pest detection method according to an embodiment of the present invention. Hereinafter, a pest detection method according to an embodiment of the present invention will be examined in more detail with reference to FIG. 9.

먼저, 도 9에서 볼 수 있는 바와 같이, S210 단계에서는 해충 검출 시스템(100)이 제1 작물인 파프리카에 대한 제1 영상을 획득하게 된다.First, as can be seen in FIG. 9, in step S210, the pest detection system 100 acquires a first image of paprika, which is a first crop.

이때, 상기 해충 검출 시스템(100)에는 카메라 등 영상 촬영 장치가 구비될 수도 있겠으나, 본 발명이 이에 한정되지는 않으며 외부 장치에서 생성된 제1 영상을 유무선 통신 수단을 통해 수신할 수도 있다.In this case, the pest detection system 100 may be provided with an image photographing device such as a camera, but the present invention is not limited thereto, and the first image generated by an external device may be received through a wired or wireless communication means.

이어서, S220 단계에서는, 상기 제1 영상을 HSV 색상좌표계로 변환하여 제1 변환 영상을 생성하게 된다. 이때, 상기 제1 영상은 RGB 색상좌표계의 영상일 수 있으나, 반드시 이에 한정되는 것은 아니다.Subsequently, in step S220, the first image is converted into an HSV color coordinate system to generate a first converted image. In this case, the first image may be an image of an RGB color coordinate system, but is not limited thereto.

다음으로, S230 단계에서는 상기 제1 작물(파프리카)의 색상 등의 속성에 대응하는 제1 마스크를 생성하게 된다.Next, in step S230, a first mask corresponding to an attribute such as color of the first crop (paprika) is generated.

보다 구체적인 예를 들어, 상기 제1 변환 영상의 HSV 정보에서 상기 제1 작물(파프리카)의 색상인 녹색에 해당하는 영역은 1로 하고 이외의 색상은 0으로 하여 제1 마스크를 생성할 수 있다.For a more specific example, in the HSV information of the first transformed image, a first mask may be generated by setting an area corresponding to green, which is the color of the first crop (paprika), to 1 and other colors to 0.

다음으로, S240 단계에서는 상기 제1 마스크에 대하여 팽창(dilation) 연산을 통해 해충에 해당하는 영역을 복구하여 줌으로써 해충 정보가 소실되는 것을 방지하게 된다.Next, in step S240, an area corresponding to a pest is restored through a dilation operation on the first mask, thereby preventing the pest information from being lost.

이어서, S250 단계에서는 상기 제1 작물(파프리카)이 포함된 제1 영상에 상기 제1 마스크를 적용하여 배경 영역을 제거한 제2 영상을 생성하게 된다.Subsequently, in step S250, a second image from which a background region is removed is generated by applying the first mask to the first image including the first crop (paprika).

또한, S260 단계에서는 상기 제2 영상에 대하여 미리 저장된 해충의 템플릿(template) 데이터를 대비하는 템플릿 매칭 기술을 통해 해충 후보 영역을 검출하게 된다.In addition, in step S260, a pest candidate region is detected through a template matching technique that compares template data of a pest previously stored with respect to the second image.

다음으로, S270 단계에서는 상기 해충 후보 영역에 대하여, HSV 색상좌표계의 색상(Hue) 값과 함께 채도(Saturation) 또는 명도(Value) 중 하나 이상을 고려하여 해충을 검출한 후, S280 단계에서는 상기 S270 단계의 해충 검출 결과에 대하여 상기 색상, 채도, 명도 값에 해당하는 픽셀의 비율이 미리 정해진 기준치(threshold)에 해당하는지를 기준으로 위양성인 결과를 제거하여 검증하는 단계를 거치게 된다.Next, in step S270, after detecting a pest in consideration of one or more of saturation or brightness, along with a hue value of the HSV color coordinate system, for the pest candidate region, in step S280, the pest is detected. With respect to the pest detection result in step, a false-positive result is removed and verified based on whether the ratio of pixels corresponding to the hue, saturation, and brightness values corresponds to a predetermined threshold.

보다 구체적인 예를 들어, 상기 S270 단계에서는 상기 해충 후보 영역에 대하여 색상(Hue) 값이 특정 해충의 색상 범위인 20보다 작거나 220보다 크고, 또한 채도(Saturation) 값이 특정 해충의 채도 범위인 20보다 크게 되면 해충으로 분류할 수 있다.For a more specific example, in step S270, the hue value for the pest candidate region is less than or greater than 20, which is the color range of the specific pest, and the saturation value is 20, which is the saturation range of the specific pest. If it is larger, it can be classified as a pest.

이어서, 상기 S280 단계에서는 S270 조건을 만족하는 픽셀의 숫자의 상기 해충 후보 영역(박스 영역)에 대한 비율을 산출한 후, 상기 비율이 미리 정해진 기준치(예를 들어, 12퍼센트 이상 75퍼센트 이하)에 해당할 경우 해충으로 판단하고, 그에 해당하지 않을 경우 위양성으로 판단하여 해충이 아닌 것으로 판단할 수 있다.Subsequently, in the step S280, after calculating the ratio of the number of pixels satisfying the condition S270 to the pest candidate area (box area), the ratio is set to a predetermined reference value (eg, 12% or more and 75% or less). If applicable, it can be judged as a pest, and if not, it can be judged as false positive and judged as not a pest.

이에 따라, 본 발명의 일 실시예에 따른 영상에서의 해충 검출 방법 및 시스템(100)에서는, 제1 작물을 촬영한 제1 영상에서 상기 제1 작물의 속성을 고려하여 산출된 제1 마스크를 이용해 배경 영역이 제거된 제2 영상을 생성한 후, 상기 제2 영상에서 작물 영역에 존재하는 해충을 검출함으로써, 다양한 작업 환경의 영상에서 작물에 존재하는 해충을 보다 정확하게 검출할 할 수 있으며, 또한 상기 제1 영상에서 배경 영역을 제거하고 해충 후보 영역을 산출하여 해충을 검출함으로써, 영상 처리에 소요되는 시간 및 전산 자원을 효과적으로 절감할 수 있게 된다.Accordingly, in the method and system 100 for detecting pests in an image according to an embodiment of the present invention, the first mask calculated in consideration of the attribute of the first crop is used in the first image photographing the first crop. After generating the second image from which the background region has been removed, by detecting the pests present in the crop region from the second image, it is possible to more accurately detect the pests present in the crop from the images of various working environments. By removing the background region from the first image and calculating the pest candidate region to detect the pest, it is possible to effectively reduce the time required for image processing and computational resources.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서 본 발명에 기재된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의해서 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and those of ordinary skill in the art to which the present invention pertains will be able to make various modifications and variations without departing from the essential characteristics of the present invention. Therefore, the embodiments described in the present invention are not intended to limit the technical idea of the present invention, but to explain, and are not limited to these embodiments. The scope of protection of the present invention should be interpreted by the following claims, and all technical ideas within the scope equivalent thereto should be interpreted as being included in the scope of the present invention.

100 : 해충 검출 시스템
110 : 제1 영상 획득부
120 : 마스크 생성부
130 : 제2 영상 산출부
140 : 해충 검출부
150 : 제어부
100: pest detection system
110: first image acquisition unit
120: mask generation unit
130: second image calculation unit
140: pest detection unit
150: control unit

Claims (9)

해충 검출 시스템이 영상에서 해충을 검출하는 방법에 있어서,
제1 작물을 포함하는 제1 영상을 획득하는 제1 영상 획득 단계;
상기 제1 작물의 색상 정보를 고려하여 상기 제1 영상에서 상기 제1 작물에 대응하는 영역에 대한 제1 마스크를 생성하는 마스크 생성 단계;
상기 제1 마스크를 이용하여 상기 제1 영상에서 상기 제1 작물에 대한 배경이 제거되며 상기 제1 작물에 대응하는 영역에 위치하는 해충은 포함되는 제2 영상을 산출하는 제2 영상 산출 단계; 및
상기 제2 영상에서 상기 제1 작물 상에 위치하는 해충을 검출하는 해충 검출 단계;
를 포함하며,
상기 마스크 생성 단계에서는,
상기 해충이 상기 제1 작물과 상이한 색상 정보를 가지면서, 상기 제1 마스크는 상기 해충에 해당하는 영역이 제외되어 생성되며,
상기 생성된 제1 마스크에 대하여 팽창(dilation) 연산을 통해 상기 제1 작물에 대응하는 영역에서 제외되었던 해충에 해당하는 영역이 상기 제1 작물에 대응하는 영역에 포함되도록 복구하는 단계;
를 더 포함하는 영상에서의 해충 검출 방법.
In the method for the pest detection system to detect pests in the image,
A first image acquisition step of obtaining a first image including a first crop;
A mask generation step of generating a first mask for a region corresponding to the first crop in the first image in consideration of color information of the first crop;
A second image calculating step of calculating a second image in which the background of the first crop is removed from the first image using the first mask and pests located in a region corresponding to the first crop are included; And
A pest detection step of detecting pests located on the first crop in the second image;
Including,
In the mask generation step,
While the pest has color information different from the first crop, the first mask is generated by excluding the area corresponding to the pest,
Restoring an area corresponding to a pest that was excluded from the area corresponding to the first crop through a dilation operation on the generated first mask so that the area corresponding to the first crop is included in the area corresponding to the first crop;
Pest detection method in the image further comprising a.
제1항에 있어서,
상기 마스크 생성 단계는,
상기 제1 영상을 HSV 색상 좌표계로 변환하여 제1 변환 영상을 생성하는 색상 좌표계 변환 단계; 및
상기 제1 작물의 색상(Hue)을 고려하여 상기 제1 변환 영상으로부터 상기 제1 작물에 대응하는 영역을 제1 마스크로 산출하는 제1 마스크 산출 단계;
를 포함하는 영상에서의 해충 검출 방법.
The method of claim 1,
The mask generation step,
A color coordinate system transformation step of converting the first image into an HSV color coordinate system to generate a first transformed image; And
A first mask calculation step of calculating an area corresponding to the first crop from the first transformed image as a first mask in consideration of the hue of the first crop;
Pest detection method in the image comprising a.
삭제delete 제2항에 있어서,
상기 제1 마스크 산출 단계에서는,
상기 제1 작물의 채도(Satruration) 또는 명도(Value) 중 하나 이상을 상기 제1 작물의 색상(Hue)과 함께 고려하여 상기 제1 마스크를 산출하는 것을 특징으로 하는 영상에서의 해충 검출 방법.
The method of claim 2,
In the step of calculating the first mask,
The method of detecting pests in an image, characterized in that the first mask is calculated by considering at least one of the saturation or the value of the first crop together with the hue of the first crop.
제1항에 있어서,
상기 제2 영상 산출 단계에서,
상기 제2 영상은 상기 제1 작물에 대응하는 영역에 대한 컬러 정보를 포함하는 컬러 영상인 것을 특징으로 하는 영상에서의 해충 검출 방법.
The method of claim 1,
In the second image calculation step,
The second image is a color image including color information on a region corresponding to the first crop.
제1항에 있어서,
상기 해충 검출 단계는,
상기 제2 영상에 대하여 분류기를 이용하여 해충 후보 영역을 산출하는 해충 후보 영역 산출 단계; 및
검출하고자 하는 상기 해충에 대해 미리 정해진 색상(Hue)을 고려하여 상기 해충 후보 영역에서 해충을 선별하는 해충 검증 단계;
를 포함하는 영상에서의 해충 검출 방법.
The method of claim 1,
The pest detection step,
A pest candidate region calculating step of calculating a pest candidate region using a classifier for the second image; And
A pest verification step of selecting a pest from the pest candidate region in consideration of a predetermined hue for the pest to be detected;
Pest detection method in the image comprising a.
제6항에 있어서,
상기 해충 후보 영역 산출 단계에서는,
상기 제2 영상에 대하여 미리 저장된 해충의 템플릿(template) 데이터를 대비하여 해충 후보 영역을 산출하는 것을 특징으로 하는 영상에서의 해충 검출 방법.
The method of claim 6,
In the pest candidate region calculation step,
And calculating a pest candidate region by comparing the template data of the pest previously stored with respect to the second image.
제6항에 있어서,
상기 해충 검증 단계에서는,
상기 해충의 채도(Satruration) 또는 명도(Value) 중 하나 이상을 상기 해충의 색상(Hue)과 함께 고려하여 상기 해충 후보 영역에서 해충을 선별하는 것을 특징으로 하는 영상에서의 해충 검출 방법.
The method of claim 6,
In the pest verification step,
The pest detection method in an image, characterized in that for selecting the pest from the pest candidate region by considering at least one of the saturation (Satruration) or the brightness (Value) of the pest together with the color (Hue) of the pest.
제6항에 있어서,
상기 해충 검증 단계에서는,
상기 해충의 색상(Hue)과 함께 상기 해충 후보 영역의 고유 벡터(eigen vector)와 고유값(eigen value)을 고려하여 상기 해충 후보 영역에서 해충을 선별하는 것을 특징으로 하는 영상에서의 해충 검출 방법.
The method of claim 6,
In the pest verification step,
A method for detecting pests in an image, comprising selecting a pest from the pest candidate area by considering an eigen vector and an eigen value of the pest candidate area together with the hue of the pest.
KR1020190090804A 2019-07-26 2019-07-26 Method for detecting injurious insect in image KR102144474B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190090804A KR102144474B1 (en) 2019-07-26 2019-07-26 Method for detecting injurious insect in image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190090804A KR102144474B1 (en) 2019-07-26 2019-07-26 Method for detecting injurious insect in image

Publications (1)

Publication Number Publication Date
KR102144474B1 true KR102144474B1 (en) 2020-08-14

Family

ID=72050222

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190090804A KR102144474B1 (en) 2019-07-26 2019-07-26 Method for detecting injurious insect in image

Country Status (1)

Country Link
KR (1) KR102144474B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113155192A (en) * 2021-04-19 2021-07-23 河南省农业科学院农业经济与信息研究所 Intelligent crop table type real-time acquisition device
CN116569898A (en) * 2023-07-12 2023-08-11 闽都创新实验室 Intelligent pest control method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090049933A (en) * 2007-11-14 2009-05-19 부산대학교 산학협력단 System for recognizing vermin and method thereof
KR20110067791A (en) * 2009-12-15 2011-06-22 순천대학교 산학협력단 System for diagnosing diseases and insects of crops and method thereof
KR101206736B1 (en) * 2011-06-22 2012-11-30 중앙대학교 산학협력단 Apparatus and method for detecting rotated face region
KR20180057851A (en) 2016-11-23 2018-05-31 이선희 The pest recognition system, and method for controlling pest using the same
KR101967858B1 (en) * 2017-11-03 2019-04-11 전자부품연구원 Apparatus and method for separating objects based on 3D depth image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090049933A (en) * 2007-11-14 2009-05-19 부산대학교 산학협력단 System for recognizing vermin and method thereof
KR20110067791A (en) * 2009-12-15 2011-06-22 순천대학교 산학협력단 System for diagnosing diseases and insects of crops and method thereof
KR101206736B1 (en) * 2011-06-22 2012-11-30 중앙대학교 산학협력단 Apparatus and method for detecting rotated face region
KR20180057851A (en) 2016-11-23 2018-05-31 이선희 The pest recognition system, and method for controlling pest using the same
KR101967858B1 (en) * 2017-11-03 2019-04-11 전자부품연구원 Apparatus and method for separating objects based on 3D depth image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113155192A (en) * 2021-04-19 2021-07-23 河南省农业科学院农业经济与信息研究所 Intelligent crop table type real-time acquisition device
CN113155192B (en) * 2021-04-19 2022-09-16 河南省农业科学院农业经济与信息研究所 Intelligent crop table type real-time acquisition device
CN116569898A (en) * 2023-07-12 2023-08-11 闽都创新实验室 Intelligent pest control method and system

Similar Documents

Publication Publication Date Title
US11443498B2 (en) Target object recognition method and apparatus, storage medium, and electronic device
JP6330385B2 (en) Image processing apparatus, image processing method, and program
CN110570454B (en) Method and device for detecting foreign matter invasion
CN112380952A (en) Power equipment infrared image real-time detection and identification method based on artificial intelligence
US20160203367A1 (en) Video processing apparatus, video processing method, and video processing program
WO2018192662A1 (en) Defect classification in an image or printed output
KR102144474B1 (en) Method for detecting injurious insect in image
CN105844242A (en) Method for detecting skin color in image
US10769478B2 (en) Convolutional neutral network identification efficiency increasing method and related convolutional neutral network identification efficiency increasing device
KR20100038899A (en) Extraction method of skin-colored region using variable skin color model
CN112215201A (en) Method and device for evaluating face recognition model and classification model aiming at image
JP2018506046A (en) Method for detecting defects on the tire surface
CN105184771A (en) Adaptive moving target detection system and detection method
US11538238B2 (en) Method and system for performing image classification for object recognition
CN104202596A (en) Image color-cast detection method and system applied to intelligent terminal
CN108900895B (en) Method and device for shielding target area of video stream
Iocchi Robust color segmentation through adaptive color distribution transformation
CN111435457B (en) Method for classifying acquisitions acquired by sensors
CN115830641B (en) Employee identification method and device, electronic equipment and storage medium
CN111968078A (en) Appearance detection method, device, equipment and storage medium for power transformation equipment
CN115601712A (en) Image data processing method and system suitable for field safety measures
KR102531058B1 (en) System for Camouflage pattern evaluation based on image analysis and Method thereof
KR102416825B1 (en) Apparatus and method for tracking object using skeleton analysis
CN114820707A (en) Calculation method for camera target automatic tracking
CN113936209A (en) Cooperative operation method of patrol robot and related equipment

Legal Events

Date Code Title Description
AMND Amendment
X091 Application refused [patent]
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant