WO2019080702A1 - 图像处理方法和装置 - Google Patents

图像处理方法和装置

Info

Publication number
WO2019080702A1
WO2019080702A1 PCT/CN2018/109120 CN2018109120W WO2019080702A1 WO 2019080702 A1 WO2019080702 A1 WO 2019080702A1 CN 2018109120 W CN2018109120 W CN 2018109120W WO 2019080702 A1 WO2019080702 A1 WO 2019080702A1
Authority
WO
WIPO (PCT)
Prior art keywords
rectangular frame
image
target
area
graphic
Prior art date
Application number
PCT/CN2018/109120
Other languages
English (en)
French (fr)
Inventor
车广富
安山
麻晓珍
陈宇
Original Assignee
北京京东尚科信息技术有限公司
北京京东世纪贸易有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京京东尚科信息技术有限公司, 北京京东世纪贸易有限公司 filed Critical 北京京东尚科信息技术有限公司
Priority to US16/754,244 priority Critical patent/US20210200971A1/en
Publication of WO2019080702A1 publication Critical patent/WO2019080702A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1452Methods for optical code recognition including a method step for retrieval of the optical code detecting bar code edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of histogram techniques
    • G06T5/70

Definitions

  • the embodiments of the present invention relate to the field of computer technologies, and particularly relate to the field of Internet technologies, and in particular, to an image processing method and apparatus.
  • the graphic code is a black and white graphic that is distributed in a plane according to a certain pattern by a specific geometric figure, and can store information and is widely used in daily life.
  • the graphic code may be a two-dimensional code or a barcode or the like.
  • An object of the embodiment of the present application is to provide an image processing method and apparatus.
  • an embodiment of the present application provides an image processing method, including: inputting a target image into a pre-trained image detection model, and obtaining a rectangular frame in which each graphic in at least one graphic presented by the target image is located The feature value and each of the graphics are probability values of the specified graphic code, wherein the image detection model is used to represent the correspondence between the feature value of the rectangular frame in which the image and the image presented by the image are located and the probability value of the graphic as the probability value of the specified graphic code; Determining that at least two rectangular frames partially overlapping the enclosed area exist in the rectangular frame involved in the at least one graphic, determining an area in which the area surrounded by the at least two rectangular frames partially overlaps and an area enclosed by the at least two rectangular frames The ratio of the sum; based on the comparison of the ratio and the preset ratio threshold, the target rectangular frame is determined from at least two rectangular frames; the area enclosed by the target rectangular frame is subjected to blurring processing or occlusion processing to generate a processed target image.
  • the method before the processed target image is generated by performing a blurring process or an occlusion process on the area enclosed by the target rectangular frame, the method further includes: inputting the target rectangular frame into the previously trained binary model to determine the target rectangle. Whether the graphic in the frame is a specified graphic code, wherein the two-category model is used to determine whether the graphic in the rectangular frame is a designated graphic code.
  • the binary classification model is obtained by: acquiring a first preset number of images presented with the specified graphic code as a positive sample, and acquiring a second preset number of images presented with the preset graphics as a negative
  • the sample is obtained by extracting the direction gradient histogram feature vector of the positive sample and the direction gradient histogram feature vector of the negative sample, and inputting the extracted direction gradient histogram feature vector into the radial basis function for training.
  • determining a ratio of an area of the area partially overlapped by the at least two rectangular frames to an area of the area enclosed by the at least two rectangular frames includes: determining a region surrounded by at least two rectangular frames that are partially overlapped The area of the intersection and the area of the union, and determine the ratio of the area of the intersection to the area of the union.
  • determining the target rectangular frame from the at least two rectangular frames based on the comparison of the ratio and the preset ratio threshold comprises: maximizing the corresponding probability value in response to determining that the ratio is greater than or equal to the preset ratio threshold
  • the rectangular frame is determined as a target rectangular frame; in response to determining that the ratio is less than a preset ratio threshold, each of the at least two rectangular frames is determined as the target rectangular frame.
  • the area enclosed by the target rectangular frame is subjected to a blurring process or an occlusion process, and the processed target image is generated, including: dividing the area enclosed by the target rectangular frame into a preset number of meshes; The pixels of the grid generate the processed target image.
  • an embodiment of the present application provides an image processing apparatus, including: an input unit configured to input a target image into a pre-trained image detection model to obtain at least one graphic represented by the target image.
  • the feature value of the rectangular frame in which each of the graphics is located and each of the graphics is a probability value of the specified graphic code, wherein the image detection model is used to characterize the feature values and graphics of the rectangular frame in which the image and the image presented by the image are located Corresponding relationship of probability values of the graphic code; determining unit configured to determine at least two rectangular frames surrounded by the at least two rectangular frames in response to determining that there is at least two rectangular frames partially overlapping the enclosed area in the rectangular frame involved in the at least one graphic a ratio of an area of the partial overlap of the area to a total area of the area enclosed by the at least two rectangular frames; and a comparing unit configured to determine the target rectangular frame from the at least two rectangular frames based on the comparison of the ratio and the preset ratio threshold; the processing unit , configured to perform blurring or
  • the apparatus further includes: a graphic code determining unit configured to input the target rectangular frame into the previously trained two-category model to determine whether the graphic in the target rectangular frame is a specified graphic code, wherein the second classification The model is used to determine if the graphic in the rectangular box is the specified graphic code.
  • the binary classification model is obtained by: acquiring a first preset number of images presented with the specified graphic code as a positive sample, and acquiring a second preset number of images presented with the preset graphics as a negative
  • the sample is obtained by extracting the direction gradient histogram feature vector of the positive sample and the direction gradient histogram feature vector of the negative sample, and inputting the extracted direction gradient histogram feature vector into the radial basis function for training.
  • the determining unit is further configured to: determine an area of the intersection of the regions surrounded by the at least two rectangular frames that are partially overlapped, and an area of the union, and determine a ratio of an area of the intersection and an area of the union.
  • the comparing unit includes: a first determining module, configured to determine, in response to determining that the ratio is greater than or equal to the preset ratio threshold, a rectangular box having a maximum probability value corresponding to the target rectangular frame; the second determining And a module configured to determine each of the at least two rectangular frames as the target rectangular frame in response to determining that the ratio is less than the preset ratio threshold.
  • the processing unit includes: a dividing module configured to divide the area enclosed by the target rectangular frame into a preset number of meshes; and a setting module configured to randomly set pixels of each mesh to generate Process the target image.
  • an embodiment of the present application provides a server, including: one or more processors; and a storage device, configured to store one or more programs, when one or more programs are executed by one or more processors, One or more processors are caused to implement a method as in any of the image processing methods.
  • an embodiment of the present application provides a computer readable storage medium, where a computer program is stored thereon, and when the program is executed by the processor, the method of any one of the image processing methods is implemented.
  • the image processing method and apparatus first input a target image into a pre-trained image detection model, and obtain a feature value of each rectangular frame in which at least one of the graphics represented by the target image is located, and each of the graphics is The probability value of the graphic code is specified, wherein the image detection model is used to represent the correspondence between the feature value of the rectangular frame in which the image and the image presented by the image are located and the probability value of the graphic as the specified graphic code. Thereafter, in response to determining that there are at least two rectangular frames partially overlapping the enclosed area in the rectangular frame involved in the at least one graphic, determining that the area partially overlapped by the at least two rectangular frames is surrounded by at least two rectangular frames The ratio of the sum of the areas of the area.
  • the target rectangular frame is determined from at least two rectangular frames.
  • the area enclosed by the target rectangular frame is subjected to blurring processing or occlusion processing to generate a processed target image, thereby improving the accuracy of determining the graphic code, and processing the graphic code in the image to avoid the graphic code bringing Bad effects.
  • FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;
  • FIG. 2 is a flow chart of one embodiment of an image processing method according to the present application.
  • FIG. 3 is a schematic diagram of an application scenario of an image processing method according to the present application.
  • FIG. 4 is a flow chart of still another embodiment of an image processing method according to the present application.
  • FIG. 5 is a schematic structural diagram of an embodiment of an image processing apparatus according to the present application.
  • FIG. 6 is a block diagram showing the structure of a computer system suitable for implementing the server of the embodiment of the present application.
  • FIG. 1 illustrates an exemplary system architecture 100 in which an embodiment of an image processing method or image processing apparatus of the present application may be applied.
  • system architecture 100 can include terminal devices 101, 102, 103, network 104, and server 105.
  • the network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105.
  • Network 104 may include various types of connections, such as wired, wireless communication links, fiber optic cables, and the like.
  • the user can interact with the server 105 over the network 104 using the terminal devices 101, 102, 103 to receive or transmit messages and the like.
  • Various communication client applications such as an image display application, a shopping application, a search application, an instant communication tool, a mailbox client, a social platform software, and the like, may be installed on the terminal devices 101, 102, and 103.
  • the terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting image display, including but not limited to smart phones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic The video specialist compresses the standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV) player, laptop portable computer and desktop computer, and the like.
  • MP3 players Motion Picture Experts Group Audio Layer III, dynamic The video specialist compresses the standard audio layer 3
  • MP4 Moving Picture Experts Group Audio Layer IV
  • the server 105 may be a server that provides various services, such as a background server that provides support for images displayed on the terminal devices 101, 102, 103.
  • the background server can perform processing such as detecting the received image, and feed back the processing result to the terminal device.
  • the image processing method provided by the embodiment of the present application is generally executed by the server 105. Accordingly, the image processing apparatus is generally disposed in the server 105.
  • terminal devices, networks, and servers in Figure 1 is merely illustrative. Depending on the implementation needs, there can be any number of terminal devices, networks, and servers.
  • the image processing method comprises the following steps:
  • Step 201 Input the target image into the pre-trained image detection model to obtain the feature values of the rectangular frame in which each of the at least one of the graphics represented by the target image is located and the probability value of each graphic as the specified graphic code.
  • the electronic device on which the image processing method runs can detect the target image using the pre-trained image detection model, that is, input the target image into the image detection model. Obtaining feature values of the rectangular frame in which each of the at least one of the graphics represented by the target image is located, and obtaining a probability value of each graphic as the specified graphic code.
  • the feature value of the rectangular frame in which each graphic is located and the probability value of the graphic in the specified graphic code can be output in pairs.
  • the target graphic is an image set by human setting or machine.
  • the image detection model can detect the image, and is used for characterizing the correspondence between the feature value of the rectangular frame in which the image and the image presented by the image are located and the probability value of the graphic as the specified graphic code.
  • the image detection model characterizes the correspondence between images and eigenvalues and probability values.
  • a rectangular box is a rectangular frame that defines the shape in the image.
  • the eigenvalues of the rectangular frame can be only coordinate values, or coordinate values and area values, or coordinate values and long values, wide values, and the like. Specifically, if the feature value includes only the coordinate value, the coordinate value may be a coordinate value of each vertex of the rectangular frame and a coordinate value of a center position of the rectangular frame.
  • the feature value may be the coordinate value of any one of the vertices of the rectangular frame or the coordinate value of the center position.
  • the graphics can be various graphics.
  • the specified graphic code is a graphic code set by a human setting or a machine, and may include a two-dimensional code or a barcode.
  • the image detection model may be a correspondence table that represents the corresponding relationship, such as an image presented with one or a set of graphics, and for each graphic in the image, corresponding to a feature or a set of features of the rectangular frame in which the graphic is located The value corresponds to the graph as a probability value for the specified graphic code.
  • the image detection model may also be an image-trained convolutional neural network model.
  • the convolutional neural network model can include two parts: an image classification model and a multi-scale convolution layer. That is to say, the image classification model is the basic network structure of the convolutional neural network, and a convolution layer is added on the basis of this.
  • the image classification model is the basic network structure of the convolutional neural network, and a convolution layer is added on the basis of this.
  • the image classification model is input into the image classification model of the convolutional neural network, and the data obtained by the image classification model passes through the multi-scale convolution layer, reaches the fully connected layer, and finally outputs from the model.
  • the image classification model can adopt one of a plurality of models (such as a VGG model, an AlexNet model, a LeNet model, etc.).
  • the image detection model may be constructed in the following manner: selecting a plurality of images presented with the specified graphic code, and manually or machine detecting and labeling the rectangular frame region where the specified graphic code is located.
  • the feature value and the probability value corresponding to the labeled image are determined or determined by a preset method.
  • the image detection model can be obtained by taking the image as an input, and determining the determined feature value and probability value as outputs.
  • the resulting image detection model can be further trained using a sample set including a large number of samples.
  • Step 202 In response to determining that there are at least two rectangular frames partially overlapping the enclosed area in the rectangular frame involved in the at least one graphic, determining an area partially overlapped by the area surrounded by the at least two rectangular frames and at least two rectangular frames The ratio of the sum of the areas of the enclosed area.
  • the electronic device responds by: determining that the regions surrounded by the at least two rectangular frames partially overlap The ratio of the area to the sum of the areas of the area enclosed by at least two rectangular boxes. If the feature value described above is an area, the feature value can be directly used as the area enclosed by the rectangular frame. If the feature value includes a long value, a wide value, or a coordinate value, the area enclosed by the rectangular frame can be calculated by the feature value. The area of the partial overlap can be determined based on the coordinate values in the feature values. At least one of the figures referred to herein relates to at least one rectangular frame, each graphic being located within a rectangular frame of at least one rectangular frame, the graphic having a one-to-one relationship with the rectangular frame.
  • local overlap can be manifested in various forms. For example, it may be in more than two rectangular boxes, one of which overlaps with the other. It can also be that two or more rectangular boxes between rectangular boxes in the image overlap each other.
  • Step 203 Determine a target rectangular frame from at least two rectangular frames based on a comparison of the ratio and the preset ratio threshold.
  • the electronic device compares the obtained ratio with the preset ratio threshold, and determines a target rectangular frame from the at least two rectangular frames based on the comparison.
  • the preset ratio threshold is a threshold value for which the threshold value is set by the pre-comparison value.
  • a target rectangle can be determined in at least two rectangular boxes, and multiple target rectangles can also be determined.
  • different determination results may be obtained when the ratio is greater than, less than, or equal to the preset ratio threshold according to the comparison.
  • the ratio is greater than the preset ratio threshold, the probability values of the at least two rectangular frames are compared, and the two rectangular frames with the largest probability values are used as the target rectangular frame.
  • the probability value corresponding to the rectangular box is the probability value of the graphic in the rectangular frame as the specified graphic code.
  • each of the at least two rectangular boxes is determined to be the target rectangular frame.
  • Step 204 Perform a blurring process or an occlusion process on the area enclosed by the target rectangular frame to generate a processed target image.
  • the electronic device may perform blurring processing on the obtained target rectangular frame, and may perform occlusion processing. After the above processing is performed on the target rectangular frame in the target image, the processed target image is obtained. Whether it is blurring or occlusion processing, the purpose is to make the graphic code in the target rectangle in the target image unrecognizable to avoid its use.
  • FIG. 3 is a schematic diagram of an application scenario of the image processing method according to the present embodiment.
  • FIG. 3 is a schematic diagram of an application scenario of the image processing method according to the present embodiment.
  • the electronic device 301 inputs the image a into the pre-trained image detection model, and obtains the feature values of the rectangular frame in which each of the four graphics presented by the image a is located and each graphic is a designated graphic.
  • a probability value 302 of the code wherein the image detection model is used to represent the correspondence between the feature value of the rectangular frame in which the image and the image presented by the image are located and the probability value of the graphic as the specified graphic code; in response to determining the involvement in the four graphics
  • the electronic device 301 determines the area of the area surrounded by areas surrounded by A, B, and C and the area enclosed by areas A, B, and C.
  • a ratio 303 of the sum based on the comparison of the ratio and the preset ratio threshold, determining A from the A, B, and C as the target rectangular frame 304; performing a blurring process or an occlusion process on the region enclosed by the A, and generating the processed target image 305 .
  • the method provided by the above embodiment of the present application improves the accuracy of determining the graphic code, and can process the graphic code in the image to avoid the adverse effects caused by the graphic code.
  • the flow 400 of the image processing method includes the following steps:
  • Step 401 Input the target image into the pre-trained image detection model to obtain a feature value of the rectangular frame in which each of the at least one graphic represented by the target image is located and a probability value of each graphic as the specified graphic code.
  • the server on which the image processing method runs may detect the target image using a pre-trained image detection model, that is, input the target image into the image detection model. Obtaining feature values of the rectangular frame in which each of the at least one of the graphics represented by the target image is located, and obtaining a probability value of each graphic as the specified graphic code.
  • the feature value of the rectangular frame in which each graphic is located and the probability value of the graphic in the specified graphic code can be output in pairs.
  • the image detection model can detect the image, and is used for characterizing the correspondence between the feature value of the rectangular frame in which the image and the image presented by the image are located and the probability value of the graphic as the specified graphic code.
  • the image detection model establishes a correspondence between images and feature values and probability values.
  • the feature value of the rectangular frame may be a coordinate value, or may include an area value or a long value, a wide value, and the like, and may also include the above.
  • the graphic can be a two-dimensional code or a barcode or the like.
  • the feature value includes a coordinate value of a center position of the rectangular frame, and a long value and a wide value of the rectangular frame.
  • Step 402 In response to determining that there are at least two rectangular frames partially overlapping the enclosing area in the rectangular frame involved in the at least one graphic, determining an area of the intersection of the area surrounded by the at least two rectangular frames partially overlapped and an area of the union .
  • the server determines that at least two rectangular frames partially overlapped by the enclosed area exist in a rectangular frame involved in the at least one graphic, and the server determines an intersection of the areas surrounded by the at least two rectangular frames that are partially overlapped. The area, as well as the area of the union.
  • step 403 a ratio of the area of the intersection and the area of the union is determined.
  • the server can determine the ratio of the area of the intersection and the area of the union.
  • Step 404 Determine a target rectangular frame from at least two rectangular frames based on a comparison of the ratio and the preset ratio threshold.
  • the server determines the target rectangular frame from the at least two rectangular frames based on the comparison between the obtained ratio and the preset ratio threshold.
  • the preset ratio threshold is the threshold set by the pre-comparison value.
  • a target rectangle can be determined in at least two rectangular boxes, and multiple target rectangles can also be determined.
  • different determination results may be obtained when the ratio is greater than, less than, or equal to the preset ratio threshold according to the comparison.
  • the ratio is greater than the preset ratio threshold, the probability values of the at least two rectangular frames are compared, and the two rectangular frames having the largest probability values are used as the target rectangular frame.
  • the probability value corresponding to the rectangular box is the probability value of the graphic in the rectangular frame as the specified graphic code.
  • each of the at least two rectangular boxes is determined to be the target rectangular frame.
  • step 405 the target rectangular frame is input into the previously trained binary model to determine whether the graphic in the target rectangular frame is the specified graphic code.
  • the server inputs the target rectangular frame into the previously trained binary classification model, and after the model outputs the target rectangular rectangle, whether the graphic is the specified graphic code, the server may determine the target rectangular frame according to the output. Whether the graphic is the specified graphic code.
  • the two classification model is used to determine whether the graphic in the rectangular frame is the specified graphic code.
  • the foregoing two-category model is trained by the following steps:
  • the direction gradient histogram feature vector of the positive sample and the direction gradient histogram feature vector of the negative sample are extracted, and the extracted direction gradient histogram feature vector is input into the radial basis function for training.
  • the server acquires a first preset number of images as a positive sample, and presents a specified graphic code in the positive sample. And the server acquires a second preset number of images presented with preset graphics as negative samples.
  • the preset graphic in the negative sample here may be various graphics different from the specified graphic code. It may be a graphic similar to a specified graphic code, such as a graphic composed of a plurality of vertical stripes similar to a barcode.
  • the kernel function of the SVM model can be a Radial basis function (RBF).
  • Step 406 In response to determining that the graphic in the target rectangular frame is a specified graphic code, the area enclosed by the target rectangular frame is divided into a preset number of meshes.
  • the server after determining that the graphic in the target rectangular frame is the specified graphic code, responds by dividing the area enclosed by the target rectangular frame into a preset number of meshes, so as to follow the enclosed area.
  • the mesh is refined.
  • Step 407 randomly setting pixels of each grid to generate a processed target image.
  • the server randomly sets pixels of each grid to obtain a processed target image. This increases the difficulty in identifying the graphic code in the rectangular frame.
  • the present application provides an embodiment of an image processing apparatus, and the apparatus embodiment corresponds to the method embodiment shown in FIG. Used in a variety of electronic devices.
  • the image processing apparatus 500 of the present embodiment includes an input unit 501, a determination unit 502, a comparison unit 503, and a processing unit 504.
  • the input unit 501 is configured to input the target image into the pre-trained image detection model, to obtain the feature value of the rectangular frame in which each of the at least one graphic represented by the target image is located, and each graphic is a specified graphic code.
  • the image detection model is used to represent a correspondence between the feature value of the rectangular frame in which the image and the image presented by the image are located and the probability value of the graphic is a probability value of the specified graphic code;
  • the determining unit 502 is configured to respond to the determination at least A rectangular frame involved in a graphic has at least two rectangular frames partially overlapping the enclosed area, and determines a ratio of an area overlapped by the area surrounded by the at least two rectangular frames to a total area of the area enclosed by the at least two rectangular frames;
  • the comparing unit 503 is configured to determine a target rectangular frame from at least two rectangular frames based on the comparison between the ratio and the preset ratio threshold; and the processing unit 504 is configured to perform blurring or occlusion on the area enclosed by the target rectangular frame Processing, generating a processed target image.
  • the electronic device on which the image processing method runs can detect the target image using the pre-trained image detection model, that is, input the target image into the image detection model. Obtaining feature values of the rectangular frame in which each of the at least one of the graphics represented by the target image is located, and obtaining a probability value of each graphic as the specified graphic code.
  • the feature value of the rectangular frame in which each graphic is located and the probability value of the graphic in the specified graphic code can be output in pairs.
  • the image detection model can detect the image, and is used for characterizing the correspondence between the feature value of the rectangular frame in which the image and the image presented by the image are located and the probability value of the graphic as the specified graphic code.
  • the image detection model establishes a correspondence between images and feature values and probability values.
  • the feature value of the rectangular frame may be a coordinate value, an area value or a long value, a wide value, or the like, and may also include the above.
  • Graphics can be a variety of graphics.
  • the specified graphic code is a graphic code set by a human setting or a machine, and may include a two-dimensional code or a barcode.
  • the electronic device determines that there is at least two rectangular frames partially overlapping in the rectangular frame involved in the at least one graphic, and responds by determining an area of the at least two rectangular frames partially overlapping with the foregoing The ratio of the sum of the areas of at least two rectangular boxes. If the feature value described above is an area, the feature value can be directly used as the area enclosed by the rectangular frame. If the feature value is a long value, a wide value, or a coordinate value (coordinate value of each vertex of the rectangular frame and/or coordinate value of the center position of the rectangular frame), the area enclosed by the rectangular frame can be calculated by the feature value.
  • At least one of the figures referred to herein relates to at least one rectangular frame, each graphic being located within a rectangular frame of at least one rectangular frame, the graphic having a one-to-one relationship with the rectangular frame.
  • the electronic device compares the obtained ratio with the preset ratio threshold, and determines a target rectangular frame from the at least two rectangular frames based on the comparison.
  • the preset ratio threshold is the threshold set by the pre-comparison value.
  • a target rectangle can be determined in at least two rectangular boxes, and multiple target rectangles can also be determined.
  • the electronic device may perform blurring processing on the obtained target rectangular frame, and may perform occlusion processing. After the above processing is performed on the target rectangular frame in the target image, the processed target image is obtained. Whether it is blurring or occlusion processing, the graphic code in the target rectangle in the target image can not be recognized to avoid its use.
  • the apparatus further includes: a graphic code determining unit configured to input the target rectangular frame into the previously trained two-category model to determine whether the graphic in the target rectangular frame is specified A graphic code, wherein the two-category model is used to determine whether the graphic in the rectangular frame is a designated graphic code.
  • the two-category model is obtained by: acquiring a first preset number of images presented with the specified graphic code as a positive sample, and acquiring a second preset number of presentations.
  • the image of the preset graphic is taken as a negative sample; the directional gradient histogram feature vector of the positive sample and the directional gradient histogram feature vector of the negative sample are extracted, and the extracted directional gradient histogram feature vector is input into the radial basis function for training.
  • the determining unit is further configured to: determine an area of the intersection of the area surrounded by the at least two rectangular frames that are partially overlapped, and an area of the union, and determine an area and a union of the intersection The ratio of the area.
  • the comparing unit includes: a first determining module, configured to determine, according to the determining that the ratio is greater than or equal to the preset ratio threshold, the rectangular box with the largest probability value being determined as And a second determining module, configured to determine each rectangular frame in the at least two rectangular frames as the target rectangular frame in response to determining that the ratio is less than the preset ratio threshold.
  • the processing unit includes: a dividing module configured to divide an area enclosed by the target rectangular frame into a preset number of meshes; and a setting module configured to randomly set each The pixels of the grid generate the processed target image.
  • FIG. 6 a block diagram of a computer system 600 suitable for use in implementing a server of an embodiment of the present application is shown.
  • the server shown in FIG. 6 is merely an example, and should not impose any limitation on the function and scope of use of the embodiments of the present application.
  • computer system 600 includes a central processing unit (CPU) 601 that can be loaded into a program in random access memory (RAM) 603 according to a program stored in read only memory (ROM) 602 or from storage portion 608. And perform various appropriate actions and processes.
  • RAM random access memory
  • ROM read only memory
  • RAM random access memory
  • various programs and data required for the operation of the system 600 are also stored.
  • the CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also coupled to bus 604.
  • the following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a storage portion 608 including a hard disk or the like. And a communication portion 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the Internet.
  • Driver 610 is also coupled to I/O interface 605 as needed.
  • a removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like, is mounted on the drive 610 as needed so that a computer program read therefrom is installed into the storage portion 608 as needed.
  • an embodiment of the present disclosure includes a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for executing the method illustrated in the flowchart.
  • the computer program can be downloaded and installed from the network via communication portion 609, and/or installed from removable media 611.
  • the computer program is executed by the central processing unit (CPU) 601
  • the above-described functions defined in the method of the present application are performed.
  • the computer readable medium of the present application 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 any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • a computer readable storage medium may be any tangible medium that can contain or store a program, which can be used by or in connection with an instruction execution system, apparatus or device.
  • a computer readable signal medium may include a data signal that is propagated in the baseband or as part of a carrier, carrying computer readable program code. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer readable signal medium can also be any computer readable medium other than a computer readable storage medium, which can transmit, propagate, or transport a program for use by or in connection with the instruction execution system, apparatus, or device.
  • Program code embodied on a computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the logic functions for implementing the specified.
  • Executable instructions can also occur in a different order than that illustrated in the drawings. For example, two successively represented blocks may in fact be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or operation. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present application may be implemented by software or by hardware.
  • the described unit may also be provided in the processor, for example, as a processor including an input unit, a determination unit, a comparison unit, and a processing unit.
  • the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the acquisition unit may also be described as “a unit that inputs a target image into a pre-trained image detection model”.
  • the present application also provides a computer readable medium, which may be included in the apparatus described in the above embodiments, or may be separately present and not incorporated into the apparatus.
  • the computer readable medium carries one or more programs, when the one or more programs are executed by the device, causing the device to: input the target image into the pre-trained image detection model to obtain at least one graphic presented by the target image.
  • the feature value of the rectangular frame in which each of the graphics is located and each of the graphics is a probability value of the specified graphic code
  • the image detection model is used to characterize the feature values and graphics of the rectangular frame in which the image and the image presented by the image are located Corresponding relationship of probability values of the graphic code; determining to partially overlap the area of the area surrounded by the at least two rectangular frames in response to determining that there are at least two rectangular frames partially overlapping the enclosed area in the rectangular frame involved in the at least one graphic a ratio of the total area of the area enclosed by at least two rectangular frames; determining a target rectangular frame from at least two rectangular frames based on the comparison of the ratio and the preset ratio threshold; and blurring or occluding the area enclosed by the target rectangular frame Processing, generating a processed target image.

Abstract

本申请实施例公开了图像处理方法和装置。该方法的一具体实施方式包括:将目标图像输入预先训练的图像检测模型,得到该目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值;响应于确定在该至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定该至少两个矩形框所包围的区域局部重叠的面积与该至少两个矩形框所包围区域的面积总和的比值;基于该比值和预设比值阈值的比较,从该至少两个矩形框中确定目标矩形框;生成处理后目标图像。本实施例提供的方法提高了确定图形码的准确度,并能够对图像中的图形码进行处理,避免图形码带来的不良影响。

Description

图像处理方法和装置
相关申请的交叉引用
本专利申请要求于2017年10月25日提交的、申请号为201711013332.3、申请人为北京京东尚科信息技术有限公司和北京京东世纪贸易有限公司、发明名称为“图像处理方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。
技术领域
本申请实施例涉及计算机技术领域,具体涉及互联网技术领域,尤其涉及图像处理方法和装置。
背景技术
图形码是用特定的几何图形按一定规律在平面分布的黑白相间的图形,能够存储信息,在日常生活中广泛应用。具体地,图形码可以是二维码或条形码等。
发明内容
本申请实施例的目的在于提出一种图像处理方法和装置。
第一方面,本申请实施例提供了一种图像处理方法,该方法包括:将目标图像输入预先训练的图像检测模型,得到目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值,其中,图像检测模型用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系;响应于确定在至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定至少两个矩形框所包围的区域局部重叠的面积与至少两个矩形框所包围区域的面积总和的比值;基于比值和预设比值阈值的比较,从至少两个矩形框中确定目标矩形框;对目标矩 形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像。
在一些实施例中,在对目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像之前,还包括:将目标矩形框输入在先训练的二分类模型,以确定目标矩形框内的图形是否为指定图形码,其中,二分类模型用以确定矩形框内的图形是否为指定图形码。
在一些实施例中,二分类模型通过如下步骤训练得到:获取第一预设数量的呈现有指定图形码的图像作为正样本,并获取第二预设数量的呈现有预设图形的图像作为负样本;提取正样本的方向梯度直方图特征向量和负样本的方向梯度直方图特征向量,将所提取的方向梯度直方图特征向量输入径向基函数进行训练。
在一些实施例中,确定至少两个矩形框所包围的区域局部重叠的面积与至少两个矩形框所包围区域的面积总和的比值,包括:确定局部重叠的至少两个矩形框所包围区域的交集的面积和并集的面积,并确定交集的面积和并集的面积的比值。
在一些实施例中,基于比值和预设比值阈值的比较,从至少两个矩形框中确定目标矩形框,包括:响应于确定比值大于或等于预设比值阈值,将所对应的概率值最大的矩形框确定为目标矩形框;响应于确定比值小于预设比值阈值,将至少两个矩形框中的每个矩形框确定为目标矩形框。
在一些实施例中,对目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像,包括:将目标矩形框所包围的区域划分为预设数量的网格;随机设置每个网格的像素,生成处理后目标图像。
第二方面,本申请实施例提供了一种图像处理装置,其特征在于,该装置包括:输入单元,配置用于将目标图像输入预先训练的图像检测模型,得到目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值,其中,图像检测模型用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系;确定单元,配置用于响应于确定在至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个 矩形框,确定至少两个矩形框所包围的区域局部重叠的面积与至少两个矩形框所包围区域的面积总和的比值;比较单元,配置用于基于比值和预设比值阈值的比较,从至少两个矩形框中确定目标矩形框;处理单元,配置用于对目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像。
在一些实施例中,该装置还包括:图形码确定单元,配置用于将目标矩形框输入在先训练的二分类模型,以确定目标矩形框内的图形是否为指定图形码,其中,二分类模型用以确定矩形框内的图形是否为指定图形码。
在一些实施例中,二分类模型通过如下步骤训练得到:获取第一预设数量的呈现有指定图形码的图像作为正样本,并获取第二预设数量的呈现有预设图形的图像作为负样本;提取正样本的方向梯度直方图特征向量和负样本的方向梯度直方图特征向量,将所提取的方向梯度直方图特征向量输入径向基函数进行训练。
在一些实施例中,确定单元进一步配置用于:确定局部重叠的至少两个矩形框所包围区域的交集的面积和并集的面积,并确定交集的面积和并集的面积的比值。
在一些实施例中,比较单元,包括:第一确定模块,配置用于响应于确定比值大于或等于预设比值阈值,将所对应的概率值最大的矩形框确定为目标矩形框;第二确定模块,配置用于响应于确定比值小于预设比值阈值,将至少两个矩形框中的每个矩形框确定为目标矩形框。
在一些实施例中,处理单元,包括:划分模块,配置用于将目标矩形框所包围的区域划分为预设数量的网格;设置模块,配置用于随机设置每个网格的像素,生成处理后目标图像。
第三方面,本申请实施例提供了一种服务器,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如图像处理方法中任一实施例的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,其上 存储有计算机程序,该程序被处理器执行时实现如图像处理方法中任一实施例的方法。
本申请实施例提供的图像处理方法和装置,首先将目标图像输入预先训练的图像检测模型,得到目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值,其中,图像检测模型用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系。之后,响应于确定在至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定至少两个矩形框所包围的区域局部重叠的面积与至少两个矩形框所包围区域的面积总和的比值。然后,基于比值和预设比值阈值的比较,从至少两个矩形框中确定目标矩形框。最后,对目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像,从而提高了确定图形码的准确度,并能够对图像中的图形码进行处理,避免图形码带来的不良影响。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1是本申请可以应用于其中的示例性系统架构图;
图2是根据本申请的图像处理方法的一个实施例的流程图;
图3是根据本申请的图像处理方法的一个应用场景的示意图;
图4是根据本申请的图像处理方法的又一个实施例的流程图;
图5是根据本申请的图像处理装置的一个实施例的结构示意图;
图6是适于用来实现本申请实施例的服务器的计算机系统的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与 有关发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了可以应用本申请的图像处理方法或图像处理装置的实施例的示例性系统架构100。
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如图像显示应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。
终端设备101、102、103可以是具有显示屏并且支持图像显示的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103上显示的图像提供支持的后台服务器。后台服务器可以对接收到的图像进行检测等处理,并将处理结果反馈给终端设备。
需要说明的是,本申请实施例所提供的图像处理方法一般由服务器105执行,相应地,图像处理装置一般设置于服务器105中。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
继续参考图2,示出了根据本申请的图像处理方法的一个实施例的流程200。该图像处理方法,包括以下步骤:
步骤201,将目标图像输入预先训练的图像检测模型,得到目标 图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值。
在本实施例中,图像处理方法运行于其上的电子设备(例如图1所示的服务器)可以使用预先训练的图像检测模型对目标图像做检测,也即将目标图像输入图像检测模型。得到上述目标图像所呈现的至少一个图形中的每个图形所在矩形框的特征值,并得到每个图形为指定图形码的概率值。在这里,每个图形所在矩形框的特征值和该图形为指定图形码的概率值可以成对输出。目标图形为人为设定或者机器设定的图像。其中,图像检测模型可以对图像进行检测,用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系。图像检测模型表征了图像与特征值、概率值之间的对应关系。矩形框是矩形的框体,用以划定图像中的图形。矩形框的特征值可以只是坐标值,也可以是坐标值和面积值,或者坐标值和长值、宽值等等。具体地,如果特征值只包括坐标值,坐标值可以是矩形框各个顶点的坐标值和矩形框中心位置的坐标值。如果特征值不仅包括坐标值,还包括面积值或长值、宽值,特征值可以是矩形框任意一个顶点的坐标值或中心位置的坐标值。在这里,图形可以是各种图形。指定图形码是人为设定或者机器设定的图形码,可以包括二维码或者条形码等等。
具体地,图像检测模型可以是表征上述对应关系的对应关系表,比如呈现有一个或一组图形的图像,对于图像中的每个图形,对应了该图形所在矩形框的一个或一组特征值,并对应了该图形为指定图形码的一个概率值。
此外,图像检测模型也可以是经过图像训练的卷积神经网络模型。卷积神经网络模型可以包括两部分:图像分类模型和多尺度的卷积层。即是以图像分类模型为卷积神经网络的基础网络结构,并在此基础上添加了卷积层。在应用卷积神经网络时,将图像输入卷积神经网络的图像分类模型的部分,由图像分类模型得到的数据通过多尺度的卷积层,到达全连接层,最终从模型输出。图像分类模型可以采用多种模型(比如VGG模型、AlexNet模型、LeNet模型等等)中的一种。
具体地,可以采用以下方式构建图像检测模型:挑选多张呈现有指定图形码的图像,人为或者机器检测并标注指定图形码所在的矩形框区域。人为确定或利用预设方式确定标注后的图像对应的特征值和概率值。将图像作为输入,确定的特征值和概率值作为输出进行训练,可以得到图像检测模型。为了获得更准确的模型输出,可以使用包括大量样本的样本集对得到的图像检测模型进行进一步训练。
步骤202,响应于确定在至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定至少两个矩形框所包围的区域局部重叠的面积与至少两个矩形框所包围区域的面积总和的比值。
在本实施例中,上述电子设备在确定在上述至少一个图形所涉及的矩形框中存在局部重叠的至少两个矩形框之后,则做出响应:确定至少两个矩形框所包围的区域局部重叠的面积与至少两个矩形框所包围区域的面积总和的比值。如果上述的特征值是面积,可以直接将该特征值作为矩形框所包围的面积。如果特征值包括长值、宽值或者坐标值,可以通过特征值计算矩形框所包围的面积。局部重叠的面积可以根据特征值中的坐标值来确定。在这里所指的至少一个图形涉及至少一个矩形框,每个图形位于至少一个矩形框中的一个矩形框内,图形与矩形框具有一对一的关系。
在实践中,局部重叠可以表现为各种形式。比如,可以是在两个以上的矩形框中,其中一个矩形框与其他矩形框分别重叠。也可以是图像中矩形框之间的两个或多个矩形框交互重叠。
步骤203,基于比值和预设比值阈值的比较,从至少两个矩形框中确定目标矩形框。
在本实施例中,上述电子设备对得到的比值和预设比值阈值进行比较大小,基于上述比较,从上述至少两个矩形框中确定目标矩形框。预设比值阈值为预先对比值所设置的起数值限定作用的阈值。可以在至少两个矩形框中确定一个目标矩形框,也可以确定多个目标矩形框。
具体地,可以根据比较后,在比值大于、小于或等于预设比值阈值时得到不同的确定结果。比如,在比值大于预设比值阈值时,比较上述的至少两个矩形框的概率值,将所对应的概率值最大的两个矩形 框都作为目标矩形框。矩形框对应的概率值是该矩形框中的图形为指定图形码的概率值。
在本实施例的一些可选的实现方式中,响应于确定比值大于或等于预设比值阈值,将所对应的概率值最大的矩形框确定为目标矩形框;
响应于确定比值小于预设比值阈值,将至少两个矩形框中的每个矩形框确定为目标矩形框。
步骤204,对目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像。
在本实施中,上述电子设备对得到的目标矩形框进行虚化处理,也可以进行遮挡处理。在对目标图像中的目标矩形框进行上述处理后,得到处理后目标图像。无论是虚化处理还是遮挡处理,目的都是使目标图像中目标矩形框中的图形码无法被识别,以避免其为人所利用。
继续参见图3,图3是根据本实施例的图像处理方法的应用场景的一个示意图。在图3的应用场景中,继续参见图3,图3是根据本实施例的图像处理方法的应用场景的一个示意图。在图3的应用场景中,电子设备301将图像a输入预先训练的图像检测模型,得到图像a所呈现的4个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值302,其中,图像检测模型用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系;响应于确定在4个图形所涉及的矩形框中存在所包围区域局部重叠的3个矩形框:甲、乙和丙,电子设备301确定甲、乙和丙所包围的区域局部重叠的面积与甲、乙和丙所包围区域的面积总和的比值303;基于比值和预设比值阈值的比较,从甲、乙和丙中确定甲为目标矩形框304;对甲所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像305。
本申请的上述实施例提供的方法提高了确定图形码的准确度,并能够对图像中的图形码进行处理,避免图形码带来的不良影响。
进一步参考图4,其示出了图像处理方法的又一个实施例的流程 400。该图像处理方法的流程400,包括以下步骤:
步骤401,将目标图像输入预先训练的图像检测模型,得到目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值。
在本实施例中,图像处理方法运行于其上的服务器可以使用预先训练的图像检测模型对目标图像做检测,也即将目标图像输入图像检测模型。得到上述目标图像所呈现的至少一个图形中的每个图形所在矩形框的特征值,并得到每个图形为指定图形码的概率值。在这里,每个图形所在矩形框的特征值和该图形为指定图形码的概率值可以成对输出。其中,图像检测模型可以对图像进行检测,用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系。在这里,图像检测模型建立了图像与特征值、概率值之间的对应关系。矩形框的特征值可以是坐标值,也可以包括面积值或者长值、宽值等等,也可以包括上述的几种。图形可以是二维码或者条形码等等。
在本实施例的一些可选的实现方式中,特征值包括矩形框中心位置的坐标值,和矩形框的长值和宽值。
步骤402,响应于确定在至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定局部重叠的至少两个矩形框所包围区域的交集的面积和并集的面积。
在本实施例中,上述服务器在确定在至少一个图形所涉及的矩形框中,存在所包围区域局部重叠的至少两个矩形框,上述服务器确定局部重叠的至少两个矩形框所包围区域的交集的面积,以及并集的面积。
步骤403,确定交集的面积和并集的面积的比值。
在本实施例中,在得到交集的面积以及并集的面积之后,上述服务器就可以确定交集的面积和并集的面积的比值。
步骤404,基于比值和预设比值阈值的比较,从至少两个矩形框中确定目标矩形框。
在本实施例中,上述服务器基于得到的比值和预设比值阈值的比 较,从上述至少两个矩形框中确定目标矩形框。预设比值阈值为预先对比值所设置的阈值。可以在至少两个矩形框中确定一个目标矩形框,也可以确定多个目标矩形框。
具体地,可以根据比较后,在比值大于、小于或等于预设比值阈值时得到不同的确定结果。比如,在比值大于预设比值阈值时,比较上述的至少两个矩形框的概率值,将所对应的概率值最大的两个矩形框都作为目标矩形框。矩形框对应的概率值是该矩形框中的图形为指定图形码的概率值。
在本实施例的一些可选的实现方式中,响应于确定比值大于或等于预设比值阈值,将所对应的概率值最大的矩形框确定为目标矩形框;
响应于确定比值小于预设比值阈值,将至少两个矩形框中的每个矩形框确定为目标矩形框。
步骤405,将目标矩形框输入在先训练的二分类模型,以确定目标矩形框内的图形是否为指定图形码。
在本实施例中,上述服务器将目标矩形框输入在先训练的二分类模型,在该模型输出目标矩形框中的图形是否为指定图形码之后,上述服务器即可以根据输出确定目标矩形框中的图形是否为指定图形码。其中,二分类模型用以确定矩形框中的图形是否为指定图形码。
在本实施例的一些可选的实现方式中,上述二分类模型通过如下步骤训练得到:
获取第一预设数量的呈现有指定图形码的图像作为正样本,并获取第二预设数量的呈现有预设图形的图像作为负样本;
提取正样本的方向梯度直方图特征向量和负样本的方向梯度直方图特征向量,将所提取的方向梯度直方图特征向量输入径向基函数进行训练。
在本实施例中,上述服务器获取第一预设数量的图像作为正样本,在正样本中呈现有指定图形码。并且上述服务器获取第二预设数量的呈现有预设图形的图像作为负样本。这里的负样本中的预设图形可以是各种与指定图形码不同的图形。可以是与指定图形码相似的图形,比如与条形码类似的多个竖条纹组成的图形。
在实践中,需要将所提取的正样本的方向梯度直方图(HOG,Histogram of Oriented Gradient)特征向量和负样本的方向梯度直方图特征向量输入支持向量机SVM(Support Vector Machine)模型进行训练。SVM模型的核函数可以为径向基函数(RBF,Radial basis function)。
步骤406,响应于确定目标矩形框内的图形为指定图形码,将目标矩形框所包围的区域划分为预设数量的网格。
在本实施例中,在确定目标矩形框内的图形为指定图形码之后,上述服务器做出响应:将目标矩形框所包围的区域划分为预设数量的网格,以便于对所包围区域按照网格进行细化处理。
步骤407,随机设置每个网格的像素,生成处理后目标图像。
在本实施例中,上述服务器对各个网格的像素进行随机设置,得到处理后目标图像。这样增加了矩形框内图形码的识别难度。
本实施例通过随机设置网格的像素,能够降低处理后的目标图像中的图形码被解析出来的可能性,以进一步防止图形码为人所利用。
进一步参考图5,作为对上述各图所示方法的实现,本申请提供了一种图像处理装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图5所示,本实施例的图像处理装置500包括:输入单元501、确定单元502、比较单元503和处理单元504。其中,输入单元501,配置用于将目标图像输入预先训练的图像检测模型,得到目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值,其中,图像检测模型用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系;确定单元502,配置用于响应于确定在至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定至少两个矩形框所包围的区域局部重叠的面积与至少两个矩形框所包围区域的面积总和的比值;比较单元503,配置用于基于比值和预设比值阈值的比较,从至少两个矩形框中确定目标矩形框;处理单元504,配置用于对目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理 后目标图像。
在本实施例中,图像处理方法运行于其上的电子设备(例如图1所示的服务器)可以使用预先训练的图像检测模型对目标图像做检测,也即将目标图像输入图像检测模型。得到上述目标图像所呈现的至少一个图形中的每个图形所在矩形框的特征值,并得到每个图形为指定图形码的概率值。在这里,每个图形所在矩形框的特征值和该图形为指定图形码的概率值可以成对输出。其中,图像检测模型可以对图像进行检测,用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系。在这里,图像检测模型建立了图像与特征值、概率值之间的对应关系。矩形框的特征值可以是坐标值,也可以是面积值或者长值、宽值等等,也可以包括上述的几种。图形可以是各种图形。指定图形码是人为设定或者机器设定的图形码,可以包括二维码或者条形码等等。
在本实施例中,上述电子设备在确定在上述至少一个图形所涉及的矩形框中存在局部重叠的至少两个矩形框,则做出响应:确定上述至少两个矩形框局部重叠的面积与上述至少两个矩形框的面积总和的比值。如果上述的特征值是面积,可以直接将该特征值作为矩形框所包围的面积。如果特征值为长值、宽值或者坐标值(矩形框各个顶点的坐标值和/或矩形框中心位置的坐标值),可以通过特征值计算矩形框所包围的面积。在这里所指的至少一个图形涉及至少一个矩形框,每个图形位于至少一个矩形框中的一个矩形框内,图形与矩形框具有一对一的关系。
在本实施例中,上述电子设备对得到的比值和预设比值阈值进行比较大小,基于上述比较,从上述至少两个矩形框中确定目标矩形框。预设比值阈值为预先对比值所设置的阈值。可以在至少两个矩形框中确定一个目标矩形框,也可以确定多个目标矩形框。
在本实施中,上述电子设备对得到的目标矩形框进行虚化处理,也可以进行遮挡处理。在对目标图像中的目标矩形框进行上述处理后,得到处理后目标图像。无论是虚化处理还是遮挡处理,都能够使目标图像中目标矩形框中的图形码无法被识别,以避免其为人所利用。
在本实施例的一些可选的实现方式中,该装置还包括:图形码确定单元,配置用于将目标矩形框输入在先训练的二分类模型,以确定目标矩形框内的图形是否为指定图形码,其中,二分类模型用以确定矩形框内的图形是否为指定图形码。
在本实施例的一些可选的实现方式中,二分类模型通过如下步骤训练得到:获取第一预设数量的呈现有指定图形码的图像作为正样本,并获取第二预设数量的呈现有预设图形的图像作为负样本;提取正样本的方向梯度直方图特征向量和负样本的方向梯度直方图特征向量,将所提取的方向梯度直方图特征向量输入径向基函数进行训练。
在本实施例的一些可选的实现方式中,确定单元进一步配置用于:确定局部重叠的至少两个矩形框所包围区域的交集的面积和并集的面积,并确定交集的面积和并集的面积的比值。
在本实施例的一些可选的实现方式中,比较单元,包括:第一确定模块,配置用于响应于确定比值大于或等于预设比值阈值,将所对应的概率值最大的矩形框确定为目标矩形框;第二确定模块,配置用于响应于确定比值小于预设比值阈值,将至少两个矩形框中的每个矩形框确定为目标矩形框。
在本实施例的一些可选的实现方式中,处理单元,包括:划分模块,配置用于将目标矩形框所包围的区域划分为预设数量的网格;设置模块,配置用于随机设置每个网格的像素,生成处理后目标图像。
下面参考图6,其示出了适于用来实现本申请实施例的服务器的计算机系统600的结构示意图。图6示出的服务器仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图6所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有系统600操作所需的各种程序和数据。CPU 601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。在该计算机程序被中央处理单元(CPU)601执行时,执行本申请的方法中限定的上述功能。需要说明的是,本申请的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介 质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括输入单元、确定单元、比较单元和处理单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元还可以被描述为“将目标图像输入预先训练的图像检测模型的单元”。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的装置中所包含的;也可以是单独存在,而未装配入该装置中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该装置执行时,使得该装置:将目标图像输入预先训练的图像检测模型,得到目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值,其中,图像检测模型用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为指定图形码的概率值的对应关系;响 应于确定在至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定至少两个矩形框所包围的区域局部重叠的面积与至少两个矩形框所包围区域的面积总和的比值;基于比值和预设比值阈值的比较,从至少两个矩形框中确定目标矩形框;对目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (14)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    将目标图像输入预先训练的图像检测模型,得到所述目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值,其中,所述图像检测模型用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为所述指定图形码的概率值的对应关系;
    响应于确定在所述至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定所述至少两个矩形框所包围的区域局部重叠的面积与所述至少两个矩形框所包围区域的面积总和的比值;
    基于所述比值和预设比值阈值的比较,从所述至少两个矩形框中确定目标矩形框;
    对所述目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像。
  2. 根据权利要求1所述的图像处理方法,其特征在于,在所述对所述目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像之前,还包括:
    将所述目标矩形框输入在先训练的二分类模型,以确定所述目标矩形框内的图形是否为所述指定图形码,其中,所述二分类模型用以确定矩形框内的图形是否为所述指定图形码。
  3. 根据权利要求1所述的图像处理方法,其特征在于,所述二分类模型通过如下步骤训练得到:
    获取第一预设数量的呈现有指定图形码的图像作为正样本,并获取第二预设数量的呈现有预设图形的图像作为负样本;
    提取所述正样本的方向梯度直方图特征向量和所述负样本的方向梯度直方图特征向量,将所提取的方向梯度直方图特征向量输入径向 基函数进行训练。
  4. 根据权利要求1所述的图像处理方法,其特征在于,所述确定所述至少两个矩形框所包围的区域局部重叠的面积与所述至少两个矩形框所包围区域的面积总和的比值,包括:
    确定局部重叠的至少两个矩形框所包围区域的交集的面积和并集的面积,并确定所述交集的面积和所述并集的面积的比值。
  5. 根据权利要求1所述的图像处理方法,其特征在于,所述基于所述比值和预设比值阈值的比较,从所述至少两个矩形框中确定目标矩形框,包括:
    响应于确定所述比值大于或等于预设比值阈值,将所对应的概率值最大的矩形框确定为目标矩形框;
    响应于确定所述比值小于预设比值阈值,将所述至少两个矩形框中的每个矩形框确定为目标矩形框。
  6. 根据权利要求1-2之一所述的图像处理方法,其特征在于,所述对所述目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像,包括:
    将所述目标矩形框所包围的区域划分为预设数量的网格;
    随机设置每个网格的像素,生成处理后目标图像。
  7. 一种图像处理装置,其特征在于,所述装置包括:
    输入单元,配置用于将目标图像输入预先训练的图像检测模型,得到所述目标图像所呈现的至少一个图形中的每个图形所在的矩形框的特征值和每个图形为指定图形码的概率值,其中,所述图像检测模型用于表征图像与图像所呈现的图形所在的矩形框的特征值和图形为所述指定图形码的概率值的对应关系;
    确定单元,配置用于响应于确定在所述至少一个图形所涉及的矩形框中存在所包围区域局部重叠的至少两个矩形框,确定所述至少两 个矩形框所包围的区域局部重叠的面积与所述至少两个矩形框所包围区域的面积总和的比值;
    比较单元,配置用于基于所述比值和预设比值阈值的比较,从所述至少两个矩形框中确定目标矩形框;
    处理单元,配置用于对所述目标矩形框所包围的区域进行虚化处理或遮挡处理,生成处理后目标图像。
  8. 根据权利要求1所述的图像处理装置,其特征在于,所述装置还包括:
    图形码确定单元,配置用于将所述目标矩形框输入在先训练的二分类模型,以确定所述目标矩形框内的图形是否为所述指定图形码,其中,所述二分类模型用以确定矩形框内的图形是否为所述指定图形码。
  9. 根据权利要求1所述的图像处理装置,其特征在于,所述二分类模型通过如下步骤训练得到:
    获取第一预设数量的呈现有指定图形码的图像作为正样本,并获取第二预设数量的呈现有预设图形的图像作为负样本;
    提取所述正样本的方向梯度直方图特征向量和所述负样本的方向梯度直方图特征向量,将所提取的方向梯度直方图特征向量输入径向基函数进行训练。
  10. 根据权利要求1所述的图像处理装置,其特征在于,所述确定单元进一步配置用于:
    确定局部重叠的至少两个矩形框所包围区域的交集的面积和并集的面积,并确定所述交集的面积和所述并集的面积的比值。
  11. 根据权利要求1所述的图像处理装置,其特征在于,所述比较单元,包括:
    第一确定模块,配置用于响应于确定所述比值大于或等于预设比 值阈值,将所对应的概率值最大的矩形框确定为目标矩形框;
    第二确定模块,配置用于响应于确定所述比值小于预设比值阈值,将所述至少两个矩形框中的每个矩形框确定为目标矩形框。
  12. 根据权利要求7-8之一所述的图像处理装置,其特征在于,所述处理单元,包括:
    划分模块,配置用于将所述目标矩形框所包围的区域划分为预设数量的网格;
    设置模块,配置用于随机设置每个网格的像素,生成处理后目标图像。
  13. 一种服务器,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-6中任一所述的方法。
  14. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-6中任一所述的方法。
PCT/CN2018/109120 2017-10-25 2018-09-30 图像处理方法和装置 WO2019080702A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/754,244 US20210200971A1 (en) 2017-10-25 2018-09-30 Image processing method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711013332.3 2017-10-25
CN201711013332.3A CN109711508B (zh) 2017-10-25 2017-10-25 图像处理方法和装置

Publications (1)

Publication Number Publication Date
WO2019080702A1 true WO2019080702A1 (zh) 2019-05-02

Family

ID=66247073

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/109120 WO2019080702A1 (zh) 2017-10-25 2018-09-30 图像处理方法和装置

Country Status (3)

Country Link
US (1) US20210200971A1 (zh)
CN (1) CN109711508B (zh)
WO (1) WO2019080702A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325491B (zh) * 2018-08-16 2023-01-03 腾讯科技(深圳)有限公司 识别码识别方法、装置、计算机设备和存储介质
CN111767750A (zh) * 2019-05-27 2020-10-13 北京沃东天骏信息技术有限公司 图像处理方法和装置
US11200455B2 (en) * 2019-11-22 2021-12-14 International Business Machines Corporation Generating training data for object detection
CN113538450B (zh) * 2020-04-21 2023-07-21 百度在线网络技术(北京)有限公司 用于生成图像的方法及装置
CN112434587A (zh) * 2020-11-16 2021-03-02 北京沃东天骏信息技术有限公司 一种图像处理方法及装置、存储介质
CN114782614B (zh) * 2022-06-22 2022-09-20 北京飞渡科技有限公司 模型渲染方法、装置、存储介质和电子设备
CN115908895A (zh) * 2022-10-28 2023-04-04 清华大学 工业场景中安全隐患排查方法、装置、设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014191028A1 (en) * 2013-05-28 2014-12-04 Sicpa Holding Sa Bar code reading device and detection method
CN104751093A (zh) * 2013-12-31 2015-07-01 阿里巴巴集团控股有限公司 用于获取宿主设备显示的图像识别码的方法和装置
EP2950238A1 (fr) * 2014-05-27 2015-12-02 Sagemcom Documents Sas Procédé de détection d'un code à barres à deux dimensions dans une image d'un document numérisé
CN106022142A (zh) * 2016-05-04 2016-10-12 泰康人寿保险股份有限公司 图像隐私信息处理方法及装置
EP3113083A2 (en) * 2015-07-01 2017-01-04 Dimitri Marinkin Method for protecting the authenticity of an object, item, document, packaging and/or a label from imitation, forgery and theft
CN106991460A (zh) * 2017-01-23 2017-07-28 中山大学 一种qr码快速定位检测算法
CN107273777A (zh) * 2017-04-26 2017-10-20 广东顺德中山大学卡内基梅隆大学国际联合研究院 一种基于滑动部件匹配的二维码码型识别方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI455034B (zh) * 2012-03-27 2014-10-01 Visionatics Inc 條碼辨識方法及其電腦程式產品
CN105260693B (zh) * 2015-12-01 2017-12-08 浙江工业大学 一种激光二维码定位方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014191028A1 (en) * 2013-05-28 2014-12-04 Sicpa Holding Sa Bar code reading device and detection method
CN104751093A (zh) * 2013-12-31 2015-07-01 阿里巴巴集团控股有限公司 用于获取宿主设备显示的图像识别码的方法和装置
EP2950238A1 (fr) * 2014-05-27 2015-12-02 Sagemcom Documents Sas Procédé de détection d'un code à barres à deux dimensions dans une image d'un document numérisé
EP3113083A2 (en) * 2015-07-01 2017-01-04 Dimitri Marinkin Method for protecting the authenticity of an object, item, document, packaging and/or a label from imitation, forgery and theft
CN106022142A (zh) * 2016-05-04 2016-10-12 泰康人寿保险股份有限公司 图像隐私信息处理方法及装置
CN106991460A (zh) * 2017-01-23 2017-07-28 中山大学 一种qr码快速定位检测算法
CN107273777A (zh) * 2017-04-26 2017-10-20 广东顺德中山大学卡内基梅隆大学国际联合研究院 一种基于滑动部件匹配的二维码码型识别方法

