CN111476729B - Target identification method and device - Google Patents

Target identification method and device Download PDF

Info

Publication number
CN111476729B
CN111476729B CN202010245845.2A CN202010245845A CN111476729B CN 111476729 B CN111476729 B CN 111476729B CN 202010245845 A CN202010245845 A CN 202010245845A CN 111476729 B CN111476729 B CN 111476729B
Authority
CN
China
Prior art keywords
image
processed
pixel
pixels
processing area
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010245845.2A
Other languages
Chinese (zh)
Other versions
CN111476729A (en
Inventor
陕天龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202010245845.2A priority Critical patent/CN111476729B/en
Publication of CN111476729A publication Critical patent/CN111476729A/en
Application granted granted Critical
Publication of CN111476729B publication Critical patent/CN111476729B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The specification discloses a method and a device for target recognition, which can acquire an image to be processed and determine the image type of the image to be processed according to a target object to be recognized. According to the image type, loading an image processing template matched with the image to be processed, dividing each pixel processing area in the image to be processed according to the image processing template, processing pixels contained in the pixel processing area in the image to be processed through the image processing template according to each pixel processing area to obtain processed pixels corresponding to the pixel processing area, and generating a processed image corresponding to the image to be processed according to each processed pixel corresponding to each pixel processing area. After the image to be processed is obtained, an image processing template which is suitable for the image to be processed can be loaded, so that the unmanned equipment can process images of different image types, and the flexibility of processing the image to be processed is improved.

Description

Target identification method and device
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and apparatus for target recognition.
Background
Image sharpening is widely applied to various technical fields as a common image processing mode, and image data is processed by adopting image sharpening, so that the sharpened image data can be more clear in the parts of image contour, gray jump and the like, and the accuracy of subsequent image analysis can be effectively ensured.
After the unmanned device collects the image data, the image sharpening process is usually required to be carried out according to the fixed template, so that object recognition works such as obstacle recognition, traffic light recognition and the like can be carried out through the sharpened image data. However, in practical applications, the unmanned device may only perform sharpening processing on the image data in a fixed format by using the fixed template, for example, if the fixed template used by the unmanned device only supports sharpening processing of a black-and-white image, sharpening processing of the acquired color image cannot be performed, so that flexibility of sharpening processing of the image data by the unmanned device cannot be ensured.
Therefore, how to provide a more flexible method for image sharpening is a problem to be solved.
Disclosure of Invention
The present disclosure provides a method and apparatus for target recognition, so as to partially solve the above-mentioned problems in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides a method of target identification, comprising:
acquiring an image to be processed;
determining the image type corresponding to the image to be processed according to the target object to be identified;
loading an image processing template matched with the image type according to the image type;
dividing each pixel processing area in the image to be processed according to the image processing template;
for each pixel processing area, processing pixels contained in the pixel processing area in the image to be processed through the image processing template to obtain processed pixels corresponding to the pixel processing area;
and generating a processed image corresponding to the image to be processed according to each processed pixel corresponding to each pixel processing area, and carrying out target recognition through the processed image.
Optionally, dividing each pixel processing area in the image to be processed according to the image processing template, which specifically includes:
determining the size of a pixel processing area according to the size of the image processing template;
and dividing each pixel processing area in the image to be processed according to the size of the pixel processing area.
Optionally, according to the size of the pixel processing area, dividing each pixel processing area in the image to be processed, specifically including:
determining the number N of lines of pixels to be processed according to the size of the pixel processing area, wherein N is an integer greater than 1;
and dividing each pixel processing area in each N rows of pixels in the image to be processed according to the size of the pixel processing area.
Optionally, for each N rows of pixels in the image to be processed, each pixel processing area is divided in the N rows of pixels according to the size of the pixel processing area, and specifically includes:
extracting and caching the first N-1 rows of pixels from the N rows of pixels of the image to be processed;
and synchronously inputting the N-th row of pixels extracted from the N rows of pixels and the cached first N-1 rows of pixels into an image processor so as to enable the image processor to divide each pixel processing area in the N rows of pixels.
Optionally, for each pixel processing area, processing, by using the image processing template, a pixel included in the pixel processing area in the image to be processed to obtain a processed pixel corresponding to the pixel processing area, where the processing includes:
Determining a region characterization value corresponding to each pixel contained in the pixel processing region in the image to be processed through the image processing template;
determining a center pixel in the pixel processing area as a target pixel;
and adjusting the pixel value of the target pixel according to the region characterization value to obtain a processed target pixel, and taking the processed target pixel as a processed pixel corresponding to the pixel processing region.
Optionally, adjusting the pixel value of the target pixel according to the region characterization value to obtain a processed target pixel, which specifically includes:
determining a difference between a pixel value of the target pixel and the region characterization value;
and if the difference value is determined not to fall into the preset threshold range, adjusting the pixel value of the target pixel according to the difference value and a preset compensation coefficient to obtain the processed target pixel.
Optionally, the method further comprises:
and if the difference value is determined to fall into the threshold range, not adjusting the pixel value of the target pixel.
Optionally, generating a processed image corresponding to the image to be processed according to each processed pixel corresponding to each pixel processing area specifically includes:
And arranging the processed pixels corresponding to the pixel processing areas according to the positions of the pixel processing areas in the image to be processed to obtain the processed image corresponding to the image to be processed.
The present specification provides an apparatus for object recognition, comprising:
the acquisition module is used for acquiring the image to be processed;
the type determining module is used for determining the image type corresponding to the image to be processed according to the target object to be identified;
the loading module is used for loading an image processing template matched with the image type according to the image type;
the dividing module is used for dividing each pixel processing area in the image to be processed according to the image processing template;
the processing module is used for processing the pixels contained in the pixel processing area in the image to be processed through the image processing template aiming at each pixel processing area to obtain processed pixels corresponding to the pixel processing area;
and the identification module is used for generating a processed image corresponding to the image to be processed according to each processed pixel corresponding to each pixel processing area, and carrying out target identification through the processed image.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the method of object recognition described above.
The present specification provides an unmanned device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a method of target recognition as described above when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
in the target recognition method provided by the specification, an image to be processed can be obtained, an image type corresponding to the image to be processed is determined according to a target object to be recognized, then, an image processing template matched with the image type is loaded according to the image type, each pixel processing area is divided in the image to be processed according to the image processing template, for each pixel processing area, pixels contained in the pixel processing area in the image to be processed are processed through the image processing template, processed pixels corresponding to the pixel processing area are obtained, processed images corresponding to the image to be processed are generated according to each processed pixel corresponding to each pixel processing area, and target recognition is performed through the processed images.
According to the method, after the image to be processed is acquired, the image processing template which is suitable for the image to be processed can be loaded according to the image type corresponding to the image to be processed, so that the unmanned equipment can effectively process images of different image types, the flexibility of image processing of the image to be processed is effectively improved, and the efficiency and accuracy of target recognition of the unmanned equipment based on the processed image are ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
FIG. 1 is a schematic flow chart of a method for identifying an object provided in the present specification;
FIG. 2 is a schematic diagram of dividing each pixel processing region in an image to be processed by an image processing template provided in the present specification;
fig. 3 is a schematic diagram of the unmanned device provided in the present specification, in which each row of pixels is acquired row by row and each pixel processing area is divided;
FIG. 4 is a schematic diagram of the unmanned device provided in the present disclosure performing pixel compensation at the edge of an image to be processed;
FIG. 5 is a schematic diagram of an apparatus for object recognition provided in the present specification;
fig. 6 is a schematic view of the unmanned device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions in the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a method for identifying an object provided in the present specification, which specifically includes the following steps:
s101: and acquiring an image to be processed.
In this specification, an image to be processed that needs to be processed may be acquired, wherein an execution subject that acquires the image to be processed and processes it may refer to an unmanned apparatus such as an unmanned aerial vehicle, a robot, or the like. Based on this, the image processing method provided in the present specification is particularly applicable to the field of delivery using unmanned equipment, for example, a business scenario of delivery using unmanned equipment, such as express delivery, logistics, takeaway, and the like. In order to ensure that the unmanned device can smoothly travel in these business scenarios, it is necessary to effectively process the acquired images, so that the unmanned device can perform operations such as target recognition, path planning, and the like based on the processed images, and obtain more accurate results.
At least one image sensor (such as a camera, a depth camera, an infrared camera and the like) is arranged on the unmanned equipment, and based on the at least one image sensor, the unmanned equipment can acquire images through the arranged image sensor in the running process, so that an image to be processed is obtained.
S102: and determining the image type corresponding to the image to be processed according to the target object to be identified.
Because the image processing templates corresponding to different image types are different, after the unmanned device acquires the image to be processed, the image type of the image to be processed needs to be further determined, so that the image processing template suitable for the image to be processed is loaded in a subsequent process.
In the present specification, the unmanned device may determine the image type corresponding to the image to be processed according to the target object to be identified. Among them, the types of images mentioned herein can be classified into two types, one being a gray-scale image (i.e., black-and-white image) and one being a color image. Therefore, the image processing templates corresponding thereto can be classified into two types, one for sharpening the gray-scale image and one for sharpening the color image.
The unmanned device determining the image type corresponding to the image to be processed based on the target object to be identified means that the unmanned device may need to identify different target objects around or in front of the unmanned device in the driving process so as to ensure the safe driving of the unmanned device. For example, in the course of path planning, unmanned devices need to identify surrounding obstacles (e.g., obstacle vehicles, pedestrians, etc.); for another example, when the unmanned device determines that the unmanned device is about to reach the intersection according to the real-time positioning of the unmanned device, the state of the traffic indicator light at the intersection (such as the traffic indicator light is in a red light state or a green light state) needs to be identified.
The type of image required by the unmanned device is also different for different target objects. For example, in order to ensure the efficiency of target recognition, unmanned apparatuses often need to perform obstacle recognition using the acquired grayscale image; as another example, unmanned devices often need to identify the status of traffic lights in front based on acquired color images.
Based on the image, after the unmanned equipment collects the image to be processed, the image type corresponding to the image to be processed can be determined according to the target object to be identified, and then the image processing template which is suitable for the image to be processed is recorded in the subsequent process to process the image to be processed.
Of course, the unmanned device may determine the image type of the image to be processed in other manners. For example, the unmanned device may determine the image type of the image to be processed by an image sensor that captures the image to be processed. Specifically, the unmanned device may determine an image sensor that collects the image to be processed, and determine an image type of the image to be processed according to a sensor type of the image sensor. For example, if the image sensor used for collecting the image to be processed is a sensor for collecting a gray image, the image type corresponding to the image to be processed can be determined to be a gray image, and if the image sensor used for collecting the image to be processed is a sensor for collecting a color image, the image type corresponding to the image to be processed can be determined to be a color image.
For another example, after the unmanned device collects the image to be processed, the type of the sampling color of the pixel in the image to be processed can be determined, if only one type is available, the type of the image to be processed can be determined to be a gray image, and if three types are available, the type of the image to be processed can be determined to be a color image. Other ways are not illustrated in detail herein.
S103: and loading an image processing template matched with the image to be processed according to the image type.
The unmanned equipment can pre-store the image processing templates corresponding to various image types, so after the image type corresponding to the image to be processed is determined, the unmanned equipment can load the image processing template matched with the image type, and further in the subsequent process, the image to be processed is processed through the loaded image processing template. For example, if it is determined that the image type of the image to be processed is a grayscale image, an image processing template applicable to the grayscale image may be loaded.
It should be noted that the image processing templates corresponding to different image types are not constant, i.e. the various parameters involved in one image processing template are not always constant. The maintainer of the unmanned equipment can adjust the image processing templates corresponding to different image types according to actual image processing requirements, and the adjusted image processing templates are input into the unmanned equipment.
S104: dividing each pixel processing area in the image to be processed according to the image processing template.
After the image processing template is loaded, the unmanned device can divide the pixel processing area of the image to be processed according to the image processing template. Specifically, for each image processing template, there is a corresponding size of pixel processing area in the image that can be processed, which is determined by the size of the image processing template. For example, an image processing template for performing image processing on a gray-scale image is shown below:
Figure BDA0002433955750000081
as can be seen from this example, the image processing template is a 5×5 matrix, so the unmanned apparatus can divide each 5×5 pixel processing area in the image to be processed according to the size of the image processing template.
In this specification, the unmanned device may divide each pixel processing area in the image to be processed in a certain division order, as shown in fig. 2.
Fig. 2 is a schematic diagram of dividing each pixel processing area in an image to be processed by an image processing template provided in the present specification.
It is assumed that the image processing template determined by the unmanned apparatus according to the image type of the image to be processed is a 3×3 image processing template. The unmanned device may sequentially divide each pixel processing area from left to right and from top to bottom on the image to be processed according to the size of the image processing template in the direction shown in fig. 2. In the subsequent process, for each pixel processing region divided in the image to be processed, the pixels in the pixel processing region may be subjected to image processing by the image processing template.
Of course, the unmanned device may divide the pixel processing regions in the image to be processed in other division orders. For example, the unmanned device may first divide a vertical pixel processing area from top to bottom, then move a pixel unit to the right, then divide a vertical pixel processing area from top to bottom, and so on. Other partitioning sequences are not illustrated in detail herein.
In this specification, the unmanned device may extract each row of pixels included in the image to be processed row by row. Correspondingly, when the unmanned equipment divides each pixel processing area in the image to be processed, the number N of the pixel rows to be processed in the image to be processed needs to be determined according to the size of the pixel processing area. And dividing each pixel processing area in the N rows of pixels according to the size of the pixel processing area when the N rows of pixels are detected to be extracted for each N rows of pixels contained in the image to be processed. Wherein, N mentioned here is an integer greater than 1.
For example, assuming that the size of the image processing template determined by the unmanned apparatus is a 5×5 matrix, the size of each pixel processing area divided in the image to be processed should be 5×5 pixel areas accordingly. Further, the unmanned device determines that the number of lines of pixel lines to be processed in the image to be processed is 5 lines according to the determined size of the pixel processing area (i.e., 5×5 pixel area). Based on this, when the unmanned apparatus extracts each line of pixels of the image to be processed line by line, once it detects that 5 lines of pixels of the image to be processed are extracted, each pixel processing area may be divided among the 5 lines of pixels according to the determined size of the pixel processing area.
For every N lines of pixels in the image to be processed, the unmanned device can firstly extract the first N-1 lines of pixels in the N lines of pixels and buffer the N-1 lines of pixels, and when the N lines of pixels are extracted, the buffered first N-1 lines of pixels and the N lines of pixels can be synchronously input into the image processor so as to divide each pixel processing area in the N lines of pixels. After performing image processing on the pixels included in each pixel processing area in the N rows of pixels through the determined image processing template, the unmanned device may release the cached first row of pixels in the previous N-1 rows of pixels, cache the nth row of pixels, and extract the n+1th row of pixels, as shown in fig. 3.
Fig. 3 is a schematic diagram of the unmanned device provided in the present specification, which extracts each row of pixels row by row and divides each pixel processing area.
Assuming that the image to be processed contains 12 lines of pixels, the unmanned device may extract the 12 lines of pixels from the image to be processed line by line. And the unmanned device determines the pixel processing area with the size of 3×3, so the unmanned device can determine the number of lines of the pixel lines to be processed in the image to be processed to be 3 lines.
In fig. 3, the unmanned device may first extract the 1 st line and the 2 nd line of pixels of the image to be processed in the order from top to bottom, and buffer the two lines of pixels, when the 3 rd line of pixels of the image to be processed are extracted, the buffered 1 st line of pixels, the 2 nd line of pixels and the extracted 3 rd line of pixels may be synchronously input into the image processor, so that the image processor divides the three lines of pixels (1 st, 2 nd and 3 rd line of pixels) according to the determined size of the pixel processing area, obtains each pixel processing area, and processes the pixels in each pixel processing area in the three lines of pixels through the determined image processing template (i.e. the matrix of 3×3).
After the image processing of the three lines of pixels is completed, the unmanned device may release the cached line 1 pixels and cache the line 3 pixels. When the 4 th row of pixels of the image to be processed are extracted, the unmanned device can synchronously input the cached 2 nd row of pixels, 3 rd row of pixels and the 4 th row of pixels into the image processor, so that the image processor divides the three rows of pixels (2 nd row, 3 rd row and 4 th row of pixels) according to the determined size of the pixel processing area to obtain each pixel processing area, processes the pixels in each pixel processing area in the three rows of pixels through the determined image processing template, and so on.
The above-mentioned image processor may refer to a processor provided in the unmanned aerial vehicle for performing image processing, and the specific form of the image processor may be various, for example, a field programmable gate array (Field Programmable Gate Array, FPGA).
S105: and processing the pixels contained in the pixel processing region in the image to be processed by the image processing template aiming at each pixel processing region to obtain the processed pixels corresponding to the pixel processing region.
After the unmanned device divides each pixel processing area in the acquired image to be processed, the unmanned device can process the pixels in the pixel processing area according to the determined image processing template aiming at each pixel processing area, so as to obtain the processed pixels corresponding to the pixel processing area.
For each pixel processing area, the unmanned device can determine an area characterization value corresponding to each pixel contained in the pixel processing area through the image processing template, and determine a central pixel in the pixel processing area as a target pixel. And then, the unmanned equipment can process the pixel value of the target pixel according to the region characterization value to obtain a processed target pixel, and further uses the processed target pixel as a processed pixel corresponding to the pixel processing region. The region characterization value mentioned here may refer to a value obtained by calculating a pixel value of each pixel included in the pixel processing region and a parameter in the image processing template.
It can be seen from the above that the unmanned aerial vehicle processes each pixel in the pixel processing area through the image processing template, and is actually that the pixel value of the central pixel in the pixel processing area is redetermined by determining the area characterization value corresponding to the pixel processing area, and the redetermined pixel value is replaced by the original pixel value of the central pixel in the pixel processing area, so as to implement the image processing of the pixel contained in the pixel processing area.
In the present specification, after determining the region representation value corresponding to the pixel processing region, the unmanned device may determine a difference between a pixel value of a target pixel in the pixel processing region (i.e., a central pixel of the pixel processing region) and the region representation value, and determine whether the difference falls within a preset threshold range, if it is determined that the difference does not fall within the preset threshold range, then the pixel value of the target pixel may be adjusted according to the difference and a preset compensation coefficient, so as to obtain the processed target pixel. If the difference value is determined to fall into the preset threshold range, the pixel value of the target pixel is not required to be adjusted, that is, the pixel value of the central pixel of the pixel processing area is not changed after being processed by the image processing template.
For example, when it is determined that the image type of the image to be processed is a gray image, the unmanned device may select an image processing template suitable for the gray image, and perform image processing on each pixel processing area in the image to be processed, where the unmanned device may perform image processing according to the following formula.
Figure BDA0002433955750000111
Wherein P is 1 For the pixel value of the target pixel (i.e., the center pixel) in the pixel processing region, P 2 For determining the difference between the region characterization value corresponding to the pixel processing region and the pixel value of the target pixel, gain is a preset compensation coefficient, [ -S, S]Representing a preset threshold range, P out Is the pixel value of the adjusted target pixel.
From the formula, if the difference between the region characterization value corresponding to the pixel processing region and the pixel value of the target pixel falls into the preset threshold range, the output pixel value of the processed pixel corresponding to the pixel processing region is the pixel value of the central pixel in the pixel processing region, and if the difference does not fall into the preset threshold range, the finally output pixel value of the processed pixel corresponding to the pixel processing region is the pixel value after the adjustment of the pixel value of the central pixel.
S106: and generating a processed image corresponding to the image to be processed according to each processed pixel corresponding to each pixel processing area, and carrying out target recognition through the processed image.
After the unmanned device processes each pixel processing area in the image to be processed, each processed pixel corresponding to each pixel processing area can be obtained, namely, the adjusted pixel value of the central pixel in each pixel processing area is obtained. Then, the unmanned device may arrange the processed pixels corresponding to the pixel processing areas according to the positions of the pixel processing areas in the image to be processed, so as to obtain a processed image corresponding to the image to be processed, and perform target recognition according to the processed image.
According to the method, after the image to be processed is acquired, the image processing template which is suitable for the image to be processed can be loaded according to the image type of the image to be processed, so that the unmanned equipment can effectively process images of different image types, the flexibility of image processing of the image to be processed is effectively improved, and the efficiency and accuracy of target recognition of the unmanned equipment based on the processed image are ensured.
It should be noted that, since the unmanned device adjusts the pixel value of the central pixel in each pixel processing area, this would tend to cause the unmanned device to fail to perform image processing on some pixels located at the edges of the image to be processed (i.e., adjust the pixel values of those pixels) through the determined image processing template. For this reason, in the present specification, the unmanned apparatus may compensate some pixels on the outside of the image to be processed first, and then implement image processing of some pixels located at the edges of the image to be processed based on the compensated pixels, as shown in fig. 4.
Fig. 4 is a schematic diagram of pixel compensation performed by the unmanned device provided in the present specification at the edge of an image to be processed.
In fig. 4, the pixels of the solid line are the real pixels of the image to be processed, and as can be seen from fig. 4, the pixel values of the 1 st column of pixels (i.e., the leftmost column of pixels) and the 8 th column of pixels (i.e., the rightmost column of pixels) of the image to be processed in the order from left to right will not be adjusted by the image processing template. Similarly, the pixel values of the 1 st row of pixels (i.e., the uppermost row of pixels) and the 12 th row of pixels (i.e., the lowermost row of pixels) of the image to be processed will not be adjusted in the order from top to bottom.
Based on this, the unmanned device can perform pixel compensation around the image to be processed, and the pixels indicated by the dashed lines in fig. 4 are compensation pixels. The pixel values of these compensation pixels may be pixel values preset by the unmanned device. As can be seen from fig. 4, after the compensation pixels are compensated around the image to be processed, the unmanned device can adjust the pixel values of the pixels located at the edges of the image to be processed through the determined image processing template.
It should be noted that the unmanned aerial vehicle may determine the number of compensation pixels by determining the size of the image processing template. For example, based on the image to be processed shown in fig. 4, if the size of the image processing template determined by the unmanned aerial vehicle is a matrix of 3×3, the unmanned aerial vehicle only needs to compensate a circle of compensation pixels on the outside of the image to be processed in the manner shown in fig. 4. If the size of the image processing template determined by the unmanned driving device is a 5×5 matrix, the unmanned driving device needs to compensate two circles of compensation pixels on the external parameters of the image to be processed shown in fig. 4.
In this specification, when the unmanned device performs image processing on the image to be processed, a plurality of rows of pixels may be extracted from the image to be processed at intervals of unit time, and the pixels extracted from the image to be processed may be combined according to the subsequent rows of pixels to obtain N rows of pixels conforming to the size of the image processing template.
For example, assuming that the unmanned apparatus can extract 2 lines of pixels from the image to be processed at each clock, and the determined image processing template is a 5×5 matrix, the unmanned apparatus can extract 4 lines of pixels at the first two clocks, and after extracting 2 lines of pixels at the third clock, can combine the 4 lines of pixels extracted at the first two clocks and the 1 st line of pixels in the 2 lines of pixels extracted at the third clock to obtain 5 lines of pixels conforming to the 5×5 matrix. In the subsequent process, the pixels extracted by the unmanned device at one clock can be combined with the 4 rows of pixels extracted by the first two clocks to form 5 rows of pixels conforming to a 5×5 matrix.
The above method for identifying an object provided for one or more embodiments of the present disclosure further provides a corresponding device for identifying an object based on the same concept, as shown in fig. 5.
Fig. 5 is a schematic diagram of an apparatus for object recognition provided in the present specification, specifically including:
an acquiring module 501, configured to acquire an image to be processed;
the type determining module 502 is configured to determine, according to a target object to be identified, an image type corresponding to the image to be processed;
a loading module 503, configured to load an image processing template matched with the image type according to the image type;
A dividing module 504, configured to divide each pixel processing area in the image to be processed according to the image processing template;
a processing module 505, configured to process, for each pixel processing area, pixels included in the pixel processing area in the image to be processed through the image processing template, so as to obtain processed pixels corresponding to the pixel processing area;
the identifying module 506 is configured to generate a processed image corresponding to the image to be processed according to each processed pixel corresponding to each pixel processing area, and perform object identification according to the processed image.
Optionally, the dividing module 504 is specifically configured to determine a size of the pixel processing area according to a size of the image processing template; and dividing each pixel processing area in the image to be processed according to the size of the pixel processing area.
Optionally, the dividing module 504 is specifically configured to determine, according to the size of the pixel processing area, a number N of rows of pixels to be processed, where N is an integer greater than 1; and dividing each pixel processing area in each N rows of pixels in the image to be processed according to the size of the pixel processing area.
Optionally, the dividing module 504 is specifically configured to extract and cache the first N-1 rows of pixels from the N rows of pixels of the image to be processed; and synchronously inputting the N-th row of pixels extracted from the N rows of pixels and the cached first N-1 rows of pixels into an image processor so as to enable the image processor to divide each pixel processing area in the N rows of pixels.
Optionally, the processing module 505 is specifically configured to determine, through the image processing template, a region characterization value corresponding to each pixel included in the pixel processing region in the image to be processed; determining a center pixel in the pixel processing area as a target pixel; and adjusting the pixel value of the target pixel according to the region characterization value to obtain a processed target pixel, and taking the processed target pixel as a processed pixel corresponding to the pixel processing region.
Optionally, the processing module 505 is specifically configured to determine a difference between the pixel value of the target pixel and the region characterization value; and if the difference value is determined not to fall into the preset threshold range, adjusting the pixel value of the target pixel according to the difference value and a preset compensation coefficient to obtain the processed target pixel.
Optionally, the processing module 505 is further configured to, if it is determined that the difference value falls within the threshold range, not adjust a pixel value of the target pixel.
Optionally, the identifying module 506 is specifically configured to arrange each processed pixel corresponding to each pixel processing area according to a position of each pixel processing area in the image to be processed, so as to obtain a processed image corresponding to the image to be processed.
The present specification also provides a computer readable storage medium storing a computer program operable to perform the method of object recognition described above.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 6. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, as illustrated in fig. 6, although other hardware required by other services may be included. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to implement the method of object recognition shown in fig. 1 described above. Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (7)

1. A method of object recognition, comprising:
acquiring an image to be processed;
determining the image type corresponding to the image to be processed according to the target object to be identified;
loading an image processing template matched with the image type according to the image type;
dividing each pixel processing area in the image to be processed according to the image processing template;
Determining a region characterization value corresponding to each pixel contained in the pixel processing region in the image to be processed through the image processing template;
determining a center pixel in the pixel processing area as a target pixel;
determining a difference between a pixel value of the target pixel and the region characterization value;
if the difference value is determined not to fall into the preset threshold range, adjusting the pixel value of the target pixel according to the difference value and a preset compensation coefficient to obtain a processed target pixel, and taking the processed target pixel as a processed pixel corresponding to the pixel processing area;
if the difference value is determined to fall into the threshold range, not adjusting the pixel value of the target pixel;
and generating a processed image corresponding to the image to be processed according to each processed pixel corresponding to each pixel processing area, and carrying out target recognition through the processed image.
2. The method according to claim 1, wherein dividing each pixel processing area in the image to be processed according to the image processing template, specifically comprises:
determining the size of a pixel processing area according to the size of the image processing template;
And dividing each pixel processing area in the image to be processed according to the size of the pixel processing area.
3. The method according to claim 2, wherein dividing each pixel processing area in the image to be processed according to the size of the pixel processing area, specifically comprises:
determining the number N of lines of pixels to be processed according to the size of the pixel processing area, wherein N is an integer greater than 1;
and dividing each pixel processing area in each N rows of pixels in the image to be processed according to the size of the pixel processing area.
4. A method according to claim 3, wherein for each N rows of pixels in the image to be processed, each pixel processing area is divided among the N rows of pixels according to the size of the pixel processing area, specifically comprising:
extracting and caching the first N-1 rows of pixels from the N rows of pixels of the image to be processed;
and synchronously inputting the N-th row of pixels extracted from the N rows of pixels and the cached first N-1 rows of pixels into an image processor so as to enable the image processor to divide each pixel processing area in the N rows of pixels.
5. The method according to claim 1 or 4, wherein generating the processed image corresponding to the image to be processed according to each processed pixel corresponding to each pixel processing area, specifically comprises:
And arranging the processed pixels corresponding to the pixel processing areas according to the positions of the pixel processing areas in the image to be processed to obtain the processed image corresponding to the image to be processed.
6. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-5.
7. An unmanned device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of the preceding claims 1-5 when the program is executed by the processor.
CN202010245845.2A 2020-03-31 2020-03-31 Target identification method and device Active CN111476729B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010245845.2A CN111476729B (en) 2020-03-31 2020-03-31 Target identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010245845.2A CN111476729B (en) 2020-03-31 2020-03-31 Target identification method and device

Publications (2)

Publication Number Publication Date
CN111476729A CN111476729A (en) 2020-07-31
CN111476729B true CN111476729B (en) 2023-06-09

Family

ID=71749343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010245845.2A Active CN111476729B (en) 2020-03-31 2020-03-31 Target identification method and device

Country Status (1)

Country Link
CN (1) CN111476729B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784832B (en) * 2021-02-09 2022-09-09 西南科技大学 Object mark point identification method and device
CN117252956A (en) * 2023-09-04 2023-12-19 深圳市经纬线科技有限公司 Image editing method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008067134A (en) * 2006-09-08 2008-03-21 Seiko Epson Corp Image processor, printer, image processing method, and image processing program
CN106770087A (en) * 2016-11-24 2017-05-31 大连海事大学 Greasy dirt remote sensing module, system and method
JP2020021228A (en) * 2018-07-31 2020-02-06 キヤノン株式会社 Information processing device, information processing method, and program

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2012098854A1 (en) * 2011-01-20 2014-06-09 日本電気株式会社 Image processing system, image processing method, and image processing program
US9349076B1 (en) * 2013-12-20 2016-05-24 Amazon Technologies, Inc. Template-based target object detection in an image
CN108040210B (en) * 2015-06-30 2020-03-10 Oppo广东移动通信有限公司 Local distortion correction method, mobile terminal and related medium product
CN107891808B (en) * 2016-09-30 2020-06-19 比亚迪股份有限公司 Driving reminding method and device and vehicle
CN107122737B (en) * 2017-04-26 2020-07-31 聊城大学 Automatic detection and identification method for road traffic signs
CN107578424B (en) * 2017-08-04 2020-09-29 中山大学 Dynamic background difference detection method, system and device based on space-time classification
CN107730445B (en) * 2017-10-31 2022-02-18 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, storage medium, and electronic device
CN108510556A (en) * 2018-03-30 2018-09-07 百度在线网络技术(北京)有限公司 Method and apparatus for handling image
CN110490214B (en) * 2018-05-14 2023-05-02 阿里巴巴集团控股有限公司 Image recognition method and system, storage medium and processor
CN109117846B (en) * 2018-08-22 2021-11-16 北京旷视科技有限公司 Image processing method and device, electronic equipment and computer readable medium
CN109766898A (en) * 2018-12-26 2019-05-17 平安科技(深圳)有限公司 Image character recognition method, device, computer equipment and storage medium
CN110502986A (en) * 2019-07-12 2019-11-26 平安科技(深圳)有限公司 Identify character positions method, apparatus, computer equipment and storage medium in image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008067134A (en) * 2006-09-08 2008-03-21 Seiko Epson Corp Image processor, printer, image processing method, and image processing program
CN106770087A (en) * 2016-11-24 2017-05-31 大连海事大学 Greasy dirt remote sensing module, system and method
JP2020021228A (en) * 2018-07-31 2020-02-06 キヤノン株式会社 Information processing device, information processing method, and program

Also Published As

Publication number Publication date
CN111476729A (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN111311709B (en) Method and device for generating high-precision map
CN111639682A (en) Ground segmentation method and device based on point cloud data
CN111238450B (en) Visual positioning method and device
CN111882611B (en) Map construction method and device
CN113887608B (en) Model training method, image detection method and device
CN111476729B (en) Target identification method and device
CN112036462A (en) Method and device for model training and target detection
CN111797711A (en) Model training method and device
CN111062372A (en) Method and device for predicting obstacle track
CN116309823A (en) Pose determining method, pose determining device, pose determining equipment and storage medium
CN117197781B (en) Traffic sign recognition method and device, storage medium and electronic equipment
CN112990099B (en) Method and device for detecting lane line
CN112861831A (en) Target object identification method and device, storage medium and electronic equipment
CN112818968A (en) Target object classification method and device
CN111242106A (en) Facial image acquisition method, device and equipment and facial recognition equipment
CN113887351B (en) Obstacle detection method and obstacle detection device for unmanned driving
CN112734851B (en) Pose determination method and device
CN114332189A (en) High-precision map construction method and device, storage medium and electronic equipment
CN111426299B (en) Method and device for ranging based on depth of field of target object
CN114863206A (en) Model training method, target detection method and device
CN112561961A (en) Instance tracking method and device
CN116740197B (en) External parameter calibration method and device, storage medium and electronic equipment
CN111104908A (en) Road edge determination method and device
CN111798536B (en) Construction method and device of positioning map
CN112631312B (en) Unmanned equipment control method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant