WO2022087846A1 - Image processing method and apparatus, device, and storage medium - Google Patents

Image processing method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2022087846A1
WO2022087846A1 PCT/CN2020/124113 CN2020124113W WO2022087846A1 WO 2022087846 A1 WO2022087846 A1 WO 2022087846A1 CN 2020124113 W CN2020124113 W CN 2020124113W WO 2022087846 A1 WO2022087846 A1 WO 2022087846A1
Authority
WO
WIPO (PCT)
Prior art keywords
quadrilateral
feature
image
line segments
coordinate information
Prior art date
Application number
PCT/CN2020/124113
Other languages
French (fr)
Chinese (zh)
Inventor
顾磊
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2020/124113 priority Critical patent/WO2022087846A1/en
Priority to CN202080103272.8A priority patent/CN115885314A/en
Publication of WO2022087846A1 publication Critical patent/WO2022087846A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/543Depth or shape recovery from line drawings

Definitions

  • the embodiments of the present application relate to the technical field of image processing, and more particularly, to an image processing method, apparatus, device, and storage medium.
  • the tilted view effect of the document-type objects in the image is caused by the tilt of the electronic device during shooting.
  • the image is often corrected by identifying the target quadrilateral in the image and according to the coordinate information of the target quadrilateral.
  • the existing technology cannot accurately identify the target quadrilateral, resulting in a poor effect of correcting the captured image.
  • Embodiments of the present application provide an image processing method, apparatus, device, and storage medium.
  • an image processing method including:
  • the reliability of the quadrilateral is calculated through the operation of the Gaussian function.
  • the reliability is used to represent the evaluation result of the quadrilateral as the target area, and the target area is used to represent the target object in the image. form;
  • At least one target quad is determined.
  • an image processing apparatus including:
  • an image acquisition unit for acquiring an image to be identified, the image including a target object
  • an image recognition unit used for recognizing at least one quadrilateral in the image to obtain coordinate information of each quadrilateral
  • the image processing unit is used to calculate the reliability of the quadrilateral according to the coordinate information of the quadrilateral through Gaussian operation for each quadrilateral.
  • the reliability is used to characterize the evaluation result of the quadrilateral as the target area, and the target area is used to represent the target object form in the image;
  • the image processing unit is further configured to determine at least one target quadrilateral according to the reliability of each quadrilateral.
  • an electronic device including: a processor and a memory, where the memory is used for storing a computer program, and the processor is used for calling and running the computer program stored in the memory to execute the first aspect or each of its implementations. method.
  • a computer-readable storage medium for storing a computer program, and the computer program causes a computer to execute the method in the first aspect or each of its implementations.
  • a computer program product comprising computer program instructions that cause a computer to perform a method as in the first aspect or implementations thereof.
  • a computer program causing a computer to perform the method as in the first aspect or implementations thereof.
  • the coordinate information of each quadrilateral is obtained, so as to realize the preliminary screening of the quadrilateral; and based on the coordinate information of each quadrilateral, through Gaussian operation, the quadrilateral is obtained as For the credibility of the target area, by setting the preset parameters in the Gaussian function, the credibility of the quadrilateral approaching the target can be higher; and then one or more quadrilaterals with the highest credibility are selected as the target quadrilateral.
  • the embodiment of the present application can accurately identify the target quadrilateral that can characterize the shape of the target object, which provides a basis for the subsequent correction of the shape of the target object to obtain a better presentation effect.
  • FIG. 1 is a schematic flowchart of an image correction scene 100 provided by an embodiment of the present application
  • FIG. 2 is a schematic frame diagram of an electronic device 200 provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of an image processing method 300 according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a candidate graph 400 provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of an image processing method 500 according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a to-be-recognized quadrilateral 600 provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of an image processing method 700 provided by an embodiment of the present application.
  • FIG. 8 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application.
  • FIG. 9 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application.
  • FIG. 10 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • document class objects include, but are not limited to, documents, business cards, posters, bulletin boards, rewritable whiteboards or blackboards, and the like. Because it is difficult to control the relative shooting angle between the terminal device and the target object, the document-type object is often presented as an inclined irregular quadrilateral due to the perspective transformation in the captured image. image is corrected.
  • the quadrilaterals in the image are difficult to identify, or it is difficult to identify the number of polygons. Determine the target quadrilateral from the quadrilaterals.
  • the embodiments of the present application are applied to the above scenarios, in order to make the corrected image have a better display effect and accurately obtain the target quadrilateral in the image, with reference to FIG.
  • the image 101 includes a plurality of line segments, and by identifying these line segments, quadrilaterals in the image, such as quadrilaterals 102 and 103, are obtained, and by analyzing the reliability of each quadrilateral as a target area, and then based on the reliability of each quadrilateral It is determined that the target quadrilateral is the quadrilateral 102, and it should be understood that the target area is the boundary of the shape of the target object in the image.
  • the embodiments of the present application achieve the technical effect of correctly acquiring the target quadrilateral in the image.
  • the number of target quadrilaterals may be one to multiple. For example, when collecting images of multiple target objects at the same time, a target quadrilateral corresponding to each target object should be identified; or, for the same target object, multiple target quadrilaterals with high reliability may be determined, as an example instead of Restrictively, a final target quadrilateral may be determined based on a plurality of target quadrilaterals through algorithm screening, or a target quadrilateral selected by the user from the plurality of target quadrilaterals may be received as a final target quadrilateral.
  • a transformation matrix is obtained according to the determined at least one target quadrilateral, and perspective transformation is performed on the image according to the transformation matrix to obtain the transformed image 110 shown in FIG. 1 .
  • the regular quadrilateral 112 is the effect after the quadrilateral 102 is transformed, and the target object is displayed in the image 110 in front after the quadrilateral 112 is transformed, which has a better display effect.
  • the technical solutions of the embodiments of the present application can be applied to various electronic devices to implement at least one of verification, optimization, and testing of language algorithm models.
  • the electronic device may be a terminal device, such as a mobile phone (Mobile Phone), a tablet computer (Pad), a computer, a virtual reality (Virtual Reality, VR) terminal device, an augmented reality (Augmented Reality, AR) terminal device, an industrial control ( terminal equipment in industrial control, terminal equipment in self driving, terminal equipment in remote medical, terminal equipment in smart city or terminal equipment in smart home terminal equipment, etc.
  • the terminal device in this embodiment of the present application may also be a wearable device, and a wearable device may also be called a wearable smart device, which is a general term for intelligently designing everyday wearable devices and developing wearable devices by applying wearable technology, such as Glasses, gloves, watches, clothing and shoes, etc.
  • a wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Terminal devices can be stationary or mobile.
  • the electronic device in this embodiment of the present application may also be a server.
  • the electronic device can receive an image collected by the terminal device, and determine a target quadrilateral in the image.
  • FIG. 2 is a schematic structural diagram of an electronic device 200 according to an embodiment of the present application.
  • the electronic device 200 includes: an image acquisition unit 210 , an image recognition unit 220 and an image processing unit 230 , and the image processing unit 230 includes at least a reliability calculation subunit 231 .
  • the image acquisition unit 210 is used for acquiring the image to be recognized, and the image should contain a document class object.
  • an image collected by an image collection device, or an image transmitted by other devices, or an image input by a user may be received, which is not limited in this embodiment of the present application.
  • the image recognition unit 220 receives the image to be recognized sent by the image acquisition unit 210, and recognizes at least one quadrilateral in the image. Combining with FIG. 1, the quadrilateral 102 and the quadrilateral 103 can be obtained. Sent to the image processing unit 230.
  • the image processing unit 230 receives at least one quadrilateral sent by the image recognition unit 220, and determines the reliability of each quadrilateral through the reliability calculation subunit 231. Taking the example shown in FIG. 1, the reliability of the quadrilateral 102 is higher than that of the quadrilateral. 103 credibility.
  • the image processing unit 230 determines a quadrilateral with the highest reliability as the target quadrilateral, or after determining the reliability ranking, selects n quadrilaterals from the highest reliability as the target quadrilateral. The target quad.
  • the image processing unit 230 performs subsequent operations according to the determined at least one target quadrilateral.
  • at least one target quadrilateral is sent to the image display unit (not shown in the figure) for display, and the user can determine the recognition effect of the quadrilateral recognition by the electronic device according to the displayed at least one target quadrilateral, or make the user through the human-computer interaction interface Selecting a target quadrilateral as the final target quadrilateral; or, determining a transformation matrix according to at least one target quadrilateral, and performing perspective transformation on the image according to the transformation matrix.
  • the image The processing unit 230 selects a final target quadrilateral from the two or more target quadrilaterals, or obtains the final target quadrilateral by performing a weighted average on the two or more target quadrilaterals.
  • FIG. 3 is a schematic flowchart of an image processing method 300 according to an embodiment of the present application.
  • the embodiment of the present application confirms the reliability of the quadrilateral as the target area, and obtains the target quadrilateral according to the reliability.
  • the image processing method includes:
  • the electronic device may capture an image of the target object through an image capturing device to obtain an image to be recognized, or may receive an image input by a user, or an image sent by other devices.
  • the image may be preprocessed.
  • RGB images that is, color images formed by changing the three color channels of red R (Red), green G (Green), and blue B (Blue) and superimposing each other.
  • RGB images can be converted into color space in advance, such as converting to grayscale images or HSI images. ) and the brightness I (Intensity) to characterize the image.
  • the preprocessing of the image to be identified further includes: performing edge detection on the image by any algorithm, such as the Canny algorithm and the Holistically-Nested Edge Detection (HED) algorithm.
  • edge detection on the image by any algorithm, such as the Canny algorithm and the Holistically-Nested Edge Detection (HED) algorithm.
  • HED Holistically-Nested Edge Detection
  • the preprocessing of the image to be recognized further includes: scaling the image to a preset size.
  • S302 Identify at least one quadrilateral in the image to obtain coordinate information of each quadrilateral.
  • the coordinate information of the quadrilateral includes coordinates of four vertices of the quadrilateral.
  • identifying a quadrilateral in an image first identify multiple line segments in the image, combine every four line segments in the multiple line segments into a candidate graphic, obtain all possible candidate graphics, and then analyze each candidate graphic. Whether the figure is a quadrilateral to be identified.
  • FIG. 4 is a schematic diagram of an image to be recognized 400 according to an embodiment of the present application. Exemplarily, this embodiment determines whether the candidate graphic satisfies the first preset condition, and when the candidate graphic satisfies the first preset condition, the candidate graphic is the quadrilateral to be identified, and specifically includes the following possible implementations:
  • the first preset condition is that the two first included angles of the candidate graphics are both smaller than the first preset value, and the first included angle is the included angle of any two non-adjacent line segments among the four line segments.
  • the candidate graphics is the quadrilateral to be identified. It should be understood that the first included angle is the included angle of the two included angles of the two line segments that is less than 90 degrees.
  • the candidate graphic is a candidate graphic composed of line segments AB, BC, CD and AD
  • the first preset value is 30 degrees.
  • the first preset condition is that the four second included angles of the candidate graphics are all greater than the second preset value, and the second included angle is the included angle of any two adjacent line segments among the four line segments.
  • the first preset condition may be that the four second included angles of the candidate graphics are all smaller than the difference between 180 degrees and the second preset value.
  • the candidate graph is a candidate graph composed of line segments AB, BC, CD and AD
  • the second preset value is 60 degrees, and it is determined whether ⁇ A, ⁇ B, ⁇ C, and ⁇ D are all greater than 60 degrees, that is, whether ⁇ A, ⁇ B, ⁇ C, and ⁇ D are all less than 120 degrees.
  • the candidate figure is the quadrilateral to be identified.
  • the first preset condition is that the area ratio of the candidate graphic is greater than the fourth preset value, and the area ratio is the ratio of the area of the candidate graphic to the area of the image.
  • the fourth preset value is one sixth.
  • the first preset condition may also be any two or a combination of the above three examples.
  • the candidate graphics when the two first included angles of the candidate graphics are both smaller than the first preset value, and the four second included angles of the candidate graphics are all greater than the second preset value, the candidate graphics is the quadrilateral to be identified; or the candidate graphics When the two first included angles of the candidate graphics are less than the first preset value, and the four second included angles of the candidate graphics are all greater than the second preset value, and the area ratio of the candidate graphics is greater than the fourth preset value, the candidate graphics is the quadrilateral to be identified.
  • a candidate graph composed of four unclosed line segments such as the candidate graph in the upper left corner of the quadrilateral ABCD in Figure 4
  • determine the distance between the endpoints of the two unclosed line segments (the endpoint V and the endpoint W in Figure 4) Whether it is less than the preset distance, when the distance between the endpoints of the two line segments is less than the preset distance, determine whether the candidate graphic is a quadrilateral to be identified according to any of the above-mentioned embodiments, otherwise it is determined that the candidate graphic is not a quadrilateral to be identified .
  • the coordinates of the four vertices of the quadrilateral that is, the coordinates of the four points A, B, C, and D in FIG. 4 are determined.
  • the quadrilateral obtained after screening through any of the above examples is closer to the target quadrilateral to be obtained, which reduces the scope for subsequent determination of the target quadrilateral and improves the processing efficiency.
  • the identified line segments may be optimized.
  • the at least two line segments on the same straight line are merged.
  • the line segments on the same straight line that satisfy the above three possible positional relationships are merged.
  • Line segments with four preset values can be merged by translating one line segment to connect with another line segment, or supplementing the position between the line segments.
  • the credibility is used to characterize the evaluation result of the quadrilateral as the target area
  • the target area is used to characterize the shape of the target object in the image.
  • an evaluation is performed based on whether the quadrilateral can be used as the target area, so as to obtain the credibility of the quadrilateral.
  • at least one feature of the quadrilateral can be determined according to the coordinate information of the quadrilateral, and based on the at least one feature of the quadrilateral, the score of the quadrilateral as the target area is determined by Gaussian operation, that is, the credibility of the quadrilateral is obtained.
  • the feature of the quadrilateral includes at least one of an area ratio feature, a first vertical angle feature, a second vertical angle feature, an adjacent angle feature, or a middle position feature.
  • the area ratio feature is used to characterize the ratio of the area of the quadrilateral to the image area
  • the first vertical angle feature is used to characterize the angle between the midline of the quadrilateral and the vertical line of the image
  • the second vertical angle feature is used to characterize the midline of the quadrilateral
  • the adjacent angle feature is used to characterize the angular relationship of the adjacent corners of the quadrilateral
  • the middle position feature is used to characterize the coordinates of the middle position of the quadrilateral.
  • the Gaussian function used in the Gaussian operation includes three preset parameters: weight, average and variance.
  • the average value is used to represent the expected eigenvalue of the corresponding feature, and the closer the eigenvalue is to the average value, the higher the calculated reliability. For example, when the ratio of the quadrilateral area to the image area is 0.8, which is most likely the target area, the average value is preset to 0.8.
  • S304 Determine at least one target quadrilateral according to the reliability of each quadrilateral.
  • the at least one identified quadrilateral is screened according to the reliability of the quadrilateral to obtain at least one target quadrilateral.
  • Possible implementation manner 1 Sort at least one quadrilateral according to the reliability of each quadrilateral, and use the n quadrilaterals with the highest reliability as at least one target quadrilateral, where n ⁇ 1, it should be understood that n
  • the credibility of the quads can be the same or different, and the credibility of n quads is higher than the credibility of other quads that are not selected as target quads.
  • Possible implementation manner 2 Determine whether the reliability of each quadrilateral in the at least one quadrilateral is greater than a preset threshold, and determine the quadrilateral whose reliability is greater than the preset threshold as the target quadrilateral.
  • the coordinate information of each quadrilateral is obtained, so as to realize the preliminary screening of the quadrilateral; and based on the coordinate information of each quadrilateral, through Gaussian operation, the quadrilateral is obtained as the target area
  • the reliability of the quadrilateral that is close to the target quadrilateral can be higher; and then one or more quadrilaterals with the highest reliability are selected as the target quadrilateral.
  • the embodiment of the present application can accurately identify the target quadrilateral that can represent the shape of the target object, which provides a basis for the subsequent correction of the shape of the target object to obtain a better presentation effect.
  • the embodiment of the present application may perform reliability evaluation for each feature of the quadrilateral, and obtain the reliability corresponding to each feature. The reliability of each feature is summed to obtain the reliability of the quadrilateral.
  • FIG. 5 is a schematic flowchart of an image processing method 500 according to an embodiment of the present application.
  • the reliability corresponding to each feature is obtained respectively.
  • the reliability g corresponding to each feature is summed to obtain the reliability c of the quadrilateral.
  • the preset parameter corresponding to the area ratio feature in this embodiment is called the first preset parameter
  • the preset parameter corresponding to the first vertical angle feature is called the second preset parameter
  • the preset parameter corresponding to the first vertical angle feature is called the second preset parameter
  • the preset parameter corresponding to the adjacent angle feature is called the third preset parameter
  • the preset parameter corresponding to the middle position feature is called the fourth preset parameter.
  • FIG. 6 is a schematic diagram of an image to be recognized 600 according to an embodiment of the present application.
  • the reliability g 1 corresponding to the area ratio feature wherein ⁇ 1 , ⁇ 1 and ⁇ 1 are the first preset parameters corresponding to the area ratio feature, and ⁇ 1 is used to characterize the reliability g 1 corresponding to the area ratio feature
  • the weight of , ⁇ 1 is the average value used to characterize the expected value of the area ratio, and ⁇ 1 is the variance.
  • calculate the credibility g 2 corresponding to the first vertical angle feature according to the coordinate information of the quadrilateral, determine the vectors of the two center lines of the quadrilateral, and determine the angle between the vector of each center line and the vertical line, respectively, and The smallest included angle among the two included angles is used as the eigenvalue of the first vertical angle feature.
  • the midline of the quadrilateral is the opposite side of the quadrilateral, that is, the connecting line between the midpoints of two non-adjacent sidelines
  • the vertical line is the straight line perpendicular to the horizontal sideline of the image
  • the horizontal sideline refers to the image when the image is placed in the positive direction. , the edge in the horizontal direction.
  • N is the midpoint of the line segment AB
  • M is the midpoint of the line segment CD
  • P is the midpoint of the line segment BC
  • Q is the midpoint of the line segment AD
  • the two midlines of the quadrilateral ABCD are MN and PQ respectively
  • the vector MN can be obtained by Obtained
  • the reliability g 2 corresponding to the first vertical angle feature wherein ⁇ 2 , ⁇ 2 and ⁇ 2 are the second preset parameters corresponding to the first vertical angle feature, and ⁇ 2 is used to represent the first vertical angle feature corresponding to
  • the weight of the reliability g 2 ⁇ 2 is the average value used to characterize the expected value of the first vertical angle, and ⁇ 2 is the variance.
  • the reliability g 3 corresponding to the adjacent angle feature wherein ⁇ 3 , ⁇ 3 and ⁇ 3 are the third preset parameters corresponding to the adjacent angle feature, and ⁇ 3 is used to represent the reliability corresponding to the vector angle feature
  • the weight of g 3 , ⁇ 3 is the average value used to characterize the expected value of adjacent angles, and ⁇ 3 is the variance.
  • calculate the reliability g 4 corresponding to the feature of the middle position according to the coordinate information of the quadrilateral, determine the coordinates of the middle position of the quadrilateral, it should be noted that the coordinates of the middle position are the average value of the coordinates of the four vertices of the quadrilateral , combined with Figure 6, the eigenvalues of the middle position feature, that is, the coordinates of the middle position of the quadrilateral
  • the reliability g 4 corresponding to the middle position feature wherein ⁇ 4 , ⁇ 4 and ⁇ 4 are the fourth preset parameters corresponding to the middle position feature, and ⁇ 4 is used to represent the reliability g 4 corresponding to the vector angle feature
  • the weight of , ⁇ 4 is the average value used to characterize the expected value of the middle position, and ⁇ 4 is the variance.
  • the calculation of the reliability in any of the foregoing embodiments may also be combined with the reliability of the second vertical angle feature.
  • the reliability g 5 corresponding to the second vertical angle feature wherein ⁇ 5 , ⁇ 5 and ⁇ 5 are preset parameters corresponding to the second vertical angle feature, also referred to as fifth preset parameters, and ⁇ 5 is used to represent The weight of the reliability g 5 corresponding to the vector angle feature, ⁇ 5 is the average value used to represent the expected value of the middle position, and ⁇ 5 is the variance.
  • FIG. 7 is a schematic flowchart of an image processing method 700 according to an embodiment of the present application.
  • the shooting scene of the image can reflect the type and characteristics of the target object to a certain extent. Then, setting different parameters for the Gaussian function for different shooting scenes can improve the accuracy of quadrilateral recognition.
  • the distance of the user viewing the painting is relatively short, so the area ratio of the captured target object in the image is larger, and the painting is generally in a hanging state, so the captured target object is generally presented in the image as Trapezoid, according to which the preset parameters corresponding to the area ratio feature and the preset parameters corresponding to the first vertical angle feature are set.
  • the shooting scene includes but is not limited to: any one of an art gallery, an office building, and a school.
  • the positioning information when the image is captured is first, and the shooting scene of the image is determined according to the positioning information, for example, the shooting scene is predicted according to the positioning information and the preset map information, and then the shooting scene is determined according to the determined shooting scene and the preset shooting scene.
  • the corresponding relationship with the parameter group determine the parameter group corresponding to the predicted shooting scene, the parameter group includes the preset parameters corresponding to one or more features in any of the above-mentioned embodiments, and then calculate the quadrilateral based on the determined parameter group. reliability.
  • the positioning information of the electronic device is obtained through any positioning technology, for example, the positioning information of the electronic device is obtained through a global positioning system (Global Positioning System, GPS).
  • a global positioning system Global Positioning System, GPS
  • the embodiment of the present application can determine the shooting scene according to the user's intention, for example, receive the shooting scene selected by the user through the human-computer interaction interface, and then determine the corresponding parameter group according to the shooting scene.
  • a setting instruction input by the user may be received, where the setting instruction includes a parameter group identifier, and the corresponding parameter group is determined according to the parameter group identifier indicated by the setting instruction.
  • FIG. 8 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application.
  • the image processing device 10 includes:
  • an image acquisition unit 11 for acquiring an image to be identified, the image including a target object
  • the image recognition unit 12 is used to recognize at least one quadrilateral in the image, and obtain coordinate information of each quadrilateral;
  • the image processing unit 13 is used for each quadrilateral, according to the coordinate information of the quadrilateral, through Gaussian operation, calculates the credibility of the quadrilateral, the credibility is used to characterize the quadrilateral as the evaluation result of the target area, and the target area is used to represent the target. the shape of the object in the image;
  • the image processing unit 13 is further configured to determine at least one target quadrilateral according to the reliability of each quadrilateral.
  • the image processing device 10 in the embodiment of the present application includes an image acquisition unit 11 and an image recognition unit 12, and by identifying at least one quadrilateral in the image, the coordinate information of each quadrilateral is obtained, and the preliminary screening of the quadrilateral is realized; and based on The coordinate information of each quadrilateral is obtained through Gaussian operation to obtain the credibility of the quadrilateral as the target area.
  • the embodiment of the present application can accurately identify the target quadrilateral that can represent the shape of the target object, which provides a basis for the subsequent correction of the shape of the target object to obtain a better presentation effect.
  • the image processing unit 13 is specifically used for:
  • the reliability of the feature is determined according to the coordinate information of the quadrilateral and the Gaussian function corresponding to the feature, and the quadrilateral includes at least one feature;
  • the image processing unit 13 is specifically used for:
  • the reliability of the feature is obtained, and the Gaussian function includes preset parameters corresponding to the feature.
  • the image processing unit 13 is specifically used for:
  • the ratio of the area of the quadrilateral to the area of the image is taken as the eigenvalue of the feature.
  • the image processing unit 13 is specifically used for:
  • the image processing unit 13 is specifically used for:
  • the image processing unit 13 is specifically used for:
  • the coordinate information of the quadrilateral determine the coordinates of the middle position of the quadrilateral, and use the coordinates of the middle position as the feature value of the feature; the coordinates of the middle position are the average of the coordinates of the four vertices of the quadrilateral, and the coordinate information includes the coordinates of the four vertices .
  • the preset parameters include weight, mean and variance.
  • the image processing unit 13 is specifically used for:
  • Obtain pose information which is used to characterize the position and/or attitude of the electronic device when the image is collected;
  • the eigenvalues of the features are determined.
  • the image processing unit 13 is specifically used for:
  • the projected gravity vector is determined, and the projected gravity vector is used to represent the projection of the gravity vector in the world coordinate system in the coordinate system where the image is located;
  • the data processing apparatus provided in the foregoing embodiments may execute the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and are not repeated here.
  • FIG. 9 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application.
  • the image processing device 10 further includes:
  • a position obtaining unit 14 used for obtaining positioning information, the positioning information is used to represent the position of the electronic device when the image is collected;
  • the parameter determination unit 15 is used to determine the shooting scene of the image according to the positioning information
  • the parameter determination unit 15 is further configured to determine a corresponding parameter group according to the shooting scene, where the parameter group includes preset parameters corresponding to at least one feature.
  • the data processing apparatus provided in the foregoing embodiments may execute the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and are not repeated here.
  • FIG. 10 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application.
  • the image processing apparatus 10 further includes: a receiving unit 16;
  • the receiving unit 16 is configured to receive the shooting scene input by the user
  • the parameter determination unit 15 is further configured to determine a corresponding parameter group according to the shooting scene, where the parameter group includes preset parameters corresponding to at least one feature.
  • the image recognition unit 12 is specifically used for:
  • each candidate graphic when the candidate graphic meets the first preset condition, it is determined that the candidate graphic is a quadrilateral, and coordinate information of the quadrilateral is obtained.
  • the first preset condition includes at least one of the following:
  • the two first included angles of the candidate graphics are both smaller than the first preset value, and the first included angle is the included angle of any two non-adjacent line segments in the four line segments;
  • the four second included angles of the candidate graphics are all greater than the second preset value, and the second included angle is the included angle of any two adjacent line segments in the four line segments;
  • the area ratio of the candidate graphic is greater than the third preset value, and the area ratio is the ratio of the area of the candidate graphic to the area of the image.
  • the image recognition unit 12 is specifically used for:
  • the image recognition unit 12 is specifically used for:
  • the two line segments are merged.
  • the second preset condition includes:
  • either of the two line segments is covered by the other;
  • the distance between the two line segments is smaller than the fourth preset value.
  • the image processing unit 13 is specifically used for:
  • the quadrilateral is determined as the target quadrilateral.
  • the data processing apparatus provided in the foregoing embodiments may execute the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and are not repeated here.
  • FIG. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device shown in FIG. 11 includes a processor 1210, and the processor 1210 can call and run a computer program from a memory, so as to implement the method in this embodiment of the present application.
  • the electronic device 1200 may further include a memory 1220 .
  • the processor 1210 may call and run a computer program from the memory 1220 to implement the methods in the embodiments of the present application.
  • the memory 1220 may be a separate device independent of the processor 1210, or may be integrated in the processor 1210.
  • the electronic device 1200 may further include a transceiver 1230, and the processor 1210 may control the transceiver 1230 to communicate with other devices, specifically, may send information or data to other devices, or receive other devices Information or data sent by the device.
  • the processor 1210 may control the transceiver 1230 to communicate with other devices, specifically, may send information or data to other devices, or receive other devices Information or data sent by the device.
  • the transceiver 1230 may include a transmitter and a receiver.
  • the transceiver 1230 may further include antennas, and the number of the antennas may be one or more.
  • the electronic device 1200 may implement corresponding processes in each method of the embodiments of the present application, which are not repeated here for brevity.
  • the processor in this embodiment of the present application may be an integrated circuit chip, which has a signal processing capability.
  • each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software.
  • the above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • Volatile memory may be Random Access Memory (RAM), which acts as an external cache.
  • RAM Static RAM
  • DRAM Dynamic RAM
  • SDRAM Synchronous DRAM
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDR SDRAM
  • enhanced SDRAM ESDRAM
  • synchronous link dynamic random access memory Synchlink DRAM, SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • the memory in this embodiment of the present application may also be a static random access memory (static RAM, SRAM), a dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
  • Embodiments of the present application further provide a computer-readable storage medium for storing a computer program.
  • the computer-readable storage medium can be applied to the electronic device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application.
  • the computer program enables the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application.
  • Embodiments of the present application also provide a computer program product, including computer program instructions.
  • the computer program product can be applied to the electronic device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. Repeat.
  • the embodiments of the present application also provide a computer program.
  • the computer program can be applied to the electronic device in the embodiments of the present application.
  • the computer program runs on the computer, the computer executes the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. For the sake of brevity. , and will not be repeated here.
  • the disclosed apparatus, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the above units is only a logical function division.
  • multiple units or components may be combined or may be Integration into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above functions are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .

Abstract

Provided in the embodiments of the present application are an image processing method and apparatus, a device, and a storage medium. The method comprises: acquiring an image to be subjected to identification, the image comprising a target object; identifying at least one quadrangle in the image to obtain coordinate information of each quadrangle; for each quadrangle, calculating a confidence level of the quadrangle according to the coordinate information of the quadrangle and by means of a Gaussian operation, wherein the confidence level is used for representing an assessment result of the quadrangle serving as a target area, and the target area is used for representing the form of the target object in the image; and determining at least one target quadrangle according to the confidence level of each quadrangle. A target quadrangle representing the form of a target object can be accurately identified, thereby providing a foundation for subsequent correction of the form of the target object so as to achieve a better presentation effect.

Description

图像的处理方法、装置、设备以及存储介质Image processing method, device, device and storage medium 技术领域technical field
本申请实施例涉及图像处理技术领域,并且更具体地,涉及图像的处理方法、装置、设备以及存储介质。The embodiments of the present application relate to the technical field of image processing, and more particularly, to an image processing method, apparatus, device, and storage medium.
背景技术Background technique
随着电子化程度的不断加深,用户常需要通过包括手机在内的电子设备针对一些文档类对象进行图像采集。而采集得到的图像因拍摄时电子设备的倾斜导致图像中文档类对象呈现倾斜的视图效果。With the deepening of the degree of electronization, users often need to collect images for some document objects through electronic devices including mobile phones. However, in the captured image, the tilted view effect of the document-type objects in the image is caused by the tilt of the electronic device during shooting.
对此,现有技术常通过识别图像中的目标四边形,并依据目标四边形的坐标信息,对图像进行矫正。In this regard, in the prior art, the image is often corrected by identifying the target quadrilateral in the image and according to the coordinate information of the target quadrilateral.
然而,在图像中包含多个四边形、或者拍摄画面较为模糊的情况下,现有技术无法准确识别目标四边形,导致对所采集的图像进行矫正的效果较差。However, in the case that the image contains multiple quadrilaterals, or the photographed picture is relatively blurred, the existing technology cannot accurately identify the target quadrilateral, resulting in a poor effect of correcting the captured image.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种图像的处理方法、装置、设备以及存储介质。Embodiments of the present application provide an image processing method, apparatus, device, and storage medium.
第一方面,提供了一种图像的处理方法,包括:In a first aspect, an image processing method is provided, including:
获取待识别的图像,该图像包括目标对象;obtaining an image to be identified, the image including the target object;
对该图像中的至少一个四边形进行识别,得到每个四边形的坐标信息;Identify at least one quadrilateral in the image to obtain coordinate information of each quadrilateral;
针对每个四边形,根据四边形的坐标信息,通过高斯函数的运算,计算得到四边形的可信度,可信度用于表征四边形作为目标区域的评估结果,目标区域用于表征目标对象在图像中的形态;For each quadrilateral, according to the coordinate information of the quadrilateral, the reliability of the quadrilateral is calculated through the operation of the Gaussian function. The reliability is used to represent the evaluation result of the quadrilateral as the target area, and the target area is used to represent the target object in the image. form;
根据每个四边形的可信度,确定至少一个目标四边形。Based on the confidence of each quad, at least one target quad is determined.
第二方面,提供了一种图像的处理装置,包括:In a second aspect, an image processing apparatus is provided, including:
图像获取单元,用于获取待识别的图像,该图像包括目标对象;an image acquisition unit for acquiring an image to be identified, the image including a target object;
图像识别单元,用于对该图像中的至少一个四边形进行识别,得到每个四边形的坐标信息;an image recognition unit, used for recognizing at least one quadrilateral in the image to obtain coordinate information of each quadrilateral;
图像处理单元,用于针对每个四边形,根据四边形的坐标信息,通过高斯运算,计算得到四边形的可信度,可信度用于表征四边形作为目标区域的评估结果,目标区域用于表征目标对象在图像中的形态;The image processing unit is used to calculate the reliability of the quadrilateral according to the coordinate information of the quadrilateral through Gaussian operation for each quadrilateral. The reliability is used to characterize the evaluation result of the quadrilateral as the target area, and the target area is used to represent the target object form in the image;
图像处理单元还用于根据每个四边形的可信度,确定至少一个目标四边形。The image processing unit is further configured to determine at least one target quadrilateral according to the reliability of each quadrilateral.
第三方面,提供一种电子设备,包括:处理器和存储器,该存储器用于存储计算机程序,处理器用于调用并运行存储器中存储的计算机程序,执行如第一方面或其各实现方式中的方法。In a third aspect, an electronic device is provided, including: a processor and a memory, where the memory is used for storing a computer program, and the processor is used for calling and running the computer program stored in the memory to execute the first aspect or each of its implementations. method.
第四方面,提供一种计算机可读存储介质,用于存储计算机程序,计算机程序使得计算机执行如第一方面或其各实现方式中的方法。In a fourth aspect, a computer-readable storage medium is provided for storing a computer program, and the computer program causes a computer to execute the method in the first aspect or each of its implementations.
第五方面,提供一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如第一方面或其各实现方式中的方法。In a fifth aspect, there is provided a computer program product comprising computer program instructions that cause a computer to perform a method as in the first aspect or implementations thereof.
第六方面,提供一种计算机程序,计算机程序使得计算机执行如第一方面或其各实现方式中的方法。In a sixth aspect, there is provided a computer program, the computer program causing a computer to perform the method as in the first aspect or implementations thereof.
上述第一方面的技术方案,通过对图像中的至少一个四边形进行识别,得到每个四边形的坐标信息,实现对四边形的初步筛选;并基于每个四边形的坐标信息,通过高斯运算,得到四边形作为目标区域的可信度,通过设置高斯函数中的预设参数,可使趋近于目标四边形的可信度更高;进而选择可信度最高的一个或者多个四边形作为目标四边形。本申请实施例能够准确识别出能够表征目标对象的形态的目标四边形,为后续对目 标对象的形态进行矫正,得到较好的呈现效果提供了基础。According to the technical solution of the first aspect, by identifying at least one quadrilateral in the image, the coordinate information of each quadrilateral is obtained, so as to realize the preliminary screening of the quadrilateral; and based on the coordinate information of each quadrilateral, through Gaussian operation, the quadrilateral is obtained as For the credibility of the target area, by setting the preset parameters in the Gaussian function, the credibility of the quadrilateral approaching the target can be higher; and then one or more quadrilaterals with the highest credibility are selected as the target quadrilateral. The embodiment of the present application can accurately identify the target quadrilateral that can characterize the shape of the target object, which provides a basis for the subsequent correction of the shape of the target object to obtain a better presentation effect.
附图说明Description of drawings
图1为本申请实施例提供的一种图像矫正场景100的流程示意图;FIG. 1 is a schematic flowchart of an image correction scene 100 provided by an embodiment of the present application;
图2为本申请实施例提供的一种电子设备200的框架示意图;FIG. 2 is a schematic frame diagram of an electronic device 200 provided by an embodiment of the present application;
图3为本申请实施例提供的一种图像的处理方法300的流程示意图;FIG. 3 is a schematic flowchart of an image processing method 300 according to an embodiment of the present application;
图4为本申请实施例提供的一种候选图形400的示意图;FIG. 4 is a schematic diagram of a candidate graph 400 provided by an embodiment of the present application;
图5为本申请实施例提供的一种图像的处理方法500的流程示意图;FIG. 5 is a schematic flowchart of an image processing method 500 according to an embodiment of the present application;
图6为本申请实施例提供的一种待识别四边形600的示意图;FIG. 6 is a schematic diagram of a to-be-recognized quadrilateral 600 provided by an embodiment of the present application;
图7为本申请实施例提供的一种图像的处理方法700的流程示意图;FIG. 7 is a schematic flowchart of an image processing method 700 provided by an embodiment of the present application;
图8示出了根据本申请实施例的图像的处理装置的示意性框图;FIG. 8 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application;
图9示出了根据本申请实施例的图像的处理装置的示意性框图;FIG. 9 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application;
图10示出了根据本申请实施例的图像的处理装置的示意性框图;FIG. 10 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application;
图11是本申请实施例提供的一种电子设备示意性结构图。FIG. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。针对本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. With regard to the embodiments in the present application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
目前,用户常通过手机、平板、电脑、可穿戴设备等终端设备替代扫描仪等设备,对文档类对象(同下文中的目标对象)进行图像采集,提高了获取文档类对象的便利性,应理解,文档类对象包括但不限于文档、名片、海报、公告栏、可擦写的白板或黑板等等。因难以控制终端设备与目标对象的相对拍摄角度,文档类对象在所采集的图像中因存在透视变换,其呈现的形态常为倾斜的不规则的四边形,因此需要就文档类对象的倾斜,对图像进行矫正。例如,通过获取图像中与文档类对象相关的目标四边形的倾斜程度,并根据目标四边形的倾斜程度对图像进行矫正。然而,在实际图像采集过程中,若终端设备的图像采集能力较差、周围光线较弱、或者目标对象周围存在较多干扰物等,造成图像中的四边形难以识别,或者难以从识别到的多个四边形中确定目标四边形。At present, users often replace scanners and other devices with terminal devices such as mobile phones, tablets, computers, and wearable devices to capture images of document objects (the same as the target objects below), which improves the convenience of obtaining document objects. It is understood that document class objects include, but are not limited to, documents, business cards, posters, bulletin boards, rewritable whiteboards or blackboards, and the like. Because it is difficult to control the relative shooting angle between the terminal device and the target object, the document-type object is often presented as an inclined irregular quadrilateral due to the perspective transformation in the captured image. image is corrected. For example, by obtaining the inclination degree of the target quadrilateral related to the document class object in the image, and correcting the image according to the inclination degree of the target quadrilateral. However, in the actual image acquisition process, if the image acquisition capability of the terminal device is poor, the surrounding light is weak, or there are many interfering objects around the target object, etc., the quadrilaterals in the image are difficult to identify, or it is difficult to identify the number of polygons. Determine the target quadrilateral from the quadrilaterals.
本申请实施例应用于上述场景中,为了使矫正后的图像具有较好的显示效果,准确获取图像中的目标四边形,结合图1所示,本申请实施例对目标对象进行图像采集后得到的图像101中包括多条线段,通过识别这些线段,得到图像中的四边形,例如,四边形102和四边形103,并通过分析每个四边形作为目标区域的可信度,再基于每个四边形的可信度确定目标四边形为四边形102,应理解目标区域为目标对象在图像中所呈现的形态的边界。本申请实施例实现了正确获取图像中目标四边形的技术效果。The embodiments of the present application are applied to the above scenarios, in order to make the corrected image have a better display effect and accurately obtain the target quadrilateral in the image, with reference to FIG. The image 101 includes a plurality of line segments, and by identifying these line segments, quadrilaterals in the image, such as quadrilaterals 102 and 103, are obtained, and by analyzing the reliability of each quadrilateral as a target area, and then based on the reliability of each quadrilateral It is determined that the target quadrilateral is the quadrilateral 102, and it should be understood that the target area is the boundary of the shape of the target object in the image. The embodiments of the present application achieve the technical effect of correctly acquiring the target quadrilateral in the image.
其中,目标四边形的数量可以为一至多个。例如,在同时对多个目标对象进行图像采集时,应识别得到与每个目标对象对应的目标四边形;或者,针对同一目标对象可确定多个可信度较高的目标四边形,作为示例而非限制性的,可基于多个目标四边形,通过算法筛选,确定出最终的一个目标四边形,或者接收用户从多个目标四边形中选中的一个目标四边形作为最终的一个目标四边形。Wherein, the number of target quadrilaterals may be one to multiple. For example, when collecting images of multiple target objects at the same time, a target quadrilateral corresponding to each target object should be identified; or, for the same target object, multiple target quadrilaterals with high reliability may be determined, as an example instead of Restrictively, a final target quadrilateral may be determined based on a plurality of target quadrilaterals through algorithm screening, or a target quadrilateral selected by the user from the plurality of target quadrilaterals may be received as a final target quadrilateral.
作为一种示例,根据已确定的至少一个目标四边形,得到变换矩阵,并根据变换矩阵对图像进行透视变换,得到如图1所示的变换处理后的图像110,变换处理后的图像110中的规则的四边形112为四边形102变换后的效果,目标对象随着四边形112变换后正面显示于图像110中,具有较好的显示效果。As an example, a transformation matrix is obtained according to the determined at least one target quadrilateral, and perspective transformation is performed on the image according to the transformation matrix to obtain the transformed image 110 shown in FIG. 1 . The regular quadrilateral 112 is the effect after the quadrilateral 102 is transformed, and the target object is displayed in the image 110 in front after the quadrilateral 112 is transformed, which has a better display effect.
本申请实施例的技术方案可以应用于各种电子设备,用于实现对语言算法模型的验证、优化、测试中的至少一种。该电子设备可以是一种终端设备,例如手机(Mobile Phone)、 平板电脑(Pad)、电脑、虚拟现实(Virtual Reality,VR)终端设备、增强现实(Augmented Reality,AR)终端设备、工业控制(industrial control)中的终端设备、无人驾驶(self driving)中的终端设备、远程医疗(remote medical)中的终端设备、智慧城市(smart city)中的终端设备或智慧家庭(smart home)中的终端设备等。本申请实施例中的终端设备还可以是可穿戴设备,可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。终端设备可以是固定的或者移动的。The technical solutions of the embodiments of the present application can be applied to various electronic devices to implement at least one of verification, optimization, and testing of language algorithm models. The electronic device may be a terminal device, such as a mobile phone (Mobile Phone), a tablet computer (Pad), a computer, a virtual reality (Virtual Reality, VR) terminal device, an augmented reality (Augmented Reality, AR) terminal device, an industrial control ( terminal equipment in industrial control, terminal equipment in self driving, terminal equipment in remote medical, terminal equipment in smart city or terminal equipment in smart home terminal equipment, etc. The terminal device in this embodiment of the present application may also be a wearable device, and a wearable device may also be called a wearable smart device, which is a general term for intelligently designing everyday wearable devices and developing wearable devices by applying wearable technology, such as Glasses, gloves, watches, clothing and shoes, etc. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Terminal devices can be stationary or mobile.
示例性的,本申请实施例中的电子设备还可以是一种服务器,当电子设备为服务器时,可接收终端设备采集的图像,并确定该图像中的目标四边形。Exemplarily, the electronic device in this embodiment of the present application may also be a server. When the electronic device is a server, it can receive an image collected by the terminal device, and determine a target quadrilateral in the image.
图2为本申请实施例提供的一种电子设备200的结构示意图。如图2所示,电子设备200包括:图像获取单元210、图像识别单元220和图像处理单元230,图像处理单元230至少包括可信度计算子单元231。FIG. 2 is a schematic structural diagram of an electronic device 200 according to an embodiment of the present application. As shown in FIG. 2 , the electronic device 200 includes: an image acquisition unit 210 , an image recognition unit 220 and an image processing unit 230 , and the image processing unit 230 includes at least a reliability calculation subunit 231 .
其中,图像获取单元210用于获取待识别的图像,该图像应包含文档类对象。示例性的,可接收图像采集装置采集的图像,或者接收其他设备传输的图像,或者接收用户输入的图像,本申请实施例对此不做限制。Wherein, the image acquisition unit 210 is used for acquiring the image to be recognized, and the image should contain a document class object. Exemplarily, an image collected by an image collection device, or an image transmitted by other devices, or an image input by a user may be received, which is not limited in this embodiment of the present application.
图像识别单元220接收图像获取单元210发送的待识别的图像,并对该图像中的至少一个四边形进行识别,结合图1所示,可得到四边形102和四边形103,进一步地,将识别得到的四边形发送至图像处理单元230.The image recognition unit 220 receives the image to be recognized sent by the image acquisition unit 210, and recognizes at least one quadrilateral in the image. Combining with FIG. 1, the quadrilateral 102 and the quadrilateral 103 can be obtained. Sent to the image processing unit 230.
图像处理单元230接收图像识别单元220发送的至少一个四边形,并通过可信度计算子单元231确定每个四边形的可信度,以图1所示为例,四边形102的可信度高于四边形103的可信度。The image processing unit 230 receives at least one quadrilateral sent by the image recognition unit 220, and determines the reliability of each quadrilateral through the reliability calculation subunit 231. Taking the example shown in FIG. 1, the reliability of the quadrilateral 102 is higher than that of the quadrilateral. 103 credibility.
进一步地,图像处理单元230根据每个四边形的可信度,确定出可信度最高的一个四边形作为目标四边形,或者确定出可信度排序后,由可信度最高的开始选择n个四边形作为目标四边形。Further, according to the reliability of each quadrilateral, the image processing unit 230 determines a quadrilateral with the highest reliability as the target quadrilateral, or after determining the reliability ranking, selects n quadrilaterals from the highest reliability as the target quadrilateral. The target quad.
作为一种示例,图像处理单元230根据确定的至少一个目标四边形进行后续操作。例如,将至少一个目标四边形发送至图像显示单元(图中未示出)进行显示,用户可根据所显示的至少一个目标四边形确定电子设备对四边形识别的识别效果,或使用户通过人机交互界面选择一个目标四边形作为最终的目标四边形;或者,根据至少一个目标四边形,确定变换矩阵,并根据变换矩阵对图像进行透视变换,示例性的,目标四边形的数量为两个或两个以上时,图像处理单元230从两个或两个以上的目标四边形中选择一个最终的目标四边形,或者通过对两个或两个以上的目标四边形进行加权平均,得到最终的目标四边形。As an example, the image processing unit 230 performs subsequent operations according to the determined at least one target quadrilateral. For example, at least one target quadrilateral is sent to the image display unit (not shown in the figure) for display, and the user can determine the recognition effect of the quadrilateral recognition by the electronic device according to the displayed at least one target quadrilateral, or make the user through the human-computer interaction interface Selecting a target quadrilateral as the final target quadrilateral; or, determining a transformation matrix according to at least one target quadrilateral, and performing perspective transformation on the image according to the transformation matrix. Exemplarily, when the number of target quadrilaterals is two or more, the image The processing unit 230 selects a final target quadrilateral from the two or more target quadrilaterals, or obtains the final target quadrilateral by performing a weighted average on the two or more target quadrilaterals.
下面通过几个实施例对本申请进行具体说明。The present application will be specifically described below through several embodiments.
图3为本申请实施例提供的一种图像的处理方法300的流程示意图。FIG. 3 is a schematic flowchart of an image processing method 300 according to an embodiment of the present application.
为了确保得到与目标对象的倾斜程度,最为贴近的四边形,本申请实施例对四边形作为目标区域的可信度进行确认,并根据该可信度得到目标四边形。In order to ensure that a quadrilateral closest to the inclination degree of the target object is obtained, the embodiment of the present application confirms the reliability of the quadrilateral as the target area, and obtains the target quadrilateral according to the reliability.
如图3所示,该图像的处理方法包括:As shown in Figure 3, the image processing method includes:
S301:获取待识别的图像。S301: Acquire an image to be recognized.
应理解,电子设备可通过图像采集装置对目标对象进行图像采集,得到待识别的图像,或者可以接收用户输入的图像,或者接收其他设备发送的图像。It should be understood that the electronic device may capture an image of the target object through an image capturing device to obtain an image to be recognized, or may receive an image input by a user, or an image sent by other devices.
示例性的,在获取待识别的图像后,为了便于后续的识别操作,可对该图像进行预处理。Exemplarily, after acquiring the image to be recognized, in order to facilitate subsequent recognition operations, the image may be preprocessed.
例如,对该图像进行颜色空间的转换。图像采集装置采集的图像多为RGB图像,即通过对红R(Red)、绿G(Green)、蓝B(Blue)三个颜色通道的变化以及相互叠加形成的彩色图像。为了便于后续对图像的识别操作,提高处理效率,可预先对RGB图像进 行颜色空间的转换,例如转换为灰度图像或HSI图像等,HSI图像为通过色调H(Hue)、饱和度S(Saturation)和亮度I(Intensity)来表征的图像。For example, perform a color space conversion on the image. The images collected by the image acquisition device are mostly RGB images, that is, color images formed by changing the three color channels of red R (Red), green G (Green), and blue B (Blue) and superimposing each other. In order to facilitate subsequent image recognition operations and improve processing efficiency, RGB images can be converted into color space in advance, such as converting to grayscale images or HSI images. ) and the brightness I (Intensity) to characterize the image.
可选的,对待识别的图像进行预处理还包括:通过任一算法对图像进行边缘检测,例如Canny算法、整体嵌套的边缘检测(Holistically-Nested Edge Detection,HED)算法。Optionally, the preprocessing of the image to be identified further includes: performing edge detection on the image by any algorithm, such as the Canny algorithm and the Holistically-Nested Edge Detection (HED) algorithm.
可选的,对待识别的图像进行预处理还包括:将图像缩放至预设大小。Optionally, the preprocessing of the image to be recognized further includes: scaling the image to a preset size.
应理解,本实施例对上述任一预处理过程的执行顺序不做限制。It should be understood that this embodiment does not limit the execution order of any of the foregoing preprocessing processes.
S302:对图像中的至少一个四边形进行识别,得到每个四边形的坐标信息。S302: Identify at least one quadrilateral in the image to obtain coordinate information of each quadrilateral.
其中,四边形的坐标信息包括四边形的四个顶点坐标。The coordinate information of the quadrilateral includes coordinates of four vertices of the quadrilateral.
示例性的,在识别图像中的四边形的过程中,先识别图像中的多条线段,将多条线段中的每四条线段组合为一个候选图形,得到所有可能的候选图形,再分析每个候选图形是否为所需识别的四边形。Exemplarily, in the process of identifying a quadrilateral in an image, first identify multiple line segments in the image, combine every four line segments in the multiple line segments into a candidate graphic, obtain all possible candidate graphics, and then analyze each candidate graphic. Whether the figure is a quadrilateral to be identified.
图4为本申请实施例提供的一种待识别的图像400的示意图。示例性的,本实施例对确定候选图形是否满足第一预设条件,在候选图形满足第一预设条件时,该候选图形为所需识别的四边形,具体包括以下可能的实现方式:FIG. 4 is a schematic diagram of an image to be recognized 400 according to an embodiment of the present application. Exemplarily, this embodiment determines whether the candidate graphic satisfies the first preset condition, and when the candidate graphic satisfies the first preset condition, the candidate graphic is the quadrilateral to be identified, and specifically includes the following possible implementations:
一、第一预设条件为候选图形的两个第一夹角均小于第一预设值,该第一夹角为四条线段中任意两条不相邻的线段的夹角。1. The first preset condition is that the two first included angles of the candidate graphics are both smaller than the first preset value, and the first included angle is the included angle of any two non-adjacent line segments among the four line segments.
确定候选图形的两个第一夹角是否小于第一预设值,若两个第一夹角均小于第一预设值,则该候选图形为所需识别的四边形。应理解,第一夹角为两条线段的两个夹角中小于90度的夹角。It is determined whether the two first included angles of the candidate graphics are smaller than the first preset value, and if both of the two first included angles are smaller than the first preset value, the candidate graphics is the quadrilateral to be identified. It should be understood that the first included angle is the included angle of the two included angles of the two line segments that is less than 90 degrees.
结合图4所示,假设候选图形为线段AB、BC、CD和AD组成的候选图形,则确定线段AB和线段CD的夹角是否小于第一预设值,以及线段AD和线段BC的夹角是否小于第一预设值,若线段AB和线段CD的夹角,以及线段AD和线段BC的夹角均小于第一预设值,则该候选图形为所需识别的四边形。As shown in FIG. 4 , assuming that the candidate graphic is a candidate graphic composed of line segments AB, BC, CD and AD, then determine whether the angle between the line segment AB and the line segment CD is less than the first preset value, and the angle between the line segment AD and the line segment BC is determined. Whether it is smaller than the first preset value, if the included angle between line segment AB and line segment CD, and the included angle between line segment AD and line segment BC are all smaller than the first preset value, the candidate graphic is the quadrilateral to be identified.
可选的,第一预设值为30度。Optionally, the first preset value is 30 degrees.
二、第一预设条件为候选图形的四个第二夹角均大于第二预设值,该第二夹角为四条线段中任意两条相邻线段的夹角。可选的,第一预设条件可以为候选图形的四个第二夹角均小于180度与第二预设值的差值。2. The first preset condition is that the four second included angles of the candidate graphics are all greater than the second preset value, and the second included angle is the included angle of any two adjacent line segments among the four line segments. Optionally, the first preset condition may be that the four second included angles of the candidate graphics are all smaller than the difference between 180 degrees and the second preset value.
结合图4所示,假设候选图形为线段AB、BC、CD和AD组成的候选图形,则确定∠A、∠B、∠C和∠D是否均大于第二预设值。示例性的,第二预设值为60度,确定∠A、∠B、∠C和∠D是否均大于60度,即确定∠A、∠B、∠C和∠D是否均小于120度。As shown in FIG. 4 , assuming that the candidate graph is a candidate graph composed of line segments AB, BC, CD and AD, it is determined whether ∠A, ∠B, ∠C and ∠D are all greater than the second preset value. Exemplarily, the second preset value is 60 degrees, and it is determined whether ∠A, ∠B, ∠C, and ∠D are all greater than 60 degrees, that is, whether ∠A, ∠B, ∠C, and ∠D are all less than 120 degrees.
在∠A、∠B、∠C和∠D均大于第二预设值时,该候选图形为所需识别的四边形。When ∠A, ∠B, ∠C and ∠D are all greater than the second preset value, the candidate figure is the quadrilateral to be identified.
三、第一预设条件为候选图形的面积比例大于第四预设值,该面积比例为候选图形的面积与图像的面积的比值。3. The first preset condition is that the area ratio of the candidate graphic is greater than the fourth preset value, and the area ratio is the ratio of the area of the candidate graphic to the area of the image.
可选的,第四预设值为六分之一。Optionally, the fourth preset value is one sixth.
示例性的,第一预设条件还可以为以上三种示例中的任意两种或者三种的组合。例如候选图形的两个第一夹角均小于第一预设值,且候选图形的四个第二夹角均大于第二预设值时,该候选图形为所需识别的四边形;或者候选图形的两个第一夹角均小于第一预设值,且候选图形的四个第二夹角均大于第二预设值,且候选图形的面积比例大于第四预设值时,该候选图形为所需识别的四边形。Exemplarily, the first preset condition may also be any two or a combination of the above three examples. For example, when the two first included angles of the candidate graphics are both smaller than the first preset value, and the four second included angles of the candidate graphics are all greater than the second preset value, the candidate graphics is the quadrilateral to be identified; or the candidate graphics When the two first included angles of the candidate graphics are less than the first preset value, and the four second included angles of the candidate graphics are all greater than the second preset value, and the area ratio of the candidate graphics is greater than the fourth preset value, the candidate graphics is the quadrilateral to be identified.
可选的,对于未闭合的四条线段组成的候选图形,例如图4中四边形ABCD左上角的候选图形,确定未闭合处两条线段的端点(如图4中的端点V和端点W)的距离是否小于预设距离,在两条线段的端点的距离小于预设距离时,根据上述任一实施例确定该候选图形是否为所需识别的四边形,否则确定该候选图形不为所需识别的四边形。Optionally, for a candidate graph composed of four unclosed line segments, such as the candidate graph in the upper left corner of the quadrilateral ABCD in Figure 4, determine the distance between the endpoints of the two unclosed line segments (the endpoint V and the endpoint W in Figure 4) Whether it is less than the preset distance, when the distance between the endpoints of the two line segments is less than the preset distance, determine whether the candidate graphic is a quadrilateral to be identified according to any of the above-mentioned embodiments, otherwise it is determined that the candidate graphic is not a quadrilateral to be identified .
示例性的,在确定候选图形为所需识别的四边形后,确定该四边形的四个顶点的坐标,即图4中A、B、C、D四个点的坐标。Exemplarily, after determining that the candidate figure is the quadrilateral to be identified, the coordinates of the four vertices of the quadrilateral, that is, the coordinates of the four points A, B, C, and D in FIG. 4 are determined.
通过上述任一示例筛选后得到的四边形,更接近所要获取的目标四边形,为后续确定目标四边形缩小了范围,提高了处理效率。The quadrilateral obtained after screening through any of the above examples is closer to the target quadrilateral to be obtained, which reduces the scope for subsequent determination of the target quadrilateral and improves the processing efficiency.
作为一种示例,为了避免噪声等的干扰,在上述实施例将多条线段中的每四条线段进行组合,得到至少一个候选图形之前,可对识别得到的线段进行优化。As an example, in order to avoid interference such as noise, before each four line segments of the plurality of line segments are combined to obtain at least one candidate graphic in the above embodiment, the identified line segments may be optimized.
示例性的,确定识别得到的多条线段中是否有处于同一直线的至少两条线段,对处于同一直线上的至少两条线段进行合并。可选的,通过每条线段的坐标信息,能够识别处于同一直线上的至少两条线段存在以下几种可能的位置关系,一、存在部分重叠,二、一条线段被另一条线段覆盖,三、线段之间分离且距离小于第四预设值,该距离为两条线段最相近的端点之间的距离。本申请实施例将处于同一直线上的满足上述三种可能的位置关系的线段进行合并,例如,将部分重叠的线段中重叠部分进行融合,将被其他线段覆盖的线段删除,将线段距离小于第四预设值的线段,通过平移一条线段与另一条线段连接,或者补充线段之间的位置,实现线段的合并。Exemplarily, it is determined whether there are at least two line segments on the same straight line among the identified multiple line segments, and the at least two line segments on the same straight line are merged. Optionally, through the coordinate information of each line segment, it can be identified that at least two line segments on the same straight line have the following possible positional relationships: 1. There is partial overlap, 2. One line segment is covered by another line segment, 3. The line segments are separated and the distance is less than the fourth preset value, and the distance is the distance between the closest endpoints of the two line segments. In this embodiment of the present application, the line segments on the same straight line that satisfy the above three possible positional relationships are merged. For example, the overlapping parts of the partially overlapping line segments are merged, the line segments covered by other line segments are deleted, and the line segment distance is smaller than the third line segment. Line segments with four preset values can be merged by translating one line segment to connect with another line segment, or supplementing the position between the line segments.
S303:针对每个四边形,根据四边形的坐标信息,通过高斯运算,计算得到四边形的可信度。S303: For each quadrilateral, according to the coordinate information of the quadrilateral, the reliability of the quadrilateral is obtained by calculating the Gaussian operation.
其中,可信度用于表征四边形作为目标区域的评估结果,目标区域用于表征目标对象在图像中的形态。Among them, the credibility is used to characterize the evaluation result of the quadrilateral as the target area, and the target area is used to characterize the shape of the target object in the image.
在本步骤中,基于四边形是否能够作为目标区域进行评估,以得到四边形的可信度。示例性的,可根据四边形的坐标信息,确定四边形的至少一个特征,并基于四边形的至少一个特征,通过高斯运算确定四边形作为目标区域的评分,即得到四边形的可信度。In this step, an evaluation is performed based on whether the quadrilateral can be used as the target area, so as to obtain the credibility of the quadrilateral. Exemplarily, at least one feature of the quadrilateral can be determined according to the coordinate information of the quadrilateral, and based on the at least one feature of the quadrilateral, the score of the quadrilateral as the target area is determined by Gaussian operation, that is, the credibility of the quadrilateral is obtained.
可选的,四边形的特征包括面积比例特征、第一垂直角度特征、第二垂直角度特征、相邻角度特征或中间位置特征中的至少一种。其中,面积比例特征用于表征四边形的面积与图像面积的比例;第一垂直角度特征用于表征四边形的中线与图像的垂直线之间的夹角;第二垂直角度特征用于表征四边形的中线与图像中的投影重力向量的夹角;相邻角度特征用于表征四边形的相邻角的角度关系;中间位置特征用于表征四边形的中间位置的坐标。Optionally, the feature of the quadrilateral includes at least one of an area ratio feature, a first vertical angle feature, a second vertical angle feature, an adjacent angle feature, or a middle position feature. Among them, the area ratio feature is used to characterize the ratio of the area of the quadrilateral to the image area; the first vertical angle feature is used to characterize the angle between the midline of the quadrilateral and the vertical line of the image; the second vertical angle feature is used to characterize the midline of the quadrilateral The included angle with the projected gravity vector in the image; the adjacent angle feature is used to characterize the angular relationship of the adjacent corners of the quadrilateral; the middle position feature is used to characterize the coordinates of the middle position of the quadrilateral.
应理解,高斯运算的过程中采用的高斯函数包含三个预设参数:权重、平均值和方差。其中平均值用于表征期望对应的特征达到的特征值,特征值越趋近于该平均值,则计算得到的可信度越高。例如,四边形的面积与图像面积的比例在0.8时,最可能是目标区域,则将平均值预设为0.8。It should be understood that the Gaussian function used in the Gaussian operation includes three preset parameters: weight, average and variance. The average value is used to represent the expected eigenvalue of the corresponding feature, and the closer the eigenvalue is to the average value, the higher the calculated reliability. For example, when the ratio of the quadrilateral area to the image area is 0.8, which is most likely the target area, the average value is preset to 0.8.
S304:根据每个四边形的可信度,确定至少一个目标四边形。S304: Determine at least one target quadrilateral according to the reliability of each quadrilateral.
在本步骤中,依据四边形的可信度,对识别得到的至少一个四边形进行筛选,得到至少一个目标四边形。In this step, the at least one identified quadrilateral is screened according to the reliability of the quadrilateral to obtain at least one target quadrilateral.
可能的实现方式一、对至少一个四边形,按照每个四边形的可信度的高低进行排序,将可信度最高的n个四边形作为至少一个目标四边形,其中,n≥1,应理解,n个四边形的可信度可以相同或者不同,n个四边形的可信度高于其他未被选作目标四边形的四边形的可信度。Possible implementation manner 1. Sort at least one quadrilateral according to the reliability of each quadrilateral, and use the n quadrilaterals with the highest reliability as at least one target quadrilateral, where n≥1, it should be understood that n The credibility of the quads can be the same or different, and the credibility of n quads is higher than the credibility of other quads that are not selected as target quads.
可能的实现方式二、确定至少一个四边形中的每个四边形的可信度是否大于预设阈值,将可信度大于预设阈值的四边形确定为目标四边形。Possible implementation manner 2: Determine whether the reliability of each quadrilateral in the at least one quadrilateral is greater than a preset threshold, and determine the quadrilateral whose reliability is greater than the preset threshold as the target quadrilateral.
本申请实施例中,通过对图像中的至少一个四边形进行识别,得到每个四边形的坐标信息,实现对四边形的初步筛选;并基于每个四边形的坐标信息,通过高斯运算,得到四边形作为目标区域的可信度,通过设置高斯函数中的预设参数,可使趋近于目标四边形的四边形的可信度更高;进而选择可信度最高的一个或者多个四边形作为目标四边形。本申请实施例能够准确识别出能够表征目标对象的形态的目标四边形,为后续对目标对象的形态进行矫正,得到较好的呈现效果提供了基础。In the embodiment of the present application, by identifying at least one quadrilateral in the image, the coordinate information of each quadrilateral is obtained, so as to realize the preliminary screening of the quadrilateral; and based on the coordinate information of each quadrilateral, through Gaussian operation, the quadrilateral is obtained as the target area By setting the preset parameters in the Gaussian function, the reliability of the quadrilateral that is close to the target quadrilateral can be higher; and then one or more quadrilaterals with the highest reliability are selected as the target quadrilateral. The embodiment of the present application can accurately identify the target quadrilateral that can represent the shape of the target object, which provides a basis for the subsequent correction of the shape of the target object to obtain a better presentation effect.
在上述实施例的基础上,为了对四边形作为目标区域的可信度进行准确的评估,本申请实施例可针对该四边形的每个特征,进行可信度的评估,得到每个特征对应的可信 度,再将每个特征的可信度进行求和,得到该四边形的可信度。On the basis of the above-mentioned embodiment, in order to accurately evaluate the reliability of the quadrilateral as the target area, the embodiment of the present application may perform reliability evaluation for each feature of the quadrilateral, and obtain the reliability corresponding to each feature. The reliability of each feature is summed to obtain the reliability of the quadrilateral.
图5为本申请实施例提供的一种图像的处理方法500的流程示意图。示例性的,如图5所示,基于四边形的面积比例特征、第一垂直角度特征、相邻角度特征和中间位置特征和各个特征对应的预设参数,分别得到每个特征对应的可信度g,将每个特征对应的可信度g进行求和计算,得到四边形的可信度c。FIG. 5 is a schematic flowchart of an image processing method 500 according to an embodiment of the present application. Exemplarily, as shown in FIG. 5 , based on the area ratio feature of the quadrilateral, the first vertical angle feature, the adjacent angle feature, the intermediate position feature, and the preset parameters corresponding to each feature, the reliability corresponding to each feature is obtained respectively. g, the reliability g corresponding to each feature is summed to obtain the reliability c of the quadrilateral.
需要说明的是,为了清楚起见,本实施例中与面积比例特征对应的预设参数称作第一预设参数,与第一垂直角度特征对应的预设参数称作第二预设参数,与相邻角度特征对应的预设参数称作第三预设参数,与中间位置特征对应的预设参数称作第四预设参数。It should be noted that, for the sake of clarity, the preset parameter corresponding to the area ratio feature in this embodiment is called the first preset parameter, the preset parameter corresponding to the first vertical angle feature is called the second preset parameter, and the preset parameter corresponding to the first vertical angle feature is called the second preset parameter. The preset parameter corresponding to the adjacent angle feature is called the third preset parameter, and the preset parameter corresponding to the middle position feature is called the fourth preset parameter.
示例性的,计算面积比例特征对应的可信度g_1:根据四边形的坐标信息,确定四边形的面积,并将四边形的面积与图像的面积的比值作为面积比例特征的特征值,再根据高斯函数计算得到面积比例特征对应的可信度。图6为本申请实施例提供的一种待识别的图像600的示意图。结合图6所示,根据四边形的四个顶点的坐标,即A、B、C、D的坐标和图像的像素值,即图6中图像的长h和宽w,通过公式
Figure PCTCN2020124113-appb-000001
计算得到面积比例特征的特征值x 1,其中,AC和BD为四边形对角线的向量。
Exemplarily, calculate the reliability g_1 corresponding to the area scale feature: determine the area of the quadrilateral according to the coordinate information of the quadrilateral, and use the ratio of the area of the quadrilateral to the area of the image as the feature value of the area scale feature, and then calculate according to the Gaussian function. Obtain the confidence corresponding to the area ratio feature. FIG. 6 is a schematic diagram of an image to be recognized 600 according to an embodiment of the present application. Combined with what is shown in Figure 6, according to the coordinates of the four vertices of the quadrilateral, that is, the coordinates of A, B, C, D and the pixel value of the image, that is, the length h and width w of the image in Figure 6, through the formula
Figure PCTCN2020124113-appb-000001
Calculate the eigenvalue x 1 of the area ratio feature, where AC and BD are the vectors of the diagonal of the quadrilateral.
进一步地,根据计算得到的x 1,通过对应的高斯函数
Figure PCTCN2020124113-appb-000002
得到面积比例特征对应的可信度g 1,其中,α 1、μ 1和σ 1为与面积比例特征对应的第一预设参数,α 1用于表征面积比例特征对应的可信度g 1的权重,μ 1为平均值用于表征面积比例的期望值,σ 1为方差。
Further, according to the calculated x 1 , through the corresponding Gaussian function
Figure PCTCN2020124113-appb-000002
Obtain the reliability g 1 corresponding to the area ratio feature, wherein α 1 , μ 1 and σ 1 are the first preset parameters corresponding to the area ratio feature, and α 1 is used to characterize the reliability g 1 corresponding to the area ratio feature The weight of , μ 1 is the average value used to characterize the expected value of the area ratio, and σ 1 is the variance.
可选的,α 1=1,μ 1=0.7,σ 1=0.2。 Optionally, α 1 =1, μ 1 =0.7, σ 1 =0.2.
示例性的,计算第一垂直角度特征对应的可信度g 2:根据四边形的坐标信息,确定四边形的两条中线的向量,并分别确定每条中线的向量与垂直线的夹角,并将两个夹角中最小的夹角作为第一垂直角度特征的特征值。需要说明的是,四边形的中线为四边形的对边,即两条不相邻的边线的中点的连接线,垂直线为垂直于图像的水平边线的直线,水平边线是指图像正方向放置时,水平方向上的边线。 Exemplarily, calculate the credibility g 2 corresponding to the first vertical angle feature: according to the coordinate information of the quadrilateral, determine the vectors of the two center lines of the quadrilateral, and determine the angle between the vector of each center line and the vertical line, respectively, and The smallest included angle among the two included angles is used as the eigenvalue of the first vertical angle feature. It should be noted that the midline of the quadrilateral is the opposite side of the quadrilateral, that is, the connecting line between the midpoints of two non-adjacent sidelines, the vertical line is the straight line perpendicular to the horizontal sideline of the image, and the horizontal sideline refers to the image when the image is placed in the positive direction. , the edge in the horizontal direction.
结合图6所示,N为线段AB的中点,M为线段CD的中点,P为线段BC的中点,Q为线段AD的中点,四边形ABCD的两条中线分别为MN和PQ,应理解,向量MN可通过
Figure PCTCN2020124113-appb-000003
得到,向量PQ可通过
Figure PCTCN2020124113-appb-000004
得到,并基于公式
Figure PCTCN2020124113-appb-000005
Figure PCTCN2020124113-appb-000006
得到第一垂直角度特征x 2,其中,x=0表示图像所在二维坐标系中的y轴,即垂直于图像水平边线的垂直线,
Figure PCTCN2020124113-appb-000007
表示图6中的∠b,
Figure PCTCN2020124113-appb-000008
表示图6中的∠a。
As shown in Figure 6, N is the midpoint of the line segment AB, M is the midpoint of the line segment CD, P is the midpoint of the line segment BC, Q is the midpoint of the line segment AD, and the two midlines of the quadrilateral ABCD are MN and PQ respectively, It should be understood that the vector MN can be obtained by
Figure PCTCN2020124113-appb-000003
Obtained, the vector PQ can be obtained by
Figure PCTCN2020124113-appb-000004
get, and based on the formula
Figure PCTCN2020124113-appb-000005
Figure PCTCN2020124113-appb-000006
Obtain the first vertical angle feature x 2 , where x=0 represents the y-axis in the two-dimensional coordinate system where the image is located, that is, the vertical line perpendicular to the horizontal edge of the image,
Figure PCTCN2020124113-appb-000007
represents ∠b in Figure 6,
Figure PCTCN2020124113-appb-000008
Indicates ∠a in Figure 6.
进一步地,根据计算得到的x 2,通过对应的高斯函数
Figure PCTCN2020124113-appb-000009
得到第一垂直角度特征对应的可信度g 2,其中,α 2、μ 2和σ 2为与第一垂直角度特征对应的第二预设参数,α 2用于表征第一垂直角度特征对应的可信度g 2的权重,μ 2为平均值用于表征第一垂直角度的期望值,σ 2为方差。
Further, according to the calculated x 2 , through the corresponding Gaussian function
Figure PCTCN2020124113-appb-000009
Obtain the reliability g 2 corresponding to the first vertical angle feature, wherein α 2 , μ 2 and σ 2 are the second preset parameters corresponding to the first vertical angle feature, and α 2 is used to represent the first vertical angle feature corresponding to The weight of the reliability g 2 , μ 2 is the average value used to characterize the expected value of the first vertical angle, and σ 2 is the variance.
示例性的,计算相邻角度特征对应的可信度g 3:根据四边形的坐标信息,确定四边形的四个顶角的角度,结合图6所示,假设∠A=θ 1,∠B=θ 2,∠C=θ 3,∠D=θ 4,进一步地,对四边形的每两个向量的顶角进行一次求差运算,得到四个相邻角度差,再对四个相邻角度差求和,得到相邻角度特征的特征值x 3,即x 3=|θ 12|+|θ 23|+|θ 34|+|θ 41|。 Exemplarily, calculate the reliability g 3 corresponding to the adjacent angle features: according to the coordinate information of the quadrilateral, determine the angles of the four vertex angles of the quadrilateral, and as shown in FIG. 6 , suppose ∠A=θ 1 , ∠B=θ 2 , ∠C=θ 3 , ∠D=θ 4 , further, a difference operation is performed on the vertex angles of every two vectors of the quadrilateral to obtain four adjacent angle differences, and then the four adjacent angle differences are calculated. And, the eigenvalue x 3 of the adjacent angle feature is obtained, that is, x 3 =|θ 12 |+|θ 23 |+|θ 34 |+|θ 41 |.
进一步地,根据计算得到的x 3,通过对应的高斯函数
Figure PCTCN2020124113-appb-000010
得到相邻角度特征对应的可信度g 3,其中,α 3、μ 3和σ 3为与相邻角度特征对应的第三预设参数,α 3用于表征向量角度特征对应的可信度g 3的权重,μ 3为平均值用于表征相邻角度的期望值, σ 3为方差。
Further, according to the calculated x 3 , through the corresponding Gaussian function
Figure PCTCN2020124113-appb-000010
Obtain the reliability g 3 corresponding to the adjacent angle feature, wherein α 3 , μ 3 and σ 3 are the third preset parameters corresponding to the adjacent angle feature, and α 3 is used to represent the reliability corresponding to the vector angle feature The weight of g 3 , μ 3 is the average value used to characterize the expected value of adjacent angles, and σ 3 is the variance.
示例性的,计算中间位置特征对应的可信度g 4:根据四边形的坐标信息,确定四边形的中间位置的坐标,需要说明的是,中间位置的坐标为四边形的四个顶点的坐标的平均值,结合图6所示,中间位置特征的特征值,即四边形的中间位置的坐标
Figure PCTCN2020124113-appb-000011
Exemplarily, calculate the reliability g 4 corresponding to the feature of the middle position: according to the coordinate information of the quadrilateral, determine the coordinates of the middle position of the quadrilateral, it should be noted that the coordinates of the middle position are the average value of the coordinates of the four vertices of the quadrilateral , combined with Figure 6, the eigenvalues of the middle position feature, that is, the coordinates of the middle position of the quadrilateral
Figure PCTCN2020124113-appb-000011
进一步地,根据计算得到的x 4,通过对应的高斯函数
Figure PCTCN2020124113-appb-000012
得到中间位置特征对应的可信度g 4,其中,α 4、μ 4和σ 4为与中间位置特征对应的第四预设参数,α 4用于表征向量角度特征对应的可信度g 4的权重,μ 4为平均值用于表征中间位置的期望值,σ 4为方差。
Further, according to the calculated x 4 , through the corresponding Gaussian function
Figure PCTCN2020124113-appb-000012
Obtain the reliability g 4 corresponding to the middle position feature, wherein α 4 , μ 4 and σ 4 are the fourth preset parameters corresponding to the middle position feature, and α 4 is used to represent the reliability g 4 corresponding to the vector angle feature The weight of , μ 4 is the average value used to characterize the expected value of the middle position, and σ 4 is the variance.
通过公式c=Σg i(x iiii),i=1,2,3,4,将上述特征的可信度进行求和,得到四边形的可信度c。应理解,本实施例中列举的四边形的特征仅作为示例,实际应用中可包括更多或更少的特征。 By formula c=Σg i (x iiii ), i=1, 2, 3, 4, the reliability of the above features is summed to obtain the reliability c of the quadrilateral. It should be understood that the features of the quadrilateral listed in this embodiment are only examples, and more or less features may be included in practical applications.
在一种可能的实现方式中,上述任一实施例中的可信度的计算还可以结合第二垂直角度特征的可信度。In a possible implementation manner, the calculation of the reliability in any of the foregoing embodiments may also be combined with the reliability of the second vertical angle feature.
示例性的,计算第二垂直角度特征的可信度g 5:获取电子设备采集图像时的位姿信息,该位姿信息包括位置信息和/或姿态信息,例如通过图像携带的信息直接读取位姿信息,进而根据位姿信息R c和公式g p=P(R c,K,g 0),计算得到投影重力向量g p,其中,K为相机内参、g 0为世界坐标系中的重力向量,P为投影函数;进一步地,根据公式
Figure PCTCN2020124113-appb-000013
Figure PCTCN2020124113-appb-000014
其中,
Figure PCTCN2020124113-appb-000015
Figure PCTCN2020124113-appb-000016
分别表示四边形的两条中线向量和投影重力向量的夹角,将两夹角中的最小值作为第二垂直角度特征的特征值。
Exemplarily, calculating the reliability g 5 of the second vertical angle feature: acquiring the pose information when the electronic device captures the image, where the pose information includes position information and/or attitude information, for example, directly read through the information carried by the image pose information, and then calculate the projected gravity vector g p according to the pose information R c and the formula g p =P(R c ,K,g 0 ), where K is the camera internal parameter, and g 0 is the world coordinate system Gravity vector, P is the projection function; further, according to the formula
Figure PCTCN2020124113-appb-000013
Figure PCTCN2020124113-appb-000014
in,
Figure PCTCN2020124113-appb-000015
and
Figure PCTCN2020124113-appb-000016
respectively represent the angle between the two midline vectors of the quadrilateral and the projected gravity vector, and take the minimum value of the two angles as the eigenvalue of the second vertical angle feature.
进一步地,根据计算得到的x 5,通过对应的高斯函数
Figure PCTCN2020124113-appb-000017
得到第二垂直角度特征对应的可信度g 5,其中,α 5、μ 5和σ 5为与第二垂直角度特征对应的预设参数也称作第五预设参数,α 5用于表征向量角度特征对应的可信度g 5的权重,μ 5为平均值用于表征中间位置的期望值,σ 5为方差。
Further, according to the calculated x 5 , through the corresponding Gaussian function
Figure PCTCN2020124113-appb-000017
Obtain the reliability g 5 corresponding to the second vertical angle feature, wherein α 5 , μ 5 and σ 5 are preset parameters corresponding to the second vertical angle feature, also referred to as fifth preset parameters, and α 5 is used to represent The weight of the reliability g 5 corresponding to the vector angle feature, μ 5 is the average value used to represent the expected value of the middle position, and σ 5 is the variance.
图7为本申请实施例提供的一种图像的处理方法700的流程示意图。FIG. 7 is a schematic flowchart of an image processing method 700 according to an embodiment of the present application.
图像的拍摄场景能够在一定程度上反映目标对象的类型和特点,那么,对于不同拍摄场景对高斯函数设置不同的参数,能够提高四边形识别的准确性。The shooting scene of the image can reflect the type and characteristics of the target object to a certain extent. Then, setting different parameters for the Gaussian function for different shooting scenes can improve the accuracy of quadrilateral recognition.
例如,在美术馆场景中,用户观看画作的距离较近,因此所采集的目标对象在图像中的面积比例较大,并且画作一般为悬挂状态,因此所采集的目标对象在图像中一般呈现为梯形,据此设置面积比例特征对应的预设参数以及第一垂直角度特征对应的预设参数。For example, in the art gallery scene, the distance of the user viewing the painting is relatively short, so the area ratio of the captured target object in the image is larger, and the painting is generally in a hanging state, so the captured target object is generally presented in the image as Trapezoid, according to which the preset parameters corresponding to the area ratio feature and the preset parameters corresponding to the first vertical angle feature are set.
可选的,拍摄场景包括但不限于:美术馆、办公楼、学校中的任意一种。Optionally, the shooting scene includes but is not limited to: any one of an art gallery, an office building, and a school.
示例性的,首先图像拍摄时的定位信息,并根据该定位信息确定图像的拍摄场景,例如根据定位信息和预设的地图信息预测拍摄场景,进而根据确定的拍摄场景和预先设定的拍摄场景与参数组的对应关系,确定与预测的拍摄场景对应的参数组,该参数组包括上述任一实施例中的一个或多个特征对应的预设参数,进而基于确定的参数组计算四边形的可信度。Exemplarily, the positioning information when the image is captured is first, and the shooting scene of the image is determined according to the positioning information, for example, the shooting scene is predicted according to the positioning information and the preset map information, and then the shooting scene is determined according to the determined shooting scene and the preset shooting scene. The corresponding relationship with the parameter group, determine the parameter group corresponding to the predicted shooting scene, the parameter group includes the preset parameters corresponding to one or more features in any of the above-mentioned embodiments, and then calculate the quadrilateral based on the determined parameter group. reliability.
示例性的,在图像采集的过程中,通过任一定位技术获取电子设备的定位信息,例如通过全球定位系统(Global Positioning System,GPS)获取电子设备的定位信息。Exemplarily, in the process of image acquisition, the positioning information of the electronic device is obtained through any positioning technology, for example, the positioning information of the electronic device is obtained through a global positioning system (Global Positioning System, GPS).
除了已经定位信息确定拍摄场景外,本申请实施例可根据用户意图确定拍摄场景,例如,接收用户通过人机交互界面选择的拍摄场景,进而根据拍摄场景确定对应的参数组。In addition to determining the shooting scene based on the positioning information, the embodiment of the present application can determine the shooting scene according to the user's intention, for example, receive the shooting scene selected by the user through the human-computer interaction interface, and then determine the corresponding parameter group according to the shooting scene.
可选的,可接收用户输入的设置指令,该设置指令包含参数组标识,根据设置指令指示的参数组标识,确定对应的参数组。Optionally, a setting instruction input by the user may be received, where the setting instruction includes a parameter group identifier, and the corresponding parameter group is determined according to the parameter group identifier indicated by the setting instruction.
上文结合图1至图7,详细描述了本申请的方法实施例,下文结合图8至图10,详 细描述本申请的装置实施例,应理解,装置实施例与方法实施例相互对应,类似的描述可以参照方法实施例。The method embodiments of the present application are described in detail above with reference to FIGS. 1 to 7 , and the apparatus embodiments of the present application are described in detail below with reference to FIGS. 8 to 10 . It should be understood that the apparatus embodiments and the method embodiments correspond to each other, and are similar to For the description, refer to the method embodiment.
图8示出了根据本申请实施例的图像的处理装置的示意性框图。如图8所示,该图像的处理装置10包括:FIG. 8 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application. As shown in Figure 8, the image processing device 10 includes:
图像获取单元11,用于获取待识别的图像,该图像包括目标对象;an image acquisition unit 11, for acquiring an image to be identified, the image including a target object;
图像识别单元12,用于对该图像中的至少一个四边形进行识别,得到每个四边形的坐标信息;The image recognition unit 12 is used to recognize at least one quadrilateral in the image, and obtain coordinate information of each quadrilateral;
图像处理单元13,用于针对每个四边形,根据四边形的坐标信息,通过高斯运算,计算得到四边形的可信度,可信度用于表征四边形作为目标区域的评估结果,目标区域用于表征目标对象在图像中的形态;The image processing unit 13 is used for each quadrilateral, according to the coordinate information of the quadrilateral, through Gaussian operation, calculates the credibility of the quadrilateral, the credibility is used to characterize the quadrilateral as the evaluation result of the target area, and the target area is used to represent the target. the shape of the object in the image;
图像处理单元13还用于根据每个四边形的可信度,确定至少一个目标四边形。The image processing unit 13 is further configured to determine at least one target quadrilateral according to the reliability of each quadrilateral.
本申请实施例中的图像的处理装置10包括图像获取单元11和图像识别单元12,通过对图像中的至少一个四边形进行识别,得到每个四边形的坐标信息,实现对四边形的初步筛选;并基于每个四边形的坐标信息,通过高斯运算,得到四边形作为目标区域的可信度,通过设置高斯函数中的预设参数,可使趋近于目标四边形的四边形的可信度更高;进而选择可信度最高的一个或者多个四边形作为目标四边形。本申请实施例能够准确识别出能够表征目标对象的形态的目标四边形,为后续对目标对象的形态进行矫正,得到较好的呈现效果提供了基础。The image processing device 10 in the embodiment of the present application includes an image acquisition unit 11 and an image recognition unit 12, and by identifying at least one quadrilateral in the image, the coordinate information of each quadrilateral is obtained, and the preliminary screening of the quadrilateral is realized; and based on The coordinate information of each quadrilateral is obtained through Gaussian operation to obtain the credibility of the quadrilateral as the target area. By setting the preset parameters in the Gaussian function, the credibility of the quadrilateral approaching the target quadrilateral can be higher; One or more quadrilaterals with the highest reliability are used as target quadrilaterals. The embodiment of the present application can accurately identify the target quadrilateral that can represent the shape of the target object, which provides a basis for the subsequent correction of the shape of the target object to obtain a better presentation effect.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
针对四边形的每个特征,根据四边形的坐标信息和与特征对应的高斯函数,确定特征的可信度,四边形包括至少一个特征;For each feature of the quadrilateral, the reliability of the feature is determined according to the coordinate information of the quadrilateral and the Gaussian function corresponding to the feature, and the quadrilateral includes at least one feature;
对至少一个特征的可信度进行求和,得到四边形的可信度。Sum the confidences of at least one feature to get the confidences of the quadrilateral.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
针对四边形的每个特征,根据四边形的坐标信息,确定特征的特征值;For each feature of the quadrilateral, determine the eigenvalue of the feature according to the coordinate information of the quadrilateral;
根据特征值和高斯函数,得到特征的可信度,高斯函数包括与特征对应的预设参数。According to the feature value and the Gaussian function, the reliability of the feature is obtained, and the Gaussian function includes preset parameters corresponding to the feature.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
根据四边形的坐标信息,确定四边形的面积;According to the coordinate information of the quadrilateral, determine the area of the quadrilateral;
将四边形的面积与图像的面积的比值作为特征的特征值。The ratio of the area of the quadrilateral to the area of the image is taken as the eigenvalue of the feature.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
根据四边形的坐标信息,得到四边形的两条中线的向量;According to the coordinate information of the quadrilateral, the vectors of the two midlines of the quadrilateral are obtained;
分别确定每条中线的向量与垂直线的夹角,垂直线垂直于图像的水平边线;Determine the angle between the vector of each midline and the vertical line, which is perpendicular to the horizontal edge of the image;
将两个夹角中最小的夹角作为特征的特征值。Take the smallest of the two included angles as the eigenvalue of the feature.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
根据四边形的坐标信息,确定四边形的四个顶角;According to the coordinate information of the quadrilateral, determine the four vertex angles of the quadrilateral;
对四边形的每两个相邻的顶角进行一次求差运算,得到四个相邻角度差;Perform a difference operation on every two adjacent vertex angles of the quadrilateral to obtain the difference of four adjacent angles;
将四个相邻角度差的和作为特征的特征值。The sum of the differences of four adjacent angles is taken as the eigenvalue of the feature.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
根据四边形的坐标信息,确定四边形的中间位置的坐标,并将中间位置的坐标作为特征的特征值;中间位置的坐标为四边形的四个顶点的坐标的平均值,坐标信息包括四个顶点的坐标。According to the coordinate information of the quadrilateral, determine the coordinates of the middle position of the quadrilateral, and use the coordinates of the middle position as the feature value of the feature; the coordinates of the middle position are the average of the coordinates of the four vertices of the quadrilateral, and the coordinate information includes the coordinates of the four vertices .
可选的,预设参数包括权重、平均值和方差。Optionally, the preset parameters include weight, mean and variance.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
获取位姿信息,位姿信息用于表征电子设备在采集图像时的位置和/或姿态;Obtain pose information, which is used to characterize the position and/or attitude of the electronic device when the image is collected;
根据位姿信息和四边形的坐标信息,确定特征的特征值。According to the pose information and the coordinate information of the quadrilateral, the eigenvalues of the features are determined.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
根据位姿信息和投影函数,确定投影重力向量,投影重力向量用于表征世界坐标系 中的重力向量在图像所在的坐标系中的投影;According to the pose information and the projection function, the projected gravity vector is determined, and the projected gravity vector is used to represent the projection of the gravity vector in the world coordinate system in the coordinate system where the image is located;
根据四边形的坐标信息,得到四边形的两条中线的向量;According to the coordinate information of the quadrilateral, the vectors of the two midlines of the quadrilateral are obtained;
分别确定四边形的每条中线的向量与投影重力向量的夹角;Determine the angle between the vector of each midline of the quadrilateral and the projected gravity vector;
将两个夹角中最小的夹角作为特征的特征值。Take the smallest of the two included angles as the eigenvalue of the feature.
上述实施例提供的数据的处理装置,可以执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The data processing apparatus provided in the foregoing embodiments may execute the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and are not repeated here.
在图8所示实施例的基础上,图9示出了根据本申请实施例的图像的处理装置的示意性框图。如图9所示,该图像的处理装置10还包括:Based on the embodiment shown in FIG. 8 , FIG. 9 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application. As shown in Figure 9, the image processing device 10 further includes:
位置获取单元14,用于获取定位信息,定位信息用于表征电子设备在采集图像时的位置;a position obtaining unit 14, used for obtaining positioning information, the positioning information is used to represent the position of the electronic device when the image is collected;
参数确定单元15,用于根据定位信息,确定图像的拍摄场景;The parameter determination unit 15 is used to determine the shooting scene of the image according to the positioning information;
参数确定单元15还用于根据拍摄场景,确定对应的参数组,参数组包括至少一个特征对应的预设参数。The parameter determination unit 15 is further configured to determine a corresponding parameter group according to the shooting scene, where the parameter group includes preset parameters corresponding to at least one feature.
上述实施例提供的数据的处理装置,可以执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The data processing apparatus provided in the foregoing embodiments may execute the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and are not repeated here.
在图8或图9所示实施例的基础上,图10示出了根据本申请实施例的图像的处理装置的示意性框图。如图10所示,该图像的处理装置10还包括:接收单元16;Based on the embodiment shown in FIG. 8 or FIG. 9 , FIG. 10 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present application. As shown in FIG. 10 , the image processing apparatus 10 further includes: a receiving unit 16;
接收单元16用于接收用户输入的拍摄场景;The receiving unit 16 is configured to receive the shooting scene input by the user;
参数确定单元15还用于根据拍摄场景,确定对应的参数组,参数组包括至少一个特征对应的预设参数。The parameter determination unit 15 is further configured to determine a corresponding parameter group according to the shooting scene, where the parameter group includes preset parameters corresponding to at least one feature.
可选的,图像识别单元12具体用于:Optionally, the image recognition unit 12 is specifically used for:
识别得到图像中的至少一个候选图形,候选图形由四条线段组成;Identify at least one candidate graphic in the image, and the candidate graphic consists of four line segments;
针对每个候选图形,在候选图形满足第一预设条件时,确定候选图形为四边形,并得到四边形的坐标信息。For each candidate graphic, when the candidate graphic meets the first preset condition, it is determined that the candidate graphic is a quadrilateral, and coordinate information of the quadrilateral is obtained.
可选的,第一预设条件包括以下至少一项:Optionally, the first preset condition includes at least one of the following:
候选图形的两个第一夹角均小于第一预设值,第一夹角为四条线段中任意两条不相邻的线段的夹角;The two first included angles of the candidate graphics are both smaller than the first preset value, and the first included angle is the included angle of any two non-adjacent line segments in the four line segments;
或者,or,
候选图形的四个第二夹角均大于第二预设值,第二夹角为四条线段中任意两条相邻的线段的夹角;The four second included angles of the candidate graphics are all greater than the second preset value, and the second included angle is the included angle of any two adjacent line segments in the four line segments;
或者,or,
候选图形的面积比例大于第三预设值,面积比例为候选图形的面积与图像的面积的比值。The area ratio of the candidate graphic is greater than the third preset value, and the area ratio is the ratio of the area of the candidate graphic to the area of the image.
可选的,图像识别单元12具体用于:Optionally, the image recognition unit 12 is specifically used for:
识别得到图像中的多条线段;Identify multiple line segments in the image;
将多条线段中的每四条线段进行组合,得到至少一个候选图形。Combining every four line segments of the multiple line segments to obtain at least one candidate figure.
可选的,图像识别单元12具体用于:Optionally, the image recognition unit 12 is specifically used for:
确定多条线段中处于同一直线的至少两条线段;Determine at least two line segments in the same straight line among the multiple line segments;
针对至少两条线段中的每两条线段,在两条线段满足第二预设条件时,合并两条线段。For each of the at least two line segments, when the two line segments satisfy the second preset condition, the two line segments are merged.
可选的,第二预设条件包括:Optionally, the second preset condition includes:
两条线段存在部分重叠;There is a partial overlap between the two line segments;
或者,两条线段中的任意一条线段被另一条线段覆盖;Or, either of the two line segments is covered by the other;
或者,两条线段之间的距离小于第四预设值。Alternatively, the distance between the two line segments is smaller than the fourth preset value.
可选的,图像处理单元13具体用于:Optionally, the image processing unit 13 is specifically used for:
对至少一个四边形,按照每个四边形的可信度的高低进行排序,将可信度最高的n个 四边形作为至少一个目标四边形,n≥1;Sort at least one quadrilateral according to the reliability of each quadrilateral, and use the n quadrilaterals with the highest reliability as at least one target quadrilateral, n≥1;
或者,or,
针对至少一个四边形中的每个四边形,在四边形的可信度大于预设阈值时,确定四边形为目标四边形。For each quadrilateral in the at least one quadrilateral, when the reliability of the quadrilateral is greater than a preset threshold, the quadrilateral is determined as the target quadrilateral.
上述实施例提供的数据的处理装置,可以执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The data processing apparatus provided in the foregoing embodiments may execute the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and are not repeated here.
图11是本申请实施例提供的一种电子设备示意性结构图。图11所示的电子设备包括处理器1210,处理器1210可以从存储器中调用并运行计算机程序,以实现本申请实施例中的方法。FIG. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device shown in FIG. 11 includes a processor 1210, and the processor 1210 can call and run a computer program from a memory, so as to implement the method in this embodiment of the present application.
可选地,如图11所示,电子设备1200还可以包括存储器1220。其中,处理器1210可以从存储器1220中调用并运行计算机程序,以实现本申请实施例中的方法。Optionally, as shown in FIG. 11 , the electronic device 1200 may further include a memory 1220 . The processor 1210 may call and run a computer program from the memory 1220 to implement the methods in the embodiments of the present application.
其中,存储器1220可以是独立于处理器1210的一个单独的器件,也可以集成在处理器1210中。The memory 1220 may be a separate device independent of the processor 1210, or may be integrated in the processor 1210.
可选地,如图11所示,电子设备1200还可以包括收发器1230,处理器1210可以控制该收发器1230与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。Optionally, as shown in FIG. 11 , the electronic device 1200 may further include a transceiver 1230, and the processor 1210 may control the transceiver 1230 to communicate with other devices, specifically, may send information or data to other devices, or receive other devices Information or data sent by the device.
其中,收发器1230可以包括发射机和接收机。收发器1230还可以进一步包括天线,天线的数量可以为一个或多个。Among them, the transceiver 1230 may include a transmitter and a receiver. The transceiver 1230 may further include antennas, and the number of the antennas may be one or more.
可选地,该电子设备1200可以实现本申请实施例的各个方法中的相应流程,为了简洁,在此不再赘述。Optionally, the electronic device 1200 may implement corresponding processes in each method of the embodiments of the present application, which are not repeated here for brevity.
应理解,本申请实施例的处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor in this embodiment of the present application may be an integrated circuit chip, which has a signal processing capability. In the implementation process, each step of the above method embodiments may be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software. The above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Programming logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically programmable read-only memory (Erasable PROM, EPROM). Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) ) and direct memory bus random access memory (Direct Rambus RAM, DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
应理解,上述存储器为示例性但不是限制性说明,例如,本申请实施例中的存储器还可以是静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM, DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)以及直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)等等。也就是说,本申请实施例中的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should be understood that the above-mentioned memory is an example but not a limitative description, for example, the memory in this embodiment of the present application may also be a static random access memory (static RAM, SRAM), a dynamic random access memory (dynamic RAM, DRAM), Synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection Dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and so on. That is, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。Embodiments of the present application further provide a computer-readable storage medium for storing a computer program.
可选的,该计算机可读存储介质可应用于本申请实施例中的电子设备,并且该计算机程序使得计算机执行本申请实施例的各个方法中由电子设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer-readable storage medium can be applied to the electronic device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. For brevity, here No longer.
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。Embodiments of the present application also provide a computer program product, including computer program instructions.
可选的,该计算机程序产品可应用于本申请实施例中的电子设备,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由电子设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program product can be applied to the electronic device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. Repeat.
本申请实施例还提供了一种计算机程序。The embodiments of the present application also provide a computer program.
可选的,该计算机程序可应用于本申请实施例中的电子设备,当该计算机程序在计算机上运行时,使得计算机执行本申请实施例的各个方法中由电子设备实现的相应流程,为了简洁,在此不再赘述。Optionally, the computer program can be applied to the electronic device in the embodiments of the present application. When the computer program runs on the computer, the computer executes the corresponding processes implemented by the electronic device in the various methods of the embodiments of the present application. For the sake of brevity. , and will not be repeated here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described devices, devices and units, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the above units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or may be Integration into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
上述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。针对这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中的方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the above functions are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. For such understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
上述内容仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟 悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above contents are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the technical scope disclosed in the present application can easily think of changes or replacements, which should cover within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (40)

  1. 一种图像的处理方法,其特征在于,包括:An image processing method, comprising:
    获取待识别的图像,所述图像包括目标对象;acquiring an image to be identified, the image comprising a target object;
    对所述图像中的至少一个四边形进行识别,得到每个四边形的坐标信息;Identifying at least one quadrilateral in the image to obtain coordinate information of each quadrilateral;
    针对每个四边形,根据所述四边形的坐标信息,通过高斯运算,计算得到所述四边形的可信度,所述可信度用于表征所述四边形作为目标区域的评估结果,所述目标区域用于表征所述目标对象在所述图像中的形态;For each quadrilateral, according to the coordinate information of the quadrilateral, through Gaussian operation, the reliability of the quadrilateral is calculated, and the reliability is used to represent the evaluation result of the quadrilateral as the target area. for characterizing the shape of the target object in the image;
    根据每个四边形的可信度,确定至少一个目标四边形。Based on the confidence of each quad, at least one target quad is determined.
  2. 根据权利要求1所述的方法,其特征在于,所述针对每个四边形,根据所述四边形的坐标信息,通过高斯运算,计算得到所述四边形的可信度,包括:The method according to claim 1, wherein, for each quadrilateral, according to the coordinate information of the quadrilateral, calculating the reliability of the quadrilateral through Gaussian operation, comprising:
    针对所述四边形的每个特征,根据所述四边形的坐标信息和与所述特征对应的高斯函数,确定所述特征的可信度,所述四边形包括至少一个特征;For each feature of the quadrilateral, the reliability of the feature is determined according to the coordinate information of the quadrilateral and the Gaussian function corresponding to the feature, and the quadrilateral includes at least one feature;
    对所述至少一个特征的可信度进行求和,得到所述四边形的可信度。The confidence levels of the at least one feature are summed to obtain the confidence levels of the quadrilateral.
  3. 根据权利要求2所述的方法,其特征在于,所述针对所述四边形的每个特征,根据所述四边形的坐标信息和与所述特征对应的高斯函数,确定所述特征的可信度,包括:The method according to claim 2, wherein, for each feature of the quadrilateral, the reliability of the feature is determined according to coordinate information of the quadrilateral and a Gaussian function corresponding to the feature, include:
    根据所述四边形的坐标信息,确定所述特征的特征值;According to the coordinate information of the quadrilateral, determine the eigenvalue of the feature;
    根据所述特征值和所述高斯函数,得到所述特征的可信度,所述高斯函数包括与所述特征对应的预设参数。The reliability of the feature is obtained according to the feature value and the Gaussian function, where the Gaussian function includes preset parameters corresponding to the feature.
  4. 根据权利要求3所述的方法,其特征在于,若所述特征包括面积比例特征,则所述根据所述四边形的坐标信息,确定所述特征的特征值,包括:The method according to claim 3, wherein if the feature includes an area ratio feature, the determining the feature value of the feature according to the coordinate information of the quadrilateral comprises:
    根据所述四边形的坐标信息,确定所述四边形的面积;determining the area of the quadrilateral according to the coordinate information of the quadrilateral;
    将所述四边形的面积与所述图像的面积的比值作为所述特征的特征值。The ratio of the area of the quadrilateral to the area of the image is used as the feature value of the feature.
  5. 根据权利要求3所述的方法,其特征在于,若所述特征包括第一垂直角度特征,则所述根据所述四边形的坐标信息,确定所述特征的特征值,包括:The method according to claim 3, wherein if the feature includes a first vertical angle feature, the determining the feature value of the feature according to the coordinate information of the quadrilateral comprises:
    根据所述四边形的坐标信息,得到所述四边形的两条中线的向量;According to the coordinate information of the quadrilateral, the vectors of the two midlines of the quadrilateral are obtained;
    分别确定每条中线的向量与垂直线的夹角,所述垂直线垂直于所述图像的水平边线;Determine the angle between the vector of each midline and the vertical line, the vertical line being perpendicular to the horizontal edge of the image;
    将两个夹角中最小的夹角作为所述特征的特征值。The smallest of the two included angles is taken as the eigenvalue of the feature.
  6. 根据权利要求3所述的方法,其特征在于,若所述特征包括相邻角度特征,则所述根据所述四边形的坐标信息,确定所述特征的特征值,包括:The method according to claim 3, wherein, if the feature includes adjacent angle features, the determining the feature value of the feature according to the coordinate information of the quadrilateral comprises:
    根据所述四边形的坐标信息,确定所述四边形的四个顶角;According to the coordinate information of the quadrilateral, determine the four vertex angles of the quadrilateral;
    对所述四边形的每两个相邻的顶角进行一次求差运算,得到四个相邻角度差;A difference operation is performed on every two adjacent vertex angles of the quadrilateral to obtain four adjacent angle differences;
    将四个相邻角度差的和作为所述特征的特征值。The sum of four adjacent angle differences is taken as the feature value of the feature.
  7. 根据权利要求3所述的方法,其特征在于,若所述特征包括中间位置特征,则所述根据所述四边形的坐标信息,确定所述特征的特征值,包括:The method according to claim 3, wherein if the feature includes an intermediate position feature, the determining the feature value of the feature according to the coordinate information of the quadrilateral comprises:
    根据所述四边形的坐标信息,确定所述四边形的中间位置的坐标,并将所述中间位置的坐标作为所述特征的特征值;所述中间位置的坐标为所述四边形的四个顶点的坐标的平均值,所述坐标信息包括所述四个顶点的坐标。According to the coordinate information of the quadrilateral, determine the coordinates of the middle position of the quadrilateral, and use the coordinates of the middle position as the feature value of the feature; the coordinates of the middle position are the coordinates of the four vertices of the quadrilateral The average value of , and the coordinate information includes the coordinates of the four vertices.
  8. 根据权利要求3至7任一项所述的方法,其特征在于,所述预设参数包括权重、平均值和方差。The method according to any one of claims 3 to 7, wherein the preset parameters include weight, average value and variance.
  9. 根据权利要求3所述的方法,其特征在于,若所述特征包括第二垂直角度特征,则所述根据所述四边形的坐标信息,确定所述特征的特征值,包括:The method according to claim 3, wherein if the feature includes a second vertical angle feature, the determining the feature value of the feature according to the coordinate information of the quadrilateral comprises:
    获取位姿信息,所述位姿信息用于表征电子设备在采集所述图像时的位置和/或姿态;Obtaining pose information, the pose information is used to characterize the position and/or attitude of the electronic device when the image is collected;
    根据所述位姿信息和所述四边形的坐标信息,确定所述特征的特征值。According to the pose information and the coordinate information of the quadrilateral, the feature value of the feature is determined.
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述位姿信息和所述四边形的坐标信息,确定所述特征的特征值,包括:The method according to claim 9, wherein the determining the feature value of the feature according to the pose information and the coordinate information of the quadrilateral comprises:
    根据所述位姿信息和投影函数,确定投影重力向量,所述投影重力向量用于表征世 界坐标系中的重力向量在所述图像所在的坐标系中的投影;According to the pose information and the projection function, determine the projection gravity vector, and the projection gravity vector is used to represent the projection of the gravity vector in the world coordinate system in the coordinate system where the image is located;
    根据所述四边形的坐标信息,得到所述四边形的两条中线的向量;According to the coordinate information of the quadrilateral, the vectors of the two midlines of the quadrilateral are obtained;
    分别确定所述四边形的每条中线的向量与所述投影重力向量的夹角;Determine the angle between the vector of each center line of the quadrilateral and the projected gravity vector respectively;
    将两个夹角中最小的夹角作为所述特征的特征值。The smallest of the two included angles is taken as the eigenvalue of the feature.
  11. 根据权利要求3至7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 3 to 7, wherein the method further comprises:
    获取定位信息,所述定位信息用于表征电子设备在采集所述图像时的位置;obtaining positioning information, where the positioning information is used to represent the position of the electronic device when the image is collected;
    根据所述定位信息,确定所述图像的拍摄场景;determining the shooting scene of the image according to the positioning information;
    根据所述拍摄场景,确定对应的参数组,所述参数组包括至少一个特征对应的预设参数。According to the shooting scene, a corresponding parameter group is determined, and the parameter group includes preset parameters corresponding to at least one feature.
  12. 根据权利要求3至7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 3 to 7, wherein the method further comprises:
    接收用户输入的拍摄场景;Receive the shooting scene input by the user;
    根据所述拍摄场景,确定对应的参数组,所述参数组包括至少一个特征对应的预设参数。According to the shooting scene, a corresponding parameter group is determined, and the parameter group includes preset parameters corresponding to at least one feature.
  13. 根据权利要求1至7任一项所述的方法,其特征在于,所述对所述图像中的至少一个四边形进行识别,得到每个四边形的坐标信息,包括:The method according to any one of claims 1 to 7, wherein the identifying at least one quadrilateral in the image to obtain coordinate information of each quadrilateral includes:
    识别得到所述图像中的至少一个候选图形,所述候选图形由四条线段组成;Identify at least one candidate graphic in the image, and the candidate graphic is composed of four line segments;
    针对每个候选图形,在所述候选图形满足第一预设条件时,确定所述候选图形为所述四边形,并得到所述四边形的坐标信息。For each candidate graphic, when the candidate graphic satisfies the first preset condition, it is determined that the candidate graphic is the quadrilateral, and the coordinate information of the quadrilateral is obtained.
  14. 根据权利要求13所述的方法,其特征在于,所述第一预设条件包括以下至少一项:The method according to claim 13, wherein the first preset condition comprises at least one of the following:
    所述候选图形的两个第一夹角均小于第一预设值,所述第一夹角为所述四条线段中任意两条不相邻的线段的夹角;The two first included angles of the candidate graphics are both smaller than the first preset value, and the first included angle is the included angle of any two non-adjacent line segments in the four line segments;
    或者,or,
    所述候选图形的四个第二夹角均大于第二预设值,所述第二夹角为所述四条线段中任意两条相邻的线段的夹角;The four second included angles of the candidate graphics are all greater than the second preset value, and the second included angle is the included angle of any two adjacent line segments in the four line segments;
    或者,or,
    所述候选图形的面积比例大于第三预设值,所述面积比例为所述候选图形的面积与所述图像的面积的比值。The area ratio of the candidate graphic is greater than a third preset value, and the area ratio is a ratio of the area of the candidate graphic to the area of the image.
  15. 根据权利要求13所述的方法,其特征在于,所述识别得到所述图像中的至少一个候选图形,包括:The method according to claim 13, wherein the identifying to obtain at least one candidate figure in the image comprises:
    识别得到所述图像中的多条线段;Identifying a plurality of line segments in the image;
    将所述多条线段中的每四条线段进行组合,得到所述至少一个候选图形。Combining every four line segments of the plurality of line segments to obtain the at least one candidate figure.
  16. 根据权利要求15所述的方法,其特征在于,在所述将所述多条线段中的每四条线段进行组合,得到所述至少一个候选图形之前,所述方法还包括:The method according to claim 15, wherein before obtaining the at least one candidate figure by combining every four line segments of the plurality of line segments, the method further comprises:
    确定所述多条线段中处于同一直线的至少两条线段;determining at least two line segments in the same straight line among the plurality of line segments;
    针对所述至少两条线段中的每两条线段,在所述两条线段满足第二预设条件时,合并所述两条线段。For each of the at least two line segments, when the two line segments satisfy a second preset condition, the two line segments are merged.
  17. 根据权利要求16所述的方法,其特征在于,所述第二预设条件包括:The method according to claim 16, wherein the second preset condition comprises:
    所述两条线段存在部分重叠;The two line segments partially overlap;
    或者,所述两条线段中的任意一条线段被另一条线段覆盖;Or, any one of the two line segments is covered by another line segment;
    或者,所述两条线段之间的距离小于第四预设值。Alternatively, the distance between the two line segments is less than a fourth preset value.
  18. 根据权利要求1至7任一项所述的方法,其特征在于,所述根据每个四边形的可信度,确定至少一个目标四边形,包括:The method according to any one of claims 1 to 7, wherein the determining at least one target quadrilateral according to the reliability of each quadrilateral comprises:
    对所述至少一个四边形,按照每个四边形的可信度的高低进行排序,将可信度最高的n个四边形作为所述至少一个目标四边形,n≥1;The at least one quadrilateral is sorted according to the reliability of each quadrilateral, and the n quadrilaterals with the highest reliability are used as the at least one target quadrilateral, and n≥1;
    或者,or,
    针对所述至少一个四边形中的每个四边形,在所述四边形的可信度大于预设阈值时,确定所述四边形为目标四边形。For each quadrilateral in the at least one quadrilateral, when the reliability of the quadrilateral is greater than a preset threshold, the quadrilateral is determined to be the target quadrilateral.
  19. 一种图像的处理装置,其特征在于,包括:An image processing device, comprising:
    图像获取单元,用于获取待识别的图像,所述图像包括目标对象;an image acquisition unit for acquiring an image to be identified, the image including a target object;
    图像识别单元,用于对所述图像中的至少一个四边形进行识别,得到每个四边形的坐标信息;an image recognition unit for recognizing at least one quadrilateral in the image to obtain coordinate information of each quadrilateral;
    图像处理单元,用于针对每个四边形,根据所述四边形的坐标信息,通过高斯运算,计算得到所述四边形的可信度,所述可信度用于表征所述四边形作为目标区域的评估结果,所述目标区域用于表征所述目标对象在所述图像中的形态;The image processing unit is used for, for each quadrilateral, according to the coordinate information of the quadrilateral, through Gaussian operation, calculate the credibility of the quadrilateral, and the credibility is used to characterize the quadrilateral as the evaluation result of the target area , the target area is used to represent the shape of the target object in the image;
    所述图像处理单元还用于根据每个四边形的可信度,确定至少一个目标四边形。The image processing unit is further configured to determine at least one target quadrilateral according to the reliability of each quadrilateral.
  20. 根据权利要求19所述的装置,其特征在于,所述图像处理单元具体用于:The device according to claim 19, wherein the image processing unit is specifically configured to:
    针对所述四边形的每个特征,根据所述四边形的坐标信息和与所述特征对应的高斯函数,确定所述特征的可信度,所述四边形包括至少一个特征;For each feature of the quadrilateral, the reliability of the feature is determined according to the coordinate information of the quadrilateral and the Gaussian function corresponding to the feature, and the quadrilateral includes at least one feature;
    对所述至少一个特征的可信度进行求和,得到所述四边形的可信度。The confidence levels of the at least one feature are summed to obtain the confidence levels of the quadrilateral.
  21. 根据权利要求20所述的装置,其特征在于,所述图像处理单元具体用于:The device according to claim 20, wherein the image processing unit is specifically configured to:
    根据所述四边形的坐标信息,确定所述特征的特征值;According to the coordinate information of the quadrilateral, determine the eigenvalue of the feature;
    根据所述特征值和所述高斯函数,得到所述特征的可信度,所述高斯函数包括与所述特征对应的预设参数。The reliability of the feature is obtained according to the feature value and the Gaussian function, where the Gaussian function includes preset parameters corresponding to the feature.
  22. 根据权利要求21所述的装置,其特征在于,所述图像处理单元具体用于:The device according to claim 21, wherein the image processing unit is specifically configured to:
    根据所述四边形的坐标信息,确定所述四边形的面积;determining the area of the quadrilateral according to the coordinate information of the quadrilateral;
    将所述四边形的面积与所述图像的面积的比值作为所述特征的特征值。The ratio of the area of the quadrilateral to the area of the image is used as the feature value of the feature.
  23. 根据权利要求21所述的装置,其特征在于,所述图像处理单元具体用于:The device according to claim 21, wherein the image processing unit is specifically configured to:
    根据所述四边形的坐标信息,得到所述四边形的两条中线的向量;According to the coordinate information of the quadrilateral, the vectors of the two midlines of the quadrilateral are obtained;
    分别确定每条中线的向量与垂直线的夹角,所述垂直线垂直于所述图像的水平边线;Determine the angle between the vector of each midline and the vertical line, the vertical line being perpendicular to the horizontal edge of the image;
    将两个夹角中最小的夹角作为所述特征的特征值。The smallest of the two included angles is taken as the eigenvalue of the feature.
  24. 根据权利要求21所述的装置,其特征在于,所述图像处理单元具体用于:The device according to claim 21, wherein the image processing unit is specifically configured to:
    根据所述四边形的坐标信息,确定所述四边形的四个顶角;According to the coordinate information of the quadrilateral, determine the four vertex angles of the quadrilateral;
    对所述四边形的每两个相邻的顶角进行一次求差运算,得到四个相邻角度差;A difference operation is performed on every two adjacent vertex angles of the quadrilateral to obtain four adjacent angle differences;
    将四个相邻角度差的和作为所述特征的特征值。The sum of four adjacent angle differences is taken as the feature value of the feature.
  25. 根据权利要求21所述的装置,其特征在于,所述图像处理单元具体用于:The device according to claim 21, wherein the image processing unit is specifically configured to:
    根据所述四边形的坐标信息,确定所述四边形的中间位置的坐标,并将所述中间位置的坐标作为所述特征的特征值;所述中间位置的坐标为所述四边形的四个顶点的坐标的平均值,所述坐标信息包括所述四个顶点的坐标。According to the coordinate information of the quadrilateral, determine the coordinates of the middle position of the quadrilateral, and use the coordinates of the middle position as the feature value of the feature; the coordinates of the middle position are the coordinates of the four vertices of the quadrilateral The average value of , and the coordinate information includes the coordinates of the four vertices.
  26. 根据权利要求21至25任一项所述的方法,其特征在于,所述预设参数包括权重、平均值和方差。The method according to any one of claims 21 to 25, wherein the preset parameters include weight, average value and variance.
  27. 根据权利要求21所述的装置,其特征在于,所述图像处理单元具体用于:The device according to claim 21, wherein the image processing unit is specifically configured to:
    获取位姿信息,所述位姿信息用于表征电子设备在采集所述图像时的位置和/或姿态;Obtaining pose information, the pose information is used to characterize the position and/or attitude of the electronic device when the image is collected;
    根据所述位姿信息和所述四边形的坐标信息,确定所述特征的特征值。According to the pose information and the coordinate information of the quadrilateral, the feature value of the feature is determined.
  28. 根据权利要求27所述的装置,其特征在于,所述图像处理单元具体用于:The device according to claim 27, wherein the image processing unit is specifically configured to:
    根据所述位姿信息和投影函数,确定投影重力向量,所述投影重力向量用于表征世界坐标系中的重力向量在所述图像所在的坐标系中的投影;determining a projected gravity vector according to the pose information and the projection function, where the projected gravity vector is used to represent the projection of the gravity vector in the world coordinate system in the coordinate system where the image is located;
    根据所述四边形的坐标信息,得到所述四边形的两条中线的向量;According to the coordinate information of the quadrilateral, the vectors of the two midlines of the quadrilateral are obtained;
    分别确定所述四边形的每条中线的向量与所述投影重力向量的夹角;Determine the angle between the vector of each center line of the quadrilateral and the projected gravity vector respectively;
    将两个夹角中最小的夹角作为所述特征的特征值。The smallest of the two included angles is taken as the eigenvalue of the feature.
  29. 根据权利要求21至25任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 21 to 25, wherein the device further comprises:
    位置获取单元,用于获取定位信息,所述定位信息用于表征电子设备在采集所述图 像时的位置;a position acquisition unit for acquiring positioning information, the positioning information being used to characterize the position of the electronic device when the image is collected;
    参数确定单元,用于根据所述定位信息,确定所述图像的拍摄场景;a parameter determination unit, configured to determine the shooting scene of the image according to the positioning information;
    所述参数确定单元还用于根据所述拍摄场景,确定对应的参数组,所述参数组包括至少一个特征对应的预设参数。The parameter determination unit is further configured to determine a corresponding parameter group according to the shooting scene, where the parameter group includes preset parameters corresponding to at least one feature.
  30. 根据权利要求21至25任一项所述的装置,其特征在于,所述装置还包括:接收单元;The device according to any one of claims 21 to 25, wherein the device further comprises: a receiving unit;
    所述接收单元用于接收用户输入的拍摄场景;The receiving unit is configured to receive a shooting scene input by a user;
    所述参数确定单元还用于根据所述拍摄场景,确定对应的参数组,所述参数组包括至少一个特征对应的预设参数。The parameter determination unit is further configured to determine a corresponding parameter group according to the shooting scene, where the parameter group includes preset parameters corresponding to at least one feature.
  31. 根据权利要求19至25任一项所述的装置,其特征在于,所述图像识别单元具体用于:The device according to any one of claims 19 to 25, wherein the image recognition unit is specifically configured to:
    识别得到所述图像中的至少一个候选图形,所述候选图形由四条线段组成;Identify at least one candidate graphic in the image, and the candidate graphic is composed of four line segments;
    针对每个候选图形,在所述候选图形满足第一预设条件时,确定所述候选图形为所述四边形,并得到所述四边形的坐标信息。For each candidate graphic, when the candidate graphic satisfies the first preset condition, it is determined that the candidate graphic is the quadrilateral, and the coordinate information of the quadrilateral is obtained.
  32. 根据权利要求31所述的装置,其特征在于,所述第一预设条件包括以下至少一项:The device according to claim 31, wherein the first preset condition comprises at least one of the following:
    所述候选图形的两个第一夹角均小于第一预设值,所述第一夹角为所述四条线段中任意两条不相邻的线段的夹角;The two first included angles of the candidate graphics are both smaller than the first preset value, and the first included angle is the included angle of any two non-adjacent line segments in the four line segments;
    或者,or,
    所述候选图形的四个第二夹角均大于第二预设值,所述第二夹角为所述四条线段中任意两条相邻的线段的夹角;The four second included angles of the candidate graphics are all greater than the second preset value, and the second included angle is the included angle of any two adjacent line segments in the four line segments;
    或者,or,
    所述候选图形的面积比例大于第三预设值,所述面积比例为所述候选图形的面积与所述图像的面积的比值。The area ratio of the candidate graphic is greater than a third preset value, and the area ratio is a ratio of the area of the candidate graphic to the area of the image.
  33. 根据权利要求31所述的装置,其特征在于,所述图像识别单元具体用于:The device according to claim 31, wherein the image recognition unit is specifically used for:
    识别得到所述图像中的多条线段;Identifying a plurality of line segments in the image;
    将所述多条线段中的每四条线段进行组合,得到所述至少一个候选图形。Combining every four line segments of the plurality of line segments to obtain the at least one candidate figure.
  34. 根据权利要求33所述的装置,其特征在于,所述图像识别单元具体用于:The device according to claim 33, wherein the image recognition unit is specifically used for:
    确定所述多条线段中处于同一直线的至少两条线段;determining at least two line segments in the same straight line among the plurality of line segments;
    针对所述至少两条线段中的每两条线段,在所述两条线段满足第二预设条件时,合并所述两条线段。For each of the at least two line segments, when the two line segments satisfy a second preset condition, the two line segments are merged.
  35. 根据权利要求34所述的装置,其特征在于,所述第二预设条件包括:The device according to claim 34, wherein the second preset condition comprises:
    所述两条线段存在部分重叠;The two line segments partially overlap;
    或者,所述两条线段中的任意一条线段被另一条线段覆盖;Or, any one of the two line segments is covered by another line segment;
    或者,所述两条线段之间的距离小于第四预设值。Alternatively, the distance between the two line segments is less than a fourth preset value.
  36. 根据权利要求19至25任一项所述的装置,其特征在于,所述图像处理单元具体用于:The device according to any one of claims 19 to 25, wherein the image processing unit is specifically configured to:
    对所述至少一个四边形,按照每个四边形的可信度的高低进行排序,将可信度最高的n个四边形作为所述至少一个目标四边形,n≥1;Sort the at least one quadrilateral according to the reliability of each quadrilateral, and use the n quadrilaterals with the highest reliability as the at least one target quadrilateral, where n≥1;
    或者,or,
    针对所述至少一个四边形中的每个四边形,在所述四边形的可信度大于预设阈值时,确定所述四边形为目标四边形。For each quadrilateral in the at least one quadrilateral, when the reliability of the quadrilateral is greater than a preset threshold, the quadrilateral is determined to be the target quadrilateral.
  37. 一种电子设备,其特征在于,包括:处理器和存储器,该存储器用于存储计算机程序,所述处理器用于调用并运行所述存储器中存储的计算机程序,执行如权利要求1至19中任一项所述的方法。An electronic device, characterized in that it comprises: a processor and a memory, the memory is used to store a computer program, the processor is used to call and run the computer program stored in the memory, and execute any one of claims 1 to 19. one of the methods described.
  38. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序 使得计算机执行如权利要求1至19中任一项所述的方法。A computer-readable storage medium, characterized by being used for storing a computer program, the computer program causing a computer to perform the method according to any one of claims 1 to 19.
  39. 一种计算机程序产品,其特征在于,包括计算机程序指令,该计算机程序指令使得计算机执行如权利要求1至19中任一项所述的方法。A computer program product comprising computer program instructions, the computer program instructions causing a computer to perform the method of any one of claims 1 to 19.
  40. 一种计算机程序,其特征在于,所述计算机程序使得计算机执行如权利要求1至19中任一项所述的方法。A computer program, characterized in that the computer program causes a computer to perform the method according to any one of claims 1 to 19.
