CN116935027A - Object identification method and device, electronic equipment and storage medium - Google Patents

Object identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116935027A
CN116935027A CN202210319811.2A CN202210319811A CN116935027A CN 116935027 A CN116935027 A CN 116935027A CN 202210319811 A CN202210319811 A CN 202210319811A CN 116935027 A CN116935027 A CN 116935027A
Authority
CN
China
Prior art keywords
pixel
background
pixel value
target object
value
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.)
Pending
Application number
CN202210319811.2A
Other languages
Chinese (zh)
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.)
Lemon Inc Cayman Island
Original Assignee
Lemon Inc Cayman Island
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 Lemon Inc Cayman Island filed Critical Lemon Inc Cayman Island
Priority to CN202210319811.2A priority Critical patent/CN116935027A/en
Priority to PCT/SG2023/050189 priority patent/WO2023191713A2/en
Publication of CN116935027A publication Critical patent/CN116935027A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • 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/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • 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/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (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 embodiment of the disclosure discloses an object identification method, an object identification device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a background area of a target object in an image to be identified, and determining a background pixel value according to pixel values of pixels in the background area; and intercepting a target object area in the image to be identified, and identifying target pixels belonging to a target object from the target object area according to the background pixel value. By identifying the target object according to the difference of the target object and the background area thereof on the pixel value, the cost consumed by data acquisition and labeling can be saved, and the identification of objects with rich colors can be supported.

Description

Object identification method and device, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of image processing, in particular to an object identification method, an object identification device, electronic equipment and a storage medium.
Background
In the prior art, a target object in an image can be identified based on a deep learning method and a traditional machine learning method. The disadvantages of the prior art include at least: the recognition method based on deep learning relies on a large amount of data acquisition and labeling, and the cost investment is large; the recognition method based on traditional machine learning relies on prior estimation of the colors of target objects, and cannot support recognition of objects with rich colors.
Disclosure of Invention
The embodiment of the disclosure provides an object recognition method, an object recognition device, electronic equipment and a storage medium, which not only save the cost of data acquisition and labeling consumption, but also support the recognition of objects with rich colors.
In a first aspect, an embodiment of the present disclosure provides an object recognition method, including:
determining a background area of a target object in an image to be identified, and determining a background pixel value according to pixel values of pixels in the background area;
and intercepting a target object area in the image to be identified, and identifying target pixels belonging to a target object from the target object area according to the background pixel value.
In a second aspect, an embodiment of the present disclosure further provides an object recognition apparatus, including:
the background pixel value determining module is used for determining a background area of a target object in the image to be identified, and determining a background pixel value according to the pixel values of all pixels in the background area;
and the target pixel identification module is used for intercepting a target object area in the image to be identified and identifying target pixels belonging to a target object from the target object area according to the background pixel value.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the object recognition method as described in any of the embodiments of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are for performing the object recognition method according to any of the disclosed embodiments.
According to the technical scheme, a background area of a target object in an image to be identified is determined, and a background pixel value is determined according to pixel values of pixels in the background area; and intercepting a target object area in the image to be identified, and identifying target pixels belonging to the target object from the target object area according to the background pixel value. By identifying the target object according to the difference of the target object and the background area thereof on the pixel value, the cost consumed by data acquisition and labeling can be saved, and the identification of objects with rich colors can be supported.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a flowchart of an object recognition method according to a first embodiment of the disclosure;
fig. 2 is a block diagram schematically illustrating an object recognition method according to a second embodiment of the disclosure;
fig. 3 is a schematic structural diagram of an object recognition device according to a third embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
Example 1
Fig. 1 is a flowchart of an object recognition method according to an embodiment of the present disclosure, where the embodiment of the present disclosure is applicable to a case of recognizing a target object, for example, a case of recognizing a hu sub-object from a hu sub-general area of a face image. The method may be performed by an object recognition device, which may be implemented in software and/or hardware, which may be configured in an electronic apparatus, for example in a computer.
As shown in fig. 1, the method for identifying an object provided in this embodiment may include:
s110, determining a background area of a target object in the image to be identified, and determining a background pixel value according to pixel values of pixels in the background area.
In the embodiment of the disclosure, the image to be identified may be an image acquired in real time or may be a pre-stored image. For different recognition tasks, a target object to be recognized in an image and a background object of the target object can be preset.
In the process of identifying the target object, a segmentation model of an open-source background object can be used to segment an area (namely, a background area) where the background object in the whole image to be identified is located. Then, pixels in a background region in the image to be identified can be extracted, and a pixel value of the background object (i.e., a background pixel value) can be determined according to the pixel value of the extracted pixels. For example, a value such as an average value, a maximum value, a minimum value, or a median value of the pixel values of the extracted pixels may be used as the pixel value of the background object. Wherein the background pixel value may reflect the color of the background object.
In some alternative implementations, determining the background pixel value from the pixel values of the pixels within the background region includes: clustering pixels in a background area according to pixel values to obtain at least one pixel cluster; a background pixel value is determined based on pixel values of pixels in a cluster of pixels that contains the most pixels.
Due to the influence of factors such as ambient light, not all pixels in a background area in an image to be identified can accurately reflect the color of a background object. In these alternative implementations, the pixels in the background area may be clustered by pixel value, and each resulting cluster of pixels may be considered as a set of pixels that are close in color. Wherein, a K-means clustering algorithm (K-means) or other clustering algorithms can be adopted to cluster each pixel.
The clustered pixel cluster containing the most pixels can be regarded as a set of pixels in the image to be identified, which can represent the color of the background object most. The background pixel value may be determined according to the pixel value of each pixel in the pixel cluster including the most pixels, for example, the pixel average value of each pixel in the pixel cluster including the most pixels may be determined, and the pixel average value is used as the background pixel value. Alternatively, the pixel value having the largest number of occurrences in the pixel cluster including the largest number of pixels may be used as the background pixel value. In addition, other ways of determining the background pixel value based on the pixel value of each pixel in the pixel cluster including the most pixels are also applicable.
By clustering pixels in the background area according to the pixel values and determining the background pixel values according to the pixel values of the pixels in the pixel cluster containing the most pixels, the problem of large error of the background pixel values caused by overexposure of brightness and the like can be avoided, and the accuracy of the background pixel values can be improved.
In some alternative implementations, clustering pixels in the background region by pixel value includes: converting the pixel value of each pixel in the background area into a color space containing tone dimension to obtain a converted pixel value of each pixel in the background area; and clustering each pixel in the background area according to the numerical value of the tone dimension in the converted pixel value.
Hue (Hue) is very important for color expression, and the color space containing Hue dimension may be Hue-Saturation-Value (HSV) color space, or may be Hue-Saturation-brightness (HSL) color space, or the like, which is not exhaustive herein. Since colors can be divided into dimensions of hue, saturation, brightness/brightness, etc. in the color space, clustering of similar colors is facilitated as compared to color spaces described by mixing hues in Red-Green-Blue (RGB), etc.
Thus, in these alternative implementations, in estimating the background pixel values, the pixel values of the pixels in the background region may first be converted into a color space containing the hue dimension to obtain converted pixel values; and then clustering can be carried out according to the numerical value of the tone dimension in each converted pixel value, so that more accurate clustering analysis can be realized, and the determined background pixel value is more accurate.
After clustering according to the converted pixel values, a background pixel value can be determined according to the original pixel value of each pixel in the pixel cluster containing the most pixels in the image to be identified; alternatively, the background pixel value may be determined from the converted pixel values of the pixels in the pixel cluster containing the most pixels. The background pixel value may be determined based on the converted pixel value, for example, an average value, a maximum value, a minimum value, or a median value of the converted pixel values of the pixels in the pixel cluster including the largest number of pixels may be used as the pixel value of the background object.
S120, intercepting a target object area in the image to be identified, and identifying target pixels belonging to the target object from the target object area according to the background pixel value.
Aiming at the target objects to be identified by the identification task, key points which can enclose all the target objects can be predefined. When the target object area in the image to be identified is intercepted, the key points can be identified first, and then the enclosed area is used as the target object area. The key points of the on-off source can be identified by using a key point detection model. The enclosed target object region may be considered as a slightly larger region containing the target object, and not all pixels in the region represent the target object.
After the target object region is determined, the degree of similarity of the pixel value of each pixel of the region to the background pixel value under the same color space may be determined. When the pixel value of the regional pixel and the background pixel value are not in the same color space, any one of the two pixel values can be converted into the color space of the opposite side so as to ensure the comparability of the pixel values. The similarity between the pixel value of the region pixel and the background pixel value in each dimension can be synthesized, and the similarity between the pixel value of the region pixel and the background pixel value can be determined.
The target object region determined by the preset key points can realize region division with higher accuracy, so that the divided region mainly comprises the target object and the background object. In this case, a pixel having a low similarity to the background pixel value may be directly used as the target pixel belonging to the target object. Alternatively, the pixels having low similarity to the background pixel value may be clustered again, and each pixel in the pixel cluster including the most pixels may be used as the target pixel belonging to the target object, so as to avoid using, as the target object, an individual other object having a large difference from the background object in the target object area, thereby improving the recognition accuracy of the target object.
In some alternative implementations, identifying a target pixel belonging to a target object from a target object region based on a background pixel value includes: determining a deviation value of a pixel value of each pixel in the target object area and a background pixel value; if the deviation value is larger than the preset threshold value, the corresponding pixel value is identified as the target pixel belonging to the target object.
In these alternative implementations, the deviation value may be determined based on the Euclidean distance of the pixel value of each pixel in the target object region from the background pixel value. In addition to the euclidean distance, the deviation value may be determined according to at least one distance of a manhattan distance, a chebyshev distance, and a mahalanobis distance of a pixel value of each pixel in the target object region and a background pixel value. When the distance includes two or more kinds, different weights can be set for the distances of various kinds according to the experience value or the experimental value, and the distances and the weights are weighted to improve the accuracy of the deviation value.
The larger the deviation value, the lower the similarity between the pixel value of the corresponding pixel and the background pixel value. By pre-thresholding, a magnitude measure of the deviation value can be achieved. When the deviation value is greater than a preset threshold value, the corresponding pixel value may be identified as a target pixel belonging to the target object. Alternatively, each pixel having a deviation value greater than a preset threshold may be clustered again, and each pixel in the pixel cluster including the most pixels is used as a target pixel belonging to the target object.
In some optional implementations, in the calculation process, the pixel value of each pixel in the target object area and each dimension value in the background pixel value have a corresponding calculation weight. In these alternative implementations, a dimension having a greater impact on the pixel similarity measure may be given a greater weight, and by applying different calculation weights to the values of different dimensions, the recognition accuracy of the target object may be improved.
According to the technical scheme, a background area of a target object in an image to be identified is determined, and a background pixel value is determined according to pixel values of pixels in the background area; and intercepting a target object area in the image to be identified, and identifying target pixels belonging to the target object from the target object area according to the background pixel value. By identifying the target object according to the difference of the target object and the background area thereof on the pixel value, the cost consumed by data acquisition and labeling can be saved, and the identification of objects with rich colors can be supported.
Example two
Embodiments of the present disclosure may be combined with each of the alternatives in the object recognition method provided in the above embodiments. The object recognition method provided by the embodiment describes specific application scenes in detail. In this embodiment, the target object may include a beard object, and the background area of the target object may include a skin area. By estimating skin pixel values and measuring differences between each pixel value in the Hu Zida region and the skin pixel values, target pixels belonging to the Hu-sub object in the approximate region can be identified.
Fig. 2 is a block diagram illustrating an object recognition method according to a second embodiment of the disclosure. As shown in fig. 2, when the target object is a beard object and the background area of the target object is a skin area, the method for identifying the beard object may include:
for a given facial picture, a skin mask may first be obtained using an open-source skin segmentation model;
secondly, extracting all corresponding skin pixels in the whole picture according to the skin mask;
again, a clustering algorithm (such as the K-means algorithm) may be used to cluster all pixels of the skin and the average pixel value of the largest cluster (i.e., the cluster of pixels that contains the most pixels) may be taken as the skin pixel value.
While the three steps are being performed, a key point model of an open source may be used to identify predefined keys (such as nose contour points and lower half cheek contour points), and intercept the lower half face through these key points as a moustache object region.
Then, the pixel value of each pixel of the beard object region can be color measured with the skin pixel value (i.e. the deviation value of the two is determined);
then, if the measurement result is larger than the preset threshold value, the corresponding pixel can be considered to belong to the Hu sub object; otherwise, the Chinese character belongs to the beard object;
finally, the region belonging to the Hu sub-object may be identified from the region not belonging to the Hu sub-object, resulting in a Hu sub-mask.
The process of determining the skin pixel value can be considered as a process of estimating the skin color, among other things. In the case where the original color space of the image to be recognized is a Red-Green-Blue (RGB) color space, the H-channel in the color space containing the hue dimension (e.g., HSV, HSL, etc.) may mainly control the hue as compared to each channel in the original RGB color space having an effect on the color. Therefore, in the process of estimating skin color, each pixel in the image to be identified can be converted from the original RGB color space into a color space such as HSV or HSL, and the skin pixels can be clustered in H channels. After the clustering is completed, an average value can be calculated on the pixels in the largest cluster with the same label in the original RGB color space, so as to obtain the estimated skin color. Therefore, the operation of converting the pixel value of the sub-object region into HSV or HSL color space in the color measurement process can be avoided, the calculated amount can be reduced to a certain extent, and the recognition efficiency is improved.
The process of determining the deviation value of the pixel value of each pixel of the Hu sub-object area and the skin pixel value can be regarded as the process of measuring the distance between the two colors. In this process, the euclidean distance of two pixel values can be calculated in the original RGB color space, and different influence coefficients can be applied to the numerical value of R, G, B dimension to improve the measurement accuracy.
In calculating the deviation value in the RGB color space, a preset threshold value, for example, 150, may be set according to an empirical or experimental value. When the deviation value (i.e., the measurement result) is greater than 150, the corresponding pixel may be marked as a Hu sub object, otherwise may be marked as a skin object. By marking each pixel as a Hu sub-object, a Hu sub-mask of the whole picture can be obtained.
The existing deep learning-based Huzi recognition algorithm depends on a large amount of labeling data, and the acquisition and labeling of the data make the algorithm cost large. The existing Hu sub-recognition algorithm based on traditional machine learning relies on priori estimation of the color of the Hu sub-, can only recognize white or black Hu sub-and cannot support the recognition of the Hu sub-with richer colors.
Compared with the existing method for identifying the beard, the method utilizes the color difference between the beard object and the skin object, firstly estimates the skin pixel value, then carries out color measurement on the pixels in the area of the beard object and the skin object, and finally obtains the beard identification result through the threshold value. The method does not need collection and labeling of a large amount of data, also avoids responding to the specific color of the beard, and can solve the problems of high labeling cost, strong color priori and the like of the existing beard segmentation algorithm.
In some alternative implementations, after identifying the target pixel belonging to the target object from the target object region according to the background pixel value, further comprising: processing the image to be identified according to each target pixel belonging to the Hu sub object; the treatment comprises at least one of the following: segmentation processing, pixel value adjustment and special effects addition.
In these alternative implementations, after the Hu sub-object is determined, the Hu sub-object may be segmented to generate Hu sub-mask material; pixel value adjustments may be made to the mustache object to alter the mustache object color (e.g., to impart a skin object color to the mustache object to eliminate mustache); special effects can be added to the beard objects, for example, special effects such as cartoon beard are covered on the beard mask area, so that an image playing method is increased, and user experience is improved. In addition, other subsequent processing that may be performed based on the identified fiddle objects may also be applied thereto, and is not exhaustive herein.
The technical scheme of the embodiment of the disclosure describes specific application scenarios in detail. In this embodiment, the target object may be a beard object, and the background area of the target object may be a skin area. By estimating skin pixel values and measuring differences between each pixel value in the Hu Zida region and the skin pixel values, target pixels belonging to the Hu-sub object in the approximate region can be identified.
In addition, the object recognition method provided by the embodiment of the present disclosure belongs to the same disclosure concept as the object recognition method provided by the above embodiment, technical details which are not described in detail in the present embodiment can be seen in the above embodiment, and the same technical features have the same advantageous effects in the present embodiment and the above embodiment.
Example III
Fig. 3 is a schematic structural diagram of an object recognition device according to a third embodiment of the present disclosure. The object recognition apparatus provided in the present embodiment is suitable for a case of recognizing a target object, for example, a case of recognizing a mustache object from a mustache rough area of a face image.
As shown in fig. 3, an object recognition apparatus provided in an embodiment of the present disclosure may include:
a background pixel value determining module 310, configured to determine a background area of a target object in an image to be identified, and determine a background pixel value according to pixel values of pixels in the background area;
the target pixel identifying module 320 is configured to intercept a target object region in the image to be identified, and identify a target pixel belonging to the target object from the target object region according to the background pixel value.
In some alternative implementations, the background pixel value determination module may be configured to:
clustering pixels in a background area according to pixel values to obtain at least one pixel cluster;
a background pixel value is determined based on pixel values of pixels in a cluster of pixels that contains the most pixels.
In some alternative implementations, the background pixel value determination module may be configured to:
converting the pixel value of each pixel in the background area into a color space containing tone dimension to obtain a converted pixel value of each pixel in the background area;
and clustering each pixel in the background area according to the numerical value of the tone dimension in the converted pixel value.
In some alternative implementations, the background pixel value determination module may be configured to:
and determining the pixel average value of each pixel in the pixel cluster containing the most pixels, and taking the pixel average value as a background pixel value.
In some alternative implementations, the target pixel identification module may be configured to:
determining a deviation value of a pixel value of each pixel in the target object area and a background pixel value;
if the deviation value is larger than the preset threshold value, the corresponding pixel value is identified as the target pixel belonging to the target object.
In some alternative implementations, the target pixel identification module may be configured to:
and determining a deviation value according to the Euclidean distance between the pixel value of each pixel in the target object area and the background pixel value.
In some optional implementations, the target pixel identification module has a corresponding calculation weight for each dimension value in the pixel value of each pixel in the target object region and the background pixel value in the process of calculating the euclidean distance.
In some alternative implementations, the target object includes a beard object and the background area includes a skin area.
In some alternative implementations, the object recognition apparatus may further include:
the processing module is used for processing the image to be identified according to each target pixel belonging to the Hu sub object after identifying the target pixel belonging to the target object from the target object area according to the background pixel value; the treatment comprises at least one of the following: segmentation processing, pixel value adjustment and special effects addition.
The object recognition device provided by the embodiment of the disclosure can execute the object recognition method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that each unit and module included in the above apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
Example IV
Referring now to fig. 4, a schematic diagram of an electronic device (e.g., a terminal device or server in fig. 4) 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic apparatus 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401 that may perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 402 or a program loaded from a storage device 406 into a random access Memory (Random Access Memory, RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401, the ROM402, and the RAM403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows an electronic device 400 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 409, or from storage 406, or from ROM 402. When executed by the processing device 401, the computer program performs the above-described functions defined in the object recognition method of the embodiment of the present disclosure.
The electronic device provided by the embodiment of the present disclosure and the object recognition method provided by the foregoing embodiment belong to the same disclosure concept, and technical details not described in detail in the present embodiment may be referred to the foregoing embodiment, and the present embodiment has the same beneficial effects as the foregoing embodiment.
Example five
The present disclosure provides a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the object recognition method provided by the above embodiments.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (EPROM) or FLASH Memory (FLASH), an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
determining a background area of a target object in an image to be identified, and determining a background pixel value according to pixel values of pixels in the background area; and intercepting a target object area in the image to be identified, and identifying target pixels belonging to the target object from the target object area according to the background pixel value.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The names of the units and modules do not limit the units and modules themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a field programmable gate array (Field Programmable Gate Array, FPGA), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a special standard product (Application Specific Standard Parts, ASSP), a System On Chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example one ], the method comprising:
determining a background area of a target object in an image to be identified, and determining a background pixel value according to pixel values of pixels in the background area;
and intercepting a target object area in the image to be identified, and identifying target pixels belonging to a target object from the target object area according to the background pixel value.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example two ] further comprising:
in some optional implementations, the determining a background pixel value according to a pixel value of each pixel in the background area includes:
clustering pixels in the background area according to pixel values to obtain at least one pixel cluster;
a background pixel value is determined based on pixel values of pixels in a cluster of pixels that contains the most pixels.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example three ], further comprising:
in some optional implementations, the clustering the pixels in the background area according to pixel values includes:
converting the pixel value of each pixel in the background area into a color space containing tone dimension to obtain a converted pixel value of each pixel in the background area;
and clustering pixels in the background area according to the numerical value of the tone dimension in the converted pixel value.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example four ], further comprising:
in some optional implementations, the determining the background pixel value according to the pixel value of each pixel in the pixel cluster including the most pixels includes:
and determining the pixel mean value of each pixel in the pixel cluster containing the most pixels, and taking the pixel mean value as a background pixel value.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example five ]:
in some optional implementations, the identifying, from the target object region, a target pixel belonging to a target object according to the background pixel value includes:
determining a deviation value of a pixel value of each pixel in the target object area and the background pixel value;
and if the deviation value is larger than a preset threshold value, identifying the corresponding pixel value as a target pixel belonging to a target object.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example six ], further comprising:
in some optional implementations, the determining a deviation value of the pixel value of each pixel in the target object region from the background pixel value includes:
and determining the deviation value according to the Euclidean distance between the pixel value of each pixel in the target object area and the background pixel value.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example seventh ], further comprising:
in some optional implementations, in the calculation process of the euclidean distance, a pixel value of each pixel in the target object area and each dimension value in the background pixel value have corresponding calculation weights.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example eight ]:
in some alternative implementations, the target object includes a beard object and the background area includes a skin area.
According to one or more embodiments of the present disclosure, there is provided an object recognition method [ example nine ], further comprising:
in some optional implementations, after the identifying the target pixel belonging to the target object from the target object region according to the background pixel value, further includes:
processing the image to be identified according to each target pixel belonging to the Hu sub object; the treatment comprises at least one of the following: segmentation processing, pixel value adjustment and special effects addition.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (12)

1. An object recognition method, comprising:
determining a background area of a target object in an image to be identified, and determining a background pixel value according to pixel values of pixels in the background area;
and intercepting a target object area in the image to be identified, and identifying target pixels belonging to a target object from the target object area according to the background pixel value.
2. The method of claim 1, wherein determining a background pixel value from pixel values of pixels within the background region comprises:
clustering pixels in the background area according to pixel values to obtain at least one pixel cluster;
a background pixel value is determined based on pixel values of pixels in a cluster of pixels that contains the most pixels.
3. The method of claim 2, wherein the clustering pixels in the background region by pixel value comprises:
converting the pixel value of each pixel in the background area into a color space containing tone dimension to obtain a converted pixel value of each pixel in the background area;
and clustering pixels in the background area according to the numerical value of the tone dimension in the converted pixel value.
4. The method of claim 2, wherein determining the background pixel value from the pixel values of each pixel in the cluster of pixels comprising the most pixels comprises:
and determining the pixel mean value of each pixel in the pixel cluster containing the most pixels, and taking the pixel mean value as a background pixel value.
5. The method of claim 1, wherein the identifying a target pixel belonging to a target object from the target object region based on the background pixel value comprises:
determining a deviation value of a pixel value of each pixel in the target object area and the background pixel value;
and if the deviation value is larger than a preset threshold value, identifying the corresponding pixel value as a target pixel belonging to a target object.
6. The method of claim 5, wherein determining a deviation value of the pixel value of each pixel in the target object region from the background pixel value comprises:
and determining the deviation value according to the Euclidean distance between the pixel value of each pixel in the target object area and the background pixel value.
7. The method of claim 6, wherein the euclidean distance is calculated by providing a corresponding calculation weight for each pixel in the target object region and each dimension value in the background pixel value.
8. The method of any one of claims 1-7, wherein the target object comprises a beard object and the background area comprises a skin area.
9. The method of claim 8, further comprising, after said identifying a target pixel belonging to a target object from said target object region based on said background pixel value:
processing the image to be identified according to each target pixel belonging to the Hu sub object; the treatment comprises at least one of the following: segmentation processing, pixel value adjustment and special effects addition.
10. An object recognition apparatus, comprising:
the background pixel value determining module is used for determining a background area of a target object in the image to be identified, and determining a background pixel value according to the pixel values of all pixels in the background area;
and the target pixel identification module is used for intercepting a target object area in the image to be identified and identifying target pixels belonging to a target object from the target object area according to the background pixel value.
11. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the object recognition method of any of claims 1-9.
12. A storage medium containing computer executable instructions for performing the object recognition method of any one of claims 1-9 when executed by a computer processor.
CN202210319811.2A 2022-03-29 2022-03-29 Object identification method and device, electronic equipment and storage medium Pending CN116935027A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210319811.2A CN116935027A (en) 2022-03-29 2022-03-29 Object identification method and device, electronic equipment and storage medium
PCT/SG2023/050189 WO2023191713A2 (en) 2022-03-29 2023-03-23 Object recognition method and apparatus, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210319811.2A CN116935027A (en) 2022-03-29 2022-03-29 Object identification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116935027A true CN116935027A (en) 2023-10-24