Also Published As

Publication number Publication date
CN109711508A (zh) 2019-05-03
CN109711508B (zh) 2020-06-05
US20210200971A1 (en) 2021-07-01

Similar Documents

Publication Publication Date Title
WO2019080702A1 (zh) 图像处理方法和装置
US11734851B2 (en) Face key point detection method and apparatus, storage medium, and electronic device
US10936919B2 (en) Method and apparatus for detecting human face
CN107633218B (zh) 用于生成图像的方法和装置
CN109948507B (zh) 用于检测表格的方法和装置
CN107911753B (zh) 用于在视频中添加数字水印的方法和装置
US11436863B2 (en) Method and apparatus for outputting data
US9349076B1 (en) Template-based target object detection in an image
CN109344762B (zh) 图像处理方法和装置
WO2020062493A1 (zh) 图像处理方法和装置
WO2020029466A1 (zh) 图像处理方法和装置
CN109255767B (zh) 图像处理方法和装置
CN109118456B (zh) 图像处理方法和装置
US20200410213A1 (en) Method and apparatus for processing mouth image
CN109377508B (zh) 图像处理方法和装置
CN112330527A (zh) 图像处理方法、装置、电子设备和介质
CN108491812B (zh) 人脸识别模型的生成方法和装置
WO2020125062A1 (zh) 一种图像融合方法及相关装置
WO2020034981A1 (zh) 编码信息的生成方法和识别方法
CN110427915B (zh) 用于输出信息的方法和装置
CN110211195B (zh) 生成图像集合的方法、装置、电子设备和计算机可读存储介质
CN110827301B (zh) 用于处理图像的方法和装置
CN112488095A (zh) 印章图像识别方法、装置和电子设备
WO2022095318A1 (zh) 字符检测方法、装置、电子设备、存储介质及程序
US20220207917A1 (en) Facial expression image processing method and apparatus, and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18870074

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19/08/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18870074

Country of ref document: EP

Kind code of ref document: A1