PCT/CN2020/124113 2020-10-27 2020-10-27 Image processing method and apparatus, device, and storage medium WO2022087846A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/124113 WO2022087846A1 (en) 2020-10-27 2020-10-27 Image processing method and apparatus, device, and storage medium
CN202080103272.8A CN115885314A (en) 2020-10-27 2020-10-27 Image processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/124113 WO2022087846A1 (en) 2020-10-27 2020-10-27 Image processing method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2022087846A1 true WO2022087846A1 (en) 2022-05-05

Family

ID=81381637

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124113 WO2022087846A1 (en) 2020-10-27 2020-10-27 Image processing method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115885314A (en)
WO (1) WO2022087846A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152382A (en) * 2023-03-06 2023-05-23 清华大学 Digital representation conversion method and device of structural floor plan and electronic equipment
CN117274366A (en) * 2023-11-22 2023-12-22 合肥晶合集成电路股份有限公司 Line edge distance determining method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005122328A (en) * 2003-10-14 2005-05-12 Casio Comput Co Ltd Photographing apparatus, image processing method and program thereof
US7065261B1 (en) * 1999-03-23 2006-06-20 Minolta Co., Ltd. Image processing device and image processing method for correction of image distortion
CN101248454A (en) * 2005-08-25 2008-08-20 株式会社理光 Image processing method and image processor, digital camera equipment, and recording medium with image processing program stored thereon
CN106780964A (en) * 2016-12-06 2017-05-31 深圳怡化电脑股份有限公司 A kind of method and device for correcting banknote image
CN108665495A (en) * 2017-03-30 2018-10-16 展讯通信(上海)有限公司 Image processing method and device, mobile terminal
CN110136156A (en) * 2018-02-02 2019-08-16 北京三快在线科技有限公司 A kind of polygonal region detection method and device
CN110689501A (en) * 2019-09-29 2020-01-14 京东方科技集团股份有限公司 Distortion correction method and device, electronic equipment and computer readable storage medium
CN111108515A (en) * 2019-12-27 2020-05-05 威创集团股份有限公司 Picture target point correcting method, device and equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7065261B1 (en) * 1999-03-23 2006-06-20 Minolta Co., Ltd. Image processing device and image processing method for correction of image distortion
JP2005122328A (en) * 2003-10-14 2005-05-12 Casio Comput Co Ltd Photographing apparatus, image processing method and program thereof
CN101248454A (en) * 2005-08-25 2008-08-20 株式会社理光 Image processing method and image processor, digital camera equipment, and recording medium with image processing program stored thereon
CN106780964A (en) * 2016-12-06 2017-05-31 深圳怡化电脑股份有限公司 A kind of method and device for correcting banknote image
CN108665495A (en) * 2017-03-30 2018-10-16 展讯通信(上海)有限公司 Image processing method and device, mobile terminal
CN110136156A (en) * 2018-02-02 2019-08-16 北京三快在线科技有限公司 A kind of polygonal region detection method and device
CN110689501A (en) * 2019-09-29 2020-01-14 京东方科技集团股份有限公司 Distortion correction method and device, electronic equipment and computer readable storage medium
CN111108515A (en) * 2019-12-27 2020-05-05 威创集团股份有限公司 Picture target point correcting method, device and equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152382A (en) * 2023-03-06 2023-05-23 清华大学 Digital representation conversion method and device of structural floor plan and electronic equipment
CN116152382B (en) * 2023-03-06 2023-10-20 清华大学 Digital representation conversion method and device of structural floor plan and electronic equipment
CN117274366A (en) * 2023-11-22 2023-12-22 合肥晶合集成电路股份有限公司 Line edge distance determining method and device
CN117274366B (en) * 2023-11-22 2024-02-20 合肥晶合集成电路股份有限公司 Line edge distance determining method and device