Family

ID=88203625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210319811.2A Pending CN116935027A (en) 2022-03-29 2022-03-29 Object identification method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN116935027A (en)
WO (1) WO2023191713A2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722720B (en) * 2012-05-25 2014-02-26 苏州大学 Video background extraction method based on hue-saturation-value (HSV) space on-line clustering
CN103473780B (en) * 2013-09-22 2016-05-25 广州市幸福网络技术有限公司 The method of portrait background figure a kind of
CN107798688B (en) * 2017-10-31 2020-07-28 广州杰赛科技股份有限公司 Moving target identification method, early warning method and automobile rear-end collision prevention early warning device
CN112581548B (en) * 2020-11-09 2023-04-07 华中光电技术研究所(中国船舶重工集团公司第七一七研究所) Method and system for filtering pseudo star target of star sensor
CN113723176B (en) * 2021-07-19 2022-06-10 上海闪马智能科技有限公司 Target object determination method and device, storage medium and electronic device

Also Published As

Publication number Publication date
WO2023191713A2 (en) 2023-10-05
WO2023191713A3 (en) 2023-11-30

Similar Documents

Publication Publication Date Title
WO2019242416A1 (en) Video image processing method and apparatus, computer readable storage medium and electronic device
WO2019100282A1 (en) Face skin color recognition method, device and intelligent terminal
CN110930296B (en) Image processing method, device, equipment and storage medium
US9478037B2 (en) Techniques for efficient stereo block matching for gesture recognition
EP3876201B1 (en) Object detection and candidate filtering system
CN111783626B (en) Image recognition method, device, electronic equipment and storage medium
CN108875594B (en) Face image processing method, device and storage medium
CN112836692B (en) Method, apparatus, device and medium for processing image
WO2021164328A1 (en) Image generation method, device, and storage medium
CN112750162A (en) Target identification positioning method and device
CN113177451A (en) Training method and device of image processing model, electronic equipment and storage medium
CN108351979A (en) Electronic equipment and its operating method
CN108960012B (en) Feature point detection method and device and electronic equipment
CN111614959B (en) Video coding method and device and electronic equipment
CN111784703B (en) Image segmentation method and device, electronic equipment and storage medium
CN113516739B (en) Animation processing method and device, storage medium and electronic equipment
CN111667553A (en) Head-pixelized face color filling method and device and electronic equipment
CN116935027A (en) Object identification method and device, electronic equipment and storage medium
CN112132000B (en) Living body detection method, living body detection device, computer readable medium and electronic equipment
CN112801997B (en) Image enhancement quality evaluation method, device, electronic equipment and storage medium
CN113408517B (en) Image display method and device and electronic equipment
CN114429628A (en) Image processing method and device, readable storage medium and electronic equipment
CN111507944B (en) Determination method and device for skin smoothness and electronic equipment
CN114022931A (en) Image processing method and device, electronic equipment and storage medium
CN113409199A (en) Image processing method, image processing device, electronic equipment and computer readable medium

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