Also Published As

Publication number Publication date
CN115885314A (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN112348815B (en) Image processing method, image processing apparatus, and non-transitory storage medium
US11010967B2 (en) Three dimensional content generating apparatus and three dimensional content generating method thereof
US11113819B2 (en) Graphical fiducial marker identification suitable for augmented reality, virtual reality, and robotics
CN107993216B (en) Image fusion method and equipment, storage medium and terminal thereof
WO2020063744A1 (en) Face detection method and device, service processing method, terminal device, and storage medium
US7554575B2 (en) Fast imaging system calibration
US11521311B1 (en) Collaborative disparity decomposition
JP6491517B2 (en) Image recognition AR device, posture estimation device, and posture tracking device
KR101165415B1 (en) Method for recognizing human face and recognizing apparatus
WO2019035155A1 (en) Image processing system, image processing method, and program
CN109937434B (en) Image processing method, device, terminal and storage medium
WO2022087846A1 (en) Image processing method and apparatus, device, and storage medium
CN109816628B (en) Face evaluation method and related product
CN110852132B (en) Two-dimensional code space position confirmation method and device
CN107742316B (en) Image splicing point acquisition method and acquisition device
US20180061135A1 (en) Image display apparatus and image display method
WO2021049281A1 (en) Image processing device, head-mounted display, and spatial information acquisition method
CN112258435A (en) Image processing method and related product
CN112615993A (en) Depth information acquisition method, binocular camera module, storage medium and electronic equipment
CN112016495A (en) Face recognition method and device and electronic equipment
CN113837017B (en) Cosmetic progress detection method, device, equipment and storage medium
WO2019033510A1 (en) Method for recognizing vr application program, and electronic device
WO2022099492A1 (en) Image processing method, apparatus and device, and storage medium
CN113837020B (en) Cosmetic progress detection method, device, equipment and storage medium
CN109544659B (en) Schematic diagram generation method and 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: 20959010

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20959010

Country of ref document: EP

Kind code of ref document: A1