Image enhancement method and device, electronic equipment, storage medium and program product

By processing the concavity and convexity information of the depth image of the target object, the intuitiveness of the image is enhanced, which solves the problems of low accuracy and long time consumption of the original image annotation acquired by the imaging device, and improves the efficiency of image annotation and the accuracy of defect detection.

CN114972099BActive Publication Date: 2025-11-25SENSETIME GRP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210614243.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-11-25
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

The raw images (such as grayscale images and depth images) acquired by imaging equipment are not very intuitive, resulting in low accuracy and long time consumption for annotators.

Method used

By obtaining a depth image of the target object, the surface texture information is determined, and image enhancement is performed on the image to be enhanced based on the texture information to obtain an enhanced image.

Benefits of technology

It improves the accuracy and efficiency of image annotation, enhances visual perception of potential defect areas, reduces the difficulty of image annotation, and improves the accuracy of defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972099B_ABST
    Figure CN114972099B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image enhancement method and device, electronic equipment, storage medium and program product. The method comprises: obtaining a depth image corresponding to a target object; determining a target surface of the target object; determining concave-convex information of the target surface according to the depth image, wherein the concave-convex information represents information of a concave part and / or a convex part of the target surface; and performing image enhancement on a to-be-enhanced image corresponding to the target object based on the concave-convex information to obtain an enhanced image corresponding to the target object.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer technology, and particularly relates to an image enhancement method and device, electronic equipment, storage medium and program product. BACKGROUND

[0002] For training of a computer vision related model, image labeling is usually an indispensable link. Generally, in the initial training stage of the model, and in the optimization training stage of the model after the model is put into use for a period of time, image labeling is indispensable. However, the original image (such as a gray image, a depth image, etc.) collected by an imaging device is usually not intuitive, and thus is not conducive to labeling by a labeler. If the labeler directly labels the original image collected by the imaging device, the accuracy is low and the time consumption is long. SUMMARY

[0003] The present disclosure provides an image enhancement technical solution.

[0004] According to an aspect of the present disclosure, an image enhancement method is provided, comprising:

[0005] obtaining a depth image corresponding to a target object;

[0006] determining a target surface of the target object;

[0007] determining, according to the depth image, concave-convex information of the target surface, wherein the concave-convex information represents information of a concave part and / or a convex part of the target surface;

[0008] performing image enhancement on a to-be-enhanced image corresponding to the target object based on the concave-convex information, to obtain an enhanced image corresponding to the target object.

[0009] In a possible implementation manner, the determining, according to the depth image, of the concave-convex information of the target surface comprises:

[0010] determining a fitting plane corresponding to the target surface according to the depth image;

[0011] determining the concave-convex information of the target surface according to a difference between depth values of corresponding pixels in the target surface and the fitting plane.

[0012] In a possible implementation manner, the determining, according to the depth image, of the fitting plane corresponding to the target surface comprises:

[0013] determining gradient values of pixels of the target surface in a preset direction according to the depth image;

[0014] determine a plurality of target points for fitting a plane from the target surface according to pixels corresponding to a gradient value that occurs most frequently or has the highest frequency in gradient values of pixels of the target surface in the preset direction;

[0015] perform plane fitting according to depth values of the plurality of target points to obtain a fitting plane corresponding to the target surface.

[0016] In a possible implementation, the preset direction is an X-axis direction or a Y-axis direction of a plane coordinate system corresponding to the target surface, where a coordinate plane of the plane coordinate system corresponding to the target surface is parallel to the target surface.

[0017] In a possible implementation, the determining the target surface of the target object includes:

[0018] determine position information of a weld seam of the target object;

[0019] determine two target surfaces of the target object according to position information of the weld seam, where the two target surfaces are object surfaces on two sides of the weld seam.

[0020] In a possible implementation, the image to be enhanced includes a grayscale image corresponding to the target object.

[0021] The image enhancement based on the concave-convex information on the image to be enhanced corresponding to the target object to obtain an enhanced image corresponding to the target object includes:

[0022] perform image enhancement on the grayscale image based on the concave-convex information to obtain an enhanced image corresponding to the target object.

[0023] In a possible implementation, the image enhancement based on the concave-convex information on the grayscale image to obtain an enhanced image corresponding to the target object includes:

[0024] obtain a gradient image corresponding to the target object;

[0025] perform image enhancement on the grayscale image based on the concave-convex information and the gradient image to obtain an enhanced image corresponding to the target object.

[0026] In a possible implementation, the obtaining the gradient image corresponding to the target object includes at least one of the following:

[0027] obtain an X-axis direction gradient image corresponding to the target object according to gradients of pixels in the X-axis direction of a plane coordinate system corresponding to the target surface in the depth image;

[0028] According to a gradient of a pixel in the depth image in a Y-axis direction of a plane coordinate system corresponding to the target surface, a gradient image in the Y-axis direction corresponding to the target object is obtained.

[0029] In a possible implementation, the image enhancement is performed on the gray-scale image based on the concave-convex information and the gradient image to obtain an enhanced image corresponding to the target object, including:

[0030] The concave-convex information is mapped to a first preset pixel value interval to obtain mapped concave-convex information.

[0031] The pixel value of the gradient image is mapped to a second preset pixel value interval to obtain a mapped gradient image.

[0032] The image enhancement is performed on the gray-scale image based on the mapped concave-convex information and the mapped gradient image to obtain the enhanced image corresponding to the target object.

[0033] In a possible implementation, the image to be enhanced includes a gradient image corresponding to the target object.

[0034] The image enhancement is performed on the image to be enhanced corresponding to the target object based on the concave-convex information to obtain the enhanced image corresponding to the target object, including:

[0035] The image enhancement is performed on the gradient image based on the concave-convex information to obtain the enhanced image corresponding to the target object.

[0036] In a possible implementation, the target object includes a battery.

[0037] The target surface of the target object is determined, including:

[0038] Position information of a top cover weld of the battery is determined, and according to the position information of the top cover weld, battery surfaces on both sides of the top cover weld are determined as two target surfaces of the battery, respectively.

[0039] According to an aspect of the present disclosure, an image enhancement device is provided, including:

[0040] An obtaining module is configured to obtain a depth image corresponding to a target object.

[0041] A first determining module is configured to determine a target surface of the target object.

[0042] A second determining module is configured to determine, according to the depth image, concave-convex information of the target surface, wherein the concave-convex information represents information of a concave part and / or a convex part of the target surface.

[0043] An image enhancement module is configured to perform image enhancement on a to-be-enhanced image corresponding to the target object based on the concave-convex information, to obtain an enhanced image corresponding to the target object.

[0044] In a possible implementation, the second determining module is configured to:

[0045] determine a fitting plane corresponding to the target surface according to the depth image;

[0046] determine concave-convex information of the target surface according to a difference between depth values of corresponding pixels in the target surface and the fitting plane.

[0047] In a possible implementation, the second determining module is configured to:

[0048] determine a gradient value of a pixel of the target surface in a preset direction according to the depth image;

[0049] determine a plurality of target points for fitting a plane from the target surface according to a pixel corresponding to a gradient value that appears most frequently or has the highest frequency in the gradient values of the pixel of the target surface in the preset direction;

[0050] perform plane fitting according to depth values of the plurality of target points, to obtain a fitting plane corresponding to the target surface.

[0051] In a possible implementation, the preset direction is an X-axis direction or a Y-axis direction of a plane coordinate system corresponding to the target surface, wherein a coordinate plane of the plane coordinate system corresponding to the target surface is parallel to the target surface.

[0052] In a possible implementation, the first determining module is configured to:

[0053] determine position information of a weld seam of the target object;

[0054] determine two target surfaces of the target object according to the position information of the weld seam, the two target surfaces being surfaces of objects on two sides of the weld seam, respectively.

[0055] In a possible implementation, the to-be-enhanced image includes a grayscale image corresponding to the target object.

[0056] The image enhancement module is configured to:

[0057] perform image enhancement on the grayscale image based on the concave-convex information, to obtain an enhanced image corresponding to the target object.

[0058] In a possible implementation, the image enhancement module is configured to:

[0059] obtain a gradient image corresponding to the target object;

[0060] perform image enhancement on the grayscale image based on the concave-convex information and the gradient image, to obtain an enhanced image corresponding to the target object.

[0061] In a possible implementation, the image enhancement module is configured to perform at least one of the following:

[0062] obtain a gradient image corresponding to the target object;

[0063] obtain a gradient image corresponding to the target object;

[0064] In a possible implementation, the image enhancement module is configured to perform at least one of the following:

[0065] map the concave-convex information to a first preset pixel value interval to obtain mapped concave-convex information;

[0066] map pixel values of the gradient image to a second preset pixel value interval to obtain a mapped gradient image;

[0067] perform image enhancement on the grayscale image based on the mapped concave-convex information and the mapped gradient image, to obtain an enhanced image corresponding to the target object.

[0068] In a possible implementation, the image to be enhanced is a gradient image corresponding to the target object;

[0069] The image enhancement module is configured to perform at least one of the following:

[0070] perform image enhancement on the grayscale image based on the concave-convex information and the gradient image, to obtain an enhanced image corresponding to the target object.

[0071] In a possible implementation, the target object is a battery;

[0072] The first determination module is configured to determine position information of a top cover weld of the battery, and determine battery surfaces on two sides of the top cover weld as two target surfaces of the battery respectively according to the position information of the top cover weld.

[0073] According to an aspect of the present disclosure, an electronic device is provided, including: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to invoke the executable instructions stored in the memory to perform the above method.

[0074] According to an aspect of the present disclosure, a computer readable storage medium is provided, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the method described above.

[0075] According to an aspect of the present disclosure, a computer program product is provided, which includes computer readable code or a non-volatile computer readable storage medium carrying computer readable code, and when the computer readable code is run in an electronic device, a processor in the electronic device executes the method described above.

[0076] In the embodiments of the present disclosure, by obtaining a depth image corresponding to a target object, a target surface of the target object is determined, the concave-convex information of the target surface is determined according to the depth image, and the image enhancement is performed on a to-be-enhanced image corresponding to the target object based on the concave-convex information, so as to obtain an enhanced image corresponding to the target object. Thus, the image enhancement is performed based on the concave-convex information of the target surface of the target object, the visual perception of the potential defect area of the target object can be enhanced, the potential defect area of the target object is more intuitive, and thus the difficulty of image annotation on the image corresponding to the target object is reduced, the problem of low accuracy and long time caused by the annotation personnel directly annotating the original image collected by the imaging device is solved, and thus the efficiency and accuracy of image annotation on the image corresponding to the target object are improved, and / or the accuracy of defect detection on the target object is improved.

[0077] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, rather than limiting the present disclosure.

[0078] Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0079] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the technical solutions of the present disclosure together with the specification.

[0080] Figure 1 A flowchart of an image enhancement method provided by an embodiment of the present disclosure is shown.

[0081] Figure 2a A schematic diagram of a gray-scale image corresponding to a new energy automobile battery in an image enhancement method provided by an embodiment of the present disclosure is shown.

[0082] Figure 2b A schematic diagram of a depth image corresponding to a new energy automobile battery in an image enhancement method provided by an embodiment of the present disclosure is shown.

[0083] Figure 2c FIG. 2 shows a schematic diagram of a gradient image in the X-axis direction corresponding to a new energy vehicle battery according to an embodiment of the present disclosure.

[0084] Figure 2d FIG. 3 shows a schematic diagram of an enhanced image synthesized by a gray scale image corresponding to a new energy vehicle battery, a gradient image in the X-axis direction after mapping, and a concave-convex representation image after mapping according to an embodiment of the present disclosure.

[0085] Figure 2e FIG. 4 shows a schematic diagram of an enhanced image synthesized by a gradient image in the X-axis direction after mapping, a gradient image in the Y-axis direction after mapping, and a concave-convex representation image after mapping corresponding to a new energy vehicle battery according to an embodiment of the present disclosure.

[0086] Figure 3 FIG. 5 shows a block diagram of an image enhancement device according to an embodiment of the present disclosure.

[0087] Figure 4 FIG. 6 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0088] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in different drawings denote the same or similar elements. Although various aspects of the embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless specifically indicated.

[0089] The term "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations.

[0090] The term "and / or" used herein is merely used to describe associated objects, and can represent three meanings, for example, A and / or B can mean that there are three cases of A alone, A and B, and B alone. In addition, the term "at least one of" used herein means any one of the plurality of or any combination of at least two of the plurality of, for example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0091] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following detailed description. Those skilled in the art will understand that the present disclosure can be implemented without certain specific details. In some examples, methods, means, elements and circuits well known to those skilled in the art are not described in detail in order to highlight the main idea of the present disclosure.

[0092] In an industrial scenario, two-dimensional (2D) cameras and / or three-dimensional (3D) cameras are usually used to collect image data required for labeling. Among them, a two-dimensional camera can be used to collect a grayscale image, and a three-dimensional camera can be used to collect point cloud data. In the related art, the grayscale image or the point cloud data is usually directly labeled. Since the information provided by the grayscale image is less intuitive, and the point cloud data has less direct visual meaning, labeling the grayscale image or the point cloud data is usually difficult and time-consuming.

[0093] The related art also has a method of color space conversion for the grayscale image, such as conversion to a Hue-Saturation-Value (HSV) color space, a Luminance-Chrominance red-Chrominance blue (YCrCb) color space, and the like, and then visualizing. However, the effect of this way is usually not good.

[0094] To solve the technical problems similar to the above, the embodiments of the present disclosure provide an image enhancement method and device, electronic equipment, storage medium and program product, which obtain a depth image corresponding to a target object, determine a target surface of the target object, determine concave-convex information of the target surface according to the depth image, and perform image enhancement on a to-be-enhanced image corresponding to the target object based on the concave-convex information, to obtain an enhanced image corresponding to the target object. Thus, the image enhancement is performed based on the concave-convex information of the target surface of the target object, the visual perception can be enhanced for the potential defect area of the target object, the potential defect area of the target object is more intuitive, which helps to reduce the difficulty of image labeling for the image corresponding to the target object, solves the problem of low accuracy and long time caused by labeling personnel directly labeling the original image collected by the imaging device, and further helps to improve the efficiency and accuracy of image labeling for the image corresponding to the target object, and / or helps to improve the accuracy of defect detection for the target object.

[0095] The image enhancement method provided by the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0096] Figure 1A flowchart of an image enhancement method provided by an embodiment of the present disclosure is shown. In a possible implementation manner, an execution subject of the image enhancement method can be an image enhancement apparatus, for example, the image enhancement method can be executed by a terminal device or a server or other electronic device. Wherein, the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, or a wearable device, etc. In some possible implementation manners, the image enhancement method can be realized by a processor calling computer readable instructions stored in a memory. As shown in Figure 1 The image enhancement method includes steps S11 to S14.

[0097] In step S11, a depth image corresponding to a target object is obtained.

[0098] In step S12, a target surface of the target object is determined.

[0099] In step S13, according to the depth image, concave-convex information of the target surface is determined, wherein the concave-convex information represents information of concave and / or convex parts of the target surface.

[0100] In step S14, based on the concave-convex information, an image enhancement is performed on an image to be enhanced corresponding to the target object to obtain an enhanced image corresponding to the target object.

[0101] In an embodiment of the present disclosure, the target object can be an article or a component of an article, for example, it can be any object that needs quality inspection. For example, any object of industrial quality inspection can be taken as the target object. For example, the target object can be a battery (for example, a new energy automobile battery), a mechanical component of a car, a general industrial product (for example, shoes, a water cup, a textile product), an electronic product (for example, a mobile phone, a computer, a smart watch), etc., which is not limited here.

[0102] The depth image corresponding to the target object can be directly obtained by acquisition, or can be obtained by conversion and / or processing of the three-dimensional image data. In a possible implementation, point cloud data corresponding to the target object can be obtained, and the point cloud data is converted into a depth image corresponding to the target object. In another possible implementation, the depth image corresponding to the target object can be directly obtained by acquisition. In a case where different dimensions of pixels in the three-dimensional image data obtained by the three-dimensional camera represent different actual distances, corresponding conversion is needed to obtain the depth image. For example, the line scan resolution of the three-dimensional camera is (0.016, 0.03, 0.0002), where the actual distance represented by each pixel unit in the X-axis direction of the three-dimensional image data obtained by the three-dimensional camera is 0.016 millimeters, the actual distance represented by each pixel unit in the Y-axis direction of the three-dimensional image data obtained by the three-dimensional camera is 0.03 millimeters, and the actual distance represented by each pixel unit in the Z-axis direction of the three-dimensional image data obtained by the three-dimensional camera is 0.0002 millimeters. After obtaining the three-dimensional image data obtained by the three-dimensional camera, the three-dimensional image data obtained by the three-dimensional camera can be converted to the actual distance scale space according to the line scan resolution of the three-dimensional camera to obtain the depth image.

[0103] In the embodiments of the present disclosure, the target surface of the target object can be determined based on the first image. The first image can be a to-be-enhanced image corresponding to the target object, can be the depth image, or can be an image other than the to-be-enhanced image and the depth image. The to-be-enhanced image can represent an image of the target object that needs to be enhanced. For example, the to-be-enhanced image can be a grayscale image, a red-green-blue (RGB) image, or a gradient image of the target object, without limitation. In an example, the to-be-enhanced image can also be the depth image. The target surface can represent a surface of the target object that needs to be labeled and / or detected for defects. The number of target surfaces can be one or more than two.

[0104] In a case where the first image is an image other than the depth image, after determining the position information of the target surface of the target object in the first image, the position information of the target surface of the target object in the depth image can be determined according to the mapping relationship between the pixels in the first image and the pixels in the depth image.

[0105] In a possible implementation, the determining the target surface of the target object includes: determining position information of a weld seam of the target object; and determining object surfaces on two sides of the weld seam as two target surfaces of the target object respectively according to the position information of the weld seam. In this implementation, the weld seam of the target object can be any weld seam of the target object surface.

[0106] As an example of this implementation, a first neural network for weld seam identification can be pre-trained. After the first neural network is trained, the first image can be input into the first neural network, and position information of a weld seam in the first image can be identified via the first neural network. In this example, weld seam identification of the first image via the first neural network can improve the accuracy and speed of weld seam identification.

[0107] As another example of this implementation, the position information of the weld seam of the target object in the first image can be determined according to a click position of a user in the first image. In this example, the position of the weld seam can be selected by the user.

[0108] As another example of this implementation, when the first image is acquired with the weld seam as a center line, position information of the center line of the first image can be determined as the position information of the weld seam of the target object in the first image.

[0109] As an example of this implementation, a second neural network for target surface identification can be pre-trained. After the second neural network is trained, the first image and the position information of the weld seam can be input into the second neural network, and position information of a target surface of the target object can be determined via the second neural network. In this example, target surface identification based on the first image and the weld seam via the second neural network can improve the accuracy and speed of target surface identification.

[0110] As another example of this implementation, after the position information of the weld seam is determined, the position information of the target surface of the target object can be determined according to the position information of the weld seam and a click position of a user in the first image, where the weld seam is an edge of the target surface, and the click position is on the target surface.

[0111] In one example, the target object is a new energy automobile battery. Position information of a top cover weld seam of the new energy automobile battery can be determined, and battery surfaces on two sides of the top cover weld seam can be determined as target surfaces of the new energy automobile battery respectively according to the position information of the top cover weld seam.

[0112] In the implementation, by determining the position information of the weld of the target object, and determining the object surfaces on both sides of the weld as two target surfaces of the target object according to the position information of the weld, the surface with possible defects can be efficiently and accurately determined as the target surface, and the probability of determining other surfaces in the image as the target surface can be reduced, thereby facilitating to improve the efficiency of image enhancement processing, and reducing the interference of unnecessary image enhancement on defect labeling and / or defect detection.

[0113] In another possible implementation, a third neural network for identifying the target surface can be pre-trained. After the third neural network is trained, the first image can be input into the third neural network to identify the position information of the target surface in the first image via the third neural network. In this implementation, the target surface identification can be performed on the first image via the third neural network, and the accuracy and speed of the target surface identification can be improved.

[0114] In another possible implementation, plane identification can be performed based on the click position of the user in the first image to determine the object surface on which the click position is located as the target surface.

[0115] In another possible implementation, the object surface framed by the user in the first image can be determined as the target surface.

[0116] In the embodiments of the present disclosure, the concave-convex information can be used to indicate the concave part and / or the convex part of the target surface. The concave-convex information can include the position information of the concave part and / or the convex part of the target surface, and can also include the depth information of the concave part and / or the height information of the convex part of the target surface. In one possible implementation, the concave-convex information can include the information of the concave part and the information of the convex part of the target surface. For example, the concave-convex information can include the position information and the depth information of the concave part of the target surface, and the position information and the height information of the convex part of the target surface. In another possible implementation, the concave-convex information can include the information of the concave part of the target surface. For example, the concave-convex information can include the position information and the depth information of the concave part of the target surface. In another possible implementation, the concave-convex information can include the information of the convex part of the target surface. For example, the concave-convex information can include the position information and the height information of the convex part of the target surface.

[0117] In one possible implementation, the concave-convex information can be represented by a concave-convex representation image, where the concave-convex representation image can be an image for representing the information of the concave part and / or the convex part of the target surface. For example, the concave-convex representation image can represent the position information of the concave part and / or the convex part of the target surface, and can also represent the depth information of the concave part and / or the height information of the convex part of the target surface.

[0118] As an example of this implementation, the size of the concave-convex representation image can be the same as the size of the depth image. In one example, in the concave-convex representation image, the pixel value of a pixel belonging to a concave part of the target surface can be a positive value, the pixel value of a pixel belonging to a convex part of the target surface can be a negative value, the pixel value of a pixel in a region of the target surface other than the concave part and the convex part can be 0, and the pixel value of a pixel in a region other than the target surface can be 0 or empty. In this example, the magnitude of the pixel value of any pixel belonging to the concave part of the target surface can be positively correlated with the depth corresponding to the pixel; the magnitude of the absolute value of the pixel value of any pixel belonging to the convex part of the target surface can be positively correlated with the height corresponding to the pixel. In another example, in the concave-convex representation image, the pixel value of a pixel belonging to a concave part of the target surface can be a negative value, the pixel value of a pixel belonging to a convex part of the target surface can be a positive value, the pixel value of a pixel in a region of the target surface other than the concave part and the convex part can be 0, and the pixel value of a pixel in a region other than the target surface can be 0 or empty. In this example, the absolute value of the pixel value of any pixel belonging to the concave part of the target surface can be positively correlated with the depth corresponding to the pixel; the magnitude of the pixel value of any pixel belonging to the convex part of the target surface can be positively correlated with the height corresponding to the pixel.

[0119] As another example of this implementation, the size of the concave-convex representation image can be the same as the size of the target surface. In one example, in the concave-convex representation image, the pixel value of a pixel belonging to a concave part of the target surface can be a positive value, the pixel value of a pixel belonging to a convex part of the target surface can be a negative value, and the pixel value of a pixel in a region of the target surface other than the concave part and the convex part can be 0. In this example, the magnitude of the pixel value of any pixel belonging to the concave part of the target surface can be positively correlated with the depth corresponding to the pixel; the magnitude of the absolute value of the pixel value of any pixel belonging to the convex part of the target surface can be positively correlated with the height corresponding to the pixel. In another example, in the concave-convex representation image, the pixel value of a pixel belonging to a concave part of the target surface can be a negative value, the pixel value of a pixel belonging to a convex part of the target surface can be a positive value, and the pixel value of a pixel in a region of the target surface other than the concave part and the convex part can be 0. In this example, the absolute value of the pixel value of any pixel belonging to the concave part of the target surface can be positively correlated with the depth corresponding to the pixel; the magnitude of the pixel value of any pixel belonging to the convex part of the target surface can be positively correlated with the height corresponding to the pixel.

[0120] In other possible implementations, the concave-convex information can also be represented in the form of a matrix, an array, or the like, and the present disclosure does not limit the data form of the concave-convex information.

[0121] In a possible implementation, the concave-convex information of the target surface is determined according to the depth image, including: determining a fitting plane corresponding to the target surface according to the depth image; and determining the concave-convex information of the target surface according to a difference between depth values of corresponding pixels in the target surface and the fitting plane.

[0122] In this implementation, the depth values of a plurality of points of the target surface can be obtained from the depth image, and a fitting plane corresponding to the target surface is obtained by fitting a plane according to the depth values of the plurality of points.

[0123] In this implementation, for a pixel A in the fitting plane, the normal N of the fitting plane is determined based on a point where the pixel A is located. A The point where the pixel A is located is on the normal N. A The normal N A The pixel B where the intersection of the target surface and the normal N is located is the pixel corresponding to the pixel A in the target surface. In this way, the corresponding relationship between the target surface and each pixel in the fitting plane can be determined.

[0124] In this implementation, the concave-convex information of the target surface is determined according to a difference between depth values of corresponding pixels in the target surface and the fitting plane. The concave-convex information of the target surface can include the height or depth corresponding to each pixel of the target surface. For any pixel of the target surface, if the difference between the depth value of the pixel and the depth value of the corresponding pixel in the fitting plane is 0, it can be indicated that the pixel does not belong to the concave part or the convex part of the target surface; if the difference between the depth value of the pixel and the depth value of the corresponding pixel in the fitting plane is greater than 0, it can be indicated that the pixel belongs to the convex part of the target surface, i.e., the pixel is in the convex part of the target surface; if the difference between the depth value of the pixel and the depth value of the corresponding pixel in the fitting plane is less than 0, it can be indicated that the pixel belongs to the concave part of the target surface, i.e., the pixel is in the concave part of the target surface.

[0125] In the implementation, in the case that there are at least two target surfaces, for any one of the at least two target surfaces, a fitting plane corresponding to the target surface is determined according to the depth image, and the concave-convex information of the target surface is determined according to the difference between the depth values of the corresponding pixels in the target surface and the fitting plane. That is, in the implementation, in the case that there are at least two target surfaces, the determination of the fitting plane and the concave-convex information is independent for each target surface. For example, the target object is a new energy automobile battery, and the target surfaces of the target object include a battery surface S1 on the left side of a top cover weld of the new energy automobile battery and a battery surface S2 on the right side of the top cover weld. Then, a fitting plane P1 corresponding to the battery surface S1 can be determined according to the depth image, and the concave-convex information C1 of the battery surface S1 can be determined according to the difference between the depth values of the corresponding pixels in the battery surface S1 and the fitting plane P1; a fitting plane P2 corresponding to the battery surface S2 can be determined according to the depth image, and the concave-convex information C2 of the battery surface S2 can be determined according to the difference between the depth values of the corresponding pixels in the battery surface S2 and the fitting plane P2.

[0126] The pixel value range of the pixels of the depth image is generally large, and in the implementation, the fitting plane corresponding to the target surface is determined according to the depth image, and the concave-convex information of the target surface is determined according to the difference between the depth values of the corresponding pixels in the target surface and the fitting plane, so that the concave-convex information with a smaller value range can be obtained, thereby facilitating visualization. In addition, the obtained concave-convex information can highlight the pixels belonging to the concave part and the pixels belonging to the convex part in the target surface, thereby playing a role in highlighting the potential defect area.

[0127] As an example of the implementation, the determination of the fitting plane corresponding to the target surface according to the depth image includes: determining the gradient values of the pixels of the target surface in a preset direction according to the depth image; determining a plurality of target points for fitting a plane from the target surface according to the pixels corresponding to the gradient value with the highest frequency of occurrence or the most number of occurrences in the gradient values of the pixels of the target surface in the preset direction; and performing plane fitting according to the depth values of the plurality of target points to obtain the fitting plane corresponding to the target surface.

[0128] In this example, the preset direction can represent a preset gradient direction. According to the depth image, gradient values of each pixel of the target surface in the preset direction can be determined. According to the gradient values of each pixel of the target surface in the preset direction, the occurrence number or frequency of each gradient value can be counted. On the target surface, most points are on the same plane, and thus, the gradient values of most points in the preset direction are the same. By determining the points corresponding to the pixels corresponding to the gradient value with the highest occurrence number or frequency as target points for fitting a plane, plane fitting can be performed based on the points on the same plane (i.e., neither on a concave part nor on a convex part).

[0129] In one example, the points corresponding to the pixels corresponding to the gradient value with the highest occurrence number can be determined as target points for fitting a plane, and plane fitting can be performed according to the depth values of all or part of the target points to obtain a fitting plane corresponding to the target surface.

[0130] In another example, the points corresponding to the pixels corresponding to the gradient value with the highest occurrence frequency can be determined as target points for fitting a plane, and plane fitting can be performed according to the depth values of all or part of the target points to obtain a fitting plane corresponding to the target surface.

[0131] In this example, by determining the gradient values of the pixels of the target surface in the preset direction according to the depth image, determining a plurality of target points for fitting a plane from the target surface according to the pixels corresponding to the gradient value with the highest occurrence number or frequency among the gradient values of the pixels of the target surface in the preset direction, and performing plane fitting according to the depth values of the plurality of target points to obtain a fitting plane corresponding to the target surface, plane fitting can be performed based on the points on the same plane, and thus, the fitting plane obtained can more accurately represent the target surface and has higher robustness.

[0132] In one example, the preset direction is the X-axis direction or the Y-axis direction of a plane coordinate system corresponding to the target surface, wherein the coordinate plane of the plane coordinate system corresponding to the target surface is parallel to the target surface.

[0133] In this example, after the target surface is determined, a plane coordinate system corresponding to the target surface can be established according to a plane in which the target surface is located. In one example, the plane coordinate system corresponding to the target surface can be established on the plane in which the target surface is located. In this example, the plane coordinate system corresponding to the target surface is on the plane in which the target surface is located. In another example, a plane coordinate system parallel to the plane in which the target surface is located can be established as the plane coordinate system corresponding to the target surface. In this example, the plane coordinate system corresponding to the target surface is not on the plane in which the target surface is located. In this example, when the number of target surfaces is at least two, a corresponding plane coordinate system is established for each target surface.

[0134] In this example, the X-axis direction of the plane coordinate system corresponding to the target surface can be the positive direction of the X-axis of the plane coordinate system corresponding to the target surface, or the negative direction of the X-axis of the plane coordinate system corresponding to the target surface; and the Y-axis direction of the plane coordinate system corresponding to the target surface can be the positive direction of the Y-axis of the plane coordinate system corresponding to the target surface, or the negative direction of the Y-axis of the plane coordinate system corresponding to the target surface.

[0135] In one example, the gradient value of the pixel of the target surface in the X-axis direction of the plane coordinate system corresponding to the target surface can be determined according to the depth image, a plurality of target points for fitting a plane can be determined from the target surface according to the pixel corresponding to the gradient value that appears most frequently or has the highest frequency in the gradient values of the pixel of the target surface in the X-axis direction, and the fitting plane corresponding to the target surface can be obtained by performing plane fitting according to the depth values of the plurality of target points.

[0136] In another example, the gradient value of the pixel of the target surface in the Y-axis direction of the plane coordinate system corresponding to the target surface can be determined according to the depth image, a plurality of target points for fitting a plane can be determined from the target surface according to the pixel corresponding to the gradient value that appears most frequently or has the highest frequency in the gradient values of the pixel of the target surface in the Y-axis direction, and the fitting plane corresponding to the target surface can be obtained by performing plane fitting according to the depth values of the plurality of target points.

[0137] The fitting plane corresponding to the target surface determined according to this example can more accurately represent the plane in which most of the pixels of the target surface are located, thereby more accurately determining the concave-convex information of the target surface.

[0138] In another example, the preset direction is any direction on the coordinate plane of the plane coordinate system corresponding to the target surface. That is, in this example, any direction on the coordinate plane of the plane coordinate system corresponding to the target surface can be taken as the preset direction.

[0139] As another example of this implementation, the determining, according to the depth image, of the fitting plane corresponding to the target surface comprises: randomly selecting a plurality of points of the target surface; and performing plane fitting based on depth values of the randomly selected plurality of points to obtain the fitting plane corresponding to the target surface.

[0140] In another possible implementation, the determining, according to the depth image, of the concave-convex information of the target surface comprises: determining, according to the depth image, a fitting plane corresponding to the target surface; and determining, according to a difference between the fitting plane and a depth value of a corresponding pixel in the target surface, the concave-convex information of the target surface. In this implementation, for any pixel of the target surface, if the difference between the depth value of the pixel and that of a corresponding pixel in the fitting plane is 0, it can be indicated that the pixel does not belong to a concave part or a convex part of the target surface; if the difference between the depth value of the pixel and that of a corresponding pixel in the fitting plane is greater than 0, it can be indicated that the pixel belongs to a concave part of the target surface, i.e., the pixel is in the concave part of the target surface; and if the difference between the depth value of the pixel and that of a corresponding pixel in the fitting plane is less than 0, it can be indicated that the pixel belongs to a convex part of the target surface, i.e., the pixel is in the convex part of the target surface.

[0141] In the embodiments of the present disclosure, after the concave-convex information of the target surface is determined, the to-be-enhanced image corresponding to the target object can be image-enhanced based on the concave-convex information to obtain an enhanced image corresponding to the target object. By image-enhancing the to-be-enhanced image based on the concave-convex information, the contrast of the potential defect area of the target object in the image can be improved, thereby facilitating defect labeling, alleviating visual fatigue of the labeling personnel, and / or facilitating more accurate defect detection.

[0142] In the embodiments of the present disclosure, the to-be-enhanced image corresponding to the target object can be image-enhanced based on only the concave-convex information, or the to-be-enhanced image can be image-enhanced in combination with the concave-convex information and other information, which is not limited herein.

[0143] In a possible implementation, the to-be-enhanced image comprises a grayscale image corresponding to the target object; and the image-enhancing, based on the concave-convex information, of the to-be-enhanced image corresponding to the target object to obtain an enhanced image corresponding to the target object comprises: image-enhancing, based on the concave-convex information, of the grayscale image to obtain the enhanced image corresponding to the target object. In this implementation, the grayscale image can be image-enhanced based on only the concave-convex information, or the grayscale image can be image-enhanced in combination with the concave-convex information and other information, which is not limited herein.

[0144] As an example of the implementation, the concave-convex information is a concave-convex representation image; and the image enhancement of the gray-scale image based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: synthesizing the gray-scale image and the concave-convex representation image to obtain the enhanced image corresponding to the target object. In this example, the gray-scale image can be used as the image of the first channel of the enhanced image, and the concave-convex representation image can be used as the image of the second channel of the enhanced image.

[0145] As an example of the implementation, before the image enhancement of the gray-scale image based on the concave-convex information to obtain the enhanced image corresponding to the target object, the method further comprises: obtaining the gray-scale image corresponding to the target object.

[0146] In one example, the gray-scale image corresponding to the target object can be directly obtained.

[0147] In another example, the red-green-blue image corresponding to the target object can be obtained, and the red-green-blue image corresponding to the target object can be converted into the gray-scale image corresponding to the target object.

[0148] In the implementation, the enhanced image obtained by the image enhancement of the gray-scale image based on the concave-convex information can improve the intuitiveness of the potential defect area of the target object.

[0149] As an example of the implementation, the image enhancement of the gray-scale image based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: obtaining the gradient image corresponding to the target object; and the image enhancement of the gray-scale image based on the concave-convex information and the gradient image to obtain the enhanced image corresponding to the target object.

[0150] In one example, the gradient image corresponding to the target object in a single direction can be obtained, and the image enhancement of the gray-scale image based on the concave-convex information and the gradient image in the direction to obtain the enhanced image corresponding to the target object.

[0151] In another example, the gradient image corresponding to the target object in at least two directions can be obtained, and the image enhancement of the gray-scale image based on the concave-convex information and the gradient image in the at least two directions to obtain the enhanced image corresponding to the target object.

[0152] In this example, the image enhancement of the gray-scale image can be based on only the concave-convex information and the gradient image, and the image enhancement of the gray-scale image can also be based on other information, which is not limited herein.

[0153] In one example, the concave-convex information is a concave-convex representation image; and the image enhancement of the gray-scale image based on the concave-convex information and the gradient image to obtain the enhanced image corresponding to the target object comprises: synthesizing the gray-scale image, the concave-convex representation image and the gradient image to obtain the enhanced image corresponding to the target object. In this example, the gray-scale image can be used as the image of the first channel of the enhanced image, the concave-convex representation image can be used as the image of the second channel of the enhanced image, and the gradient image can be used as the image of the third channel of the enhanced image.

[0154] In this example, the gradient image corresponding to the target object is obtained, and the image enhancement of the gray-scale image based on the concave-convex information and the gradient image to obtain the enhanced image corresponding to the target object, thereby combining the gradient image corresponding to the target object for image enhancement, can provide more detailed information, especially the detailed information at the edge of the image, thereby further reducing the difficulty of defect labeling of the target object, improving the efficiency and accuracy of defect labeling of the target object, and / or further improving the accuracy of defect detection of the target object.

[0155] In one example, the obtaining of the gradient image corresponding to the target object comprises at least one of the following: obtaining an X-axis direction gradient image corresponding to the target object according to the gradient of the pixels in the depth image in the X-axis direction of the plane coordinate system corresponding to the target surface; and obtaining a Y-axis direction gradient image corresponding to the target object according to the gradient of the pixels in the depth image in the Y-axis direction of the plane coordinate system corresponding to the target surface.

[0156] In one example, the concave-convex information is a concave-convex representation image, and the gradient image comprises an X-axis direction gradient image corresponding to the target object; and the image enhancement of the gray-scale image based on the concave-convex information and the gradient image to obtain the enhanced image corresponding to the target object comprises: synthesizing the gray-scale image, the concave-convex representation image and the X-axis direction gradient image to obtain the enhanced image corresponding to the target object. In this example, the gray-scale image can be used as the image of the first channel of the enhanced image, the concave-convex representation image can be used as the image of the second channel of the enhanced image, and the X-axis direction gradient image can be used as the image of the third channel of the enhanced image.

[0157] In another example, the concave-convex information is a concave-convex representation image, and the gradient image includes a gradient image in the Y-axis direction corresponding to the target object; and the image enhancement of the gray-scale image based on the concave-convex information and the gradient image to obtain the enhanced image corresponding to the target object includes: synthesizing the gray-scale image, the concave-convex representation image and the gradient image in the Y-axis direction to obtain the enhanced image corresponding to the target object. In this example, the gray-scale image can be used as an image of a first channel of the enhanced image, the concave-convex representation image can be used as an image of a second channel of the enhanced image, and the gradient image in the Y-axis direction can be used as an image of a third channel of the enhanced image.

[0158] In another example, the concave-convex information is a concave-convex representation image, and the gradient image includes a gradient image in the X-axis direction corresponding to the target object and a gradient image in the Y-axis direction corresponding to the target object; and the image enhancement of the gray-scale image based on the concave-convex information and the gradient image to obtain the enhanced image corresponding to the target object includes: synthesizing the gray-scale image, the concave-convex representation image, the gradient image in the X-axis direction and the gradient image in the Y-axis direction to obtain the enhanced image corresponding to the target object. In this example, the gray-scale image can be used as an image of a first channel of the enhanced image, the concave-convex representation image can be used as an image of a second channel of the enhanced image, the gradient image in the X-axis direction can be used as an image of a third channel of the enhanced image, and the gradient image in the Y-axis direction can be used as an image of a fourth channel of the enhanced image.

[0159] In this example, the gradient image in the X-axis direction corresponding to the target object is obtained according to the gradient of the pixels in the depth image in the X-axis direction of the plane coordinate system corresponding to the target surface, and / or the gradient image in the Y-axis direction corresponding to the target object is obtained according to the gradient of the pixels in the depth image in the Y-axis direction of the plane coordinate system corresponding to the target surface, and the image enhancement of the target object in the X-axis direction and / or the Y-axis direction is combined, so that more detailed information, especially the detailed information at the edges in the image, can be provided, so that the difficulty of defect labeling of the target object can be further reduced, the efficiency and accuracy of defect labeling of the target object can be improved, and / or the accuracy of defect detection of the target object can be further improved.

[0160] In this implementation, at least two channels of images can be used to synthesize the enhanced image corresponding to the target object. For example, three channels of images can be used to synthesize the enhanced image corresponding to the target object. For another example, two channels of images can be used to synthesize the enhanced image corresponding to the target object. For another example, four channels of images can be used to synthesize the enhanced image corresponding to the target object.

[0161] In an example, the image enhancement is performed on the gray-scale image based on the concave-convex information and the gradient image to obtain the enhanced image corresponding to the target object, including: mapping the concave-convex information to a first preset pixel value interval to obtain the mapped concave-convex information; mapping pixel values of the gradient image to a second preset pixel value interval to obtain the mapped gradient image; and performing the image enhancement on the gray-scale image based on the mapped concave-convex information and the mapped gradient image to obtain the enhanced image corresponding to the target object. The first preset pixel value interval and the second preset pixel value interval can be the same or different, which is not limited herein.

[0162] In an example, the first preset pixel value interval can be [0, 255]. For example, the concave-convex information is a concave-convex representation image, for a pixel value d of any pixel in the concave-convex representation image, the mapped pixel value d' of the pixel can be determined by using formula 1:

[0163]

[0164] wherein, d max represents a maximum value of pixel values in the concave-convex representation image, d min represents a minimum value of pixel values in the concave-convex representation image.

[0165] In an example, the second preset pixel value interval can be [0, 255]. For any pixel in the gradient image, in a case that a pixel value of the pixel is a negative value, the absolute value of the pixel value is taken and then mapped to the second preset pixel value interval. For example, for a pixel value g of any pixel in the gradient image, the mapped pixel value g' of the pixel can be determined by using formula 2:

[0166]

[0167] wherein, |g| max represents a maximum value of absolute values of pixel values in the gradient image, |g| min represents a minimum value of absolute values of pixel values in the gradient image.

[0168] In one example, the relief information is a relief representation image, and the gradient image includes an X-axis direction gradient image corresponding to the target object; the image enhancement of the gray-scale image based on the mapped relief information and the mapped gradient image to obtain the enhanced image corresponding to the target object includes: synthesizing the gray-scale image, the mapped relief representation image, and the mapped X-axis direction gradient image to obtain the enhanced image corresponding to the target object. In this example, the gray-scale image can be used as an image of a first channel of the enhanced image, the mapped relief representation image can be used as an image of a second channel of the enhanced image, and the mapped X-axis direction gradient image can be used as an image of a third channel of the enhanced image.

[0169] In another example, the relief information is a relief representation image, and the gradient image includes a Y-axis direction gradient image corresponding to the target object; the image enhancement of the gray-scale image based on the mapped relief information and the mapped gradient image to obtain the enhanced image corresponding to the target object includes: synthesizing the gray-scale image, the mapped relief representation image, and the mapped Y-axis direction gradient image to obtain the enhanced image corresponding to the target object. In this example, the gray-scale image can be used as an image of a first channel of the enhanced image, the mapped relief representation image can be used as an image of a second channel of the enhanced image, and the mapped Y-axis direction gradient image can be used as an image of a third channel of the enhanced image.

[0170] In another example, the relief information is a relief representation image, and the gradient image includes an X-axis direction gradient image corresponding to the target object and a Y-axis direction gradient image corresponding to the target object; the image enhancement of the gray-scale image based on the mapped relief information and the mapped gradient image to obtain the enhanced image corresponding to the target object includes: synthesizing the gray-scale image, the mapped relief representation image, the mapped X-axis direction gradient image, and the mapped Y-axis direction gradient image to obtain the enhanced image corresponding to the target object. In this example, the gray-scale image can be used as an image of a first channel of the enhanced image, the mapped relief representation image can be used as an image of a second channel of the enhanced image, the mapped X-axis direction gradient image can be used as an image of a third channel of the enhanced image, and the mapped Y-axis direction gradient image can be used as an image of a fourth channel of the enhanced image.

[0171] In this example, the concave-convex information is mapped to a first preset pixel value interval to obtain mapped concave-convex information, the pixel value of the gradient image is mapped to a second preset pixel value interval to obtain a mapped gradient image, and the grayscale image is image-enhanced based on the mapped concave-convex information and the mapped gradient image to obtain the enhanced image corresponding to the target object, thereby further improving the intuitiveness of the potential defect region in the enhanced image.

[0172] In another possible implementation, the image to be enhanced includes a gradient image corresponding to the target object; and the image-enhancing the image to be enhanced corresponding to the target object based on the concave-convex information to obtain the enhanced image corresponding to the target object includes image-enhancing the gradient image based on the concave-convex information to obtain the enhanced image corresponding to the target object. In this implementation, the gradient image can be image-enhanced based on only the concave-convex information, or the gradient image can be image-enhanced in combination with the concave-convex information and other information, which is not limited herein.

[0173] As an example of this implementation, the concave-convex information is a concave-convex representation image; and the image-enhancing the gradient image based on the concave-convex information to obtain the enhanced image corresponding to the target object includes synthesizing the gradient image and the concave-convex representation image to obtain the enhanced image corresponding to the target object. In this example, the grayscale image corresponding to the target object can not be acquired.

[0174] As an example of this implementation, the gradient image is an X-axis direction gradient image corresponding to the target object; and the image-enhancing the gradient image based on the concave-convex information to obtain the enhanced image corresponding to the target object includes image-enhancing the X-axis direction gradient image based on the concave-convex information to obtain the enhanced image corresponding to the target object. In this example, the X-axis direction gradient image can be image-enhanced based on only the concave-convex information, or the X-axis direction gradient image can be image-enhanced in combination with the concave-convex information and other information (for example, a Y-axis direction gradient image corresponding to the target object, a grayscale image corresponding to the target object, etc.), which is not limited herein.

[0175] In one example, the concave-convex information is a concave-convex representation image; and the image enhancement of the gradient image in the X-axis direction based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: synthesizing the gradient image in the X-axis direction and the concave-convex representation image to obtain the enhanced image corresponding to the target object. In this example, the gradient image in the X-axis direction can be used as the image of the first channel of the enhanced image, and the concave-convex representation image can be used as the image of the second channel of the enhanced image.

[0176] In another example, the concave-convex information is a concave-convex representation image; and the image enhancement of the gradient image in the X-axis direction based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: obtaining the gradient image in the Y-axis direction corresponding to the target object; and synthesizing the gradient image in the X-axis direction, the concave-convex representation image and the gradient image in the Y-axis direction to obtain the enhanced image corresponding to the target object. In this example, the gradient image in the X-axis direction can be used as the image of the first channel of the enhanced image, the concave-convex representation image can be used as the image of the second channel of the enhanced image, and the gradient image in the Y-axis direction can be used as the image of the third channel of the enhanced image.

[0177] In another example, the concave-convex information is a concave-convex representation image; and the image enhancement of the gradient image in the X-axis direction based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: obtaining the grayscale image corresponding to the target object; and synthesizing the gradient image in the X-axis direction, the concave-convex representation image and the grayscale image to obtain the enhanced image corresponding to the target object. In this example, the gradient image in the X-axis direction can be used as the image of the first channel of the enhanced image, the concave-convex representation image can be used as the image of the second channel of the enhanced image, and the grayscale image can be used as the image of the third channel of the enhanced image.

[0178] As another example of this implementation, the gradient image is the gradient image in the Y-axis direction corresponding to the target object; and the image enhancement of the gradient image based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: image enhancement of the gradient image in the Y-axis direction based on the concave-convex information to obtain the enhanced image corresponding to the target object. In this example, the image enhancement of the gradient image in the Y-axis direction can be based on the concave-convex information only, or the image enhancement of the gradient image in the Y-axis direction can be based on the concave-convex information in combination with other information (such as the gradient image in the X-axis direction corresponding to the target object, the grayscale image corresponding to the target object, etc.), which is not limited herein.

[0179] In one example, the concave-convex information is a concave-convex representation image; and the image enhancement of the gradient image in the Y-axis direction based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: synthesizing the gradient image in the Y-axis direction and the concave-convex representation image to obtain the enhanced image corresponding to the target object. In this example, the gradient image in the Y-axis direction can be used as the image of the first channel of the enhanced image, and the concave-convex representation image can be used as the image of the second channel of the enhanced image.

[0180] In another example, the concave-convex information is a concave-convex representation image; and the image enhancement of the gradient image in the Y-axis direction based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: obtaining the gradient image in the X-axis direction corresponding to the target object; and synthesizing the gradient image in the Y-axis direction, the concave-convex representation image and the gradient image in the X-axis direction to obtain the enhanced image corresponding to the target object. In this example, the gradient image in the Y-axis direction can be used as the image of the first channel of the enhanced image, the concave-convex representation image can be used as the image of the second channel of the enhanced image, and the gradient image in the X-axis direction can be used as the image of the third channel of the enhanced image.

[0181] In another example, the concave-convex information is a concave-convex representation image; and the image enhancement of the gradient image in the Y-axis direction based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: obtaining the grayscale image corresponding to the target object; and synthesizing the gradient image in the Y-axis direction, the concave-convex representation image and the grayscale image to obtain the enhanced image corresponding to the target object. In this example, the gradient image in the Y-axis direction can be used as the image of the first channel of the enhanced image, the concave-convex representation image can be used as the image of the second channel of the enhanced image, and the grayscale image can be used as the image of the third channel of the enhanced image.

[0182] In this implementation, by image enhancement of the gradient image based on the concave-convex information to obtain the enhanced image corresponding to the target object, the enhanced image obtained thereby not only can improve the intuitiveness of the potential defect area of the target object, but also can provide more detailed information, especially the detailed information at the edge of the image, so as to further reduce the difficulty of defect labeling of the target object, improve the efficiency and accuracy of defect labeling of the target object, and / or further improve the accuracy of defect detection of the target object.

[0183] In a possible implementation, the target object includes a battery; and the determining the target surface of the target object includes: determining position information of a top cover weld of the battery, and determining battery surfaces on two sides of the top cover weld as two target surfaces of the battery respectively according to the position information of the top cover weld.

[0184] In this implementation, the position information of the top cover weld of the battery is determined by obtaining a depth image corresponding to the battery, the two target surfaces of the battery are determined on the two sides of the top cover weld respectively according to the position information of the top cover weld, the concave-convex information of the target surface is determined according to the depth image, and the image enhancement is performed on the to-be-enhanced image corresponding to the battery according to the concave-convex information, so as to obtain an enhanced image corresponding to the battery. In this way, the image enhancement is performed based on the concave-convex information of the target surface of the battery, the visual perception of the potential defect area of the battery can be enhanced, the potential defect area of the battery is more intuitive, and therefore, the difficulty of image annotation on the image corresponding to the battery is reduced, and the efficiency and accuracy of the image annotation on the image corresponding to the battery are improved, and / or, the accuracy of the defect detection on the battery is improved.

[0185] In a possible implementation, after the enhanced image corresponding to the target object is obtained, the method further includes: inputting the enhanced image into a fourth neural network that is pre-trained, and performing defect annotation on the enhanced image via the fourth neural network to obtain a defect annotation result corresponding to the enhanced image.

[0186] In another possible implementation, after the enhanced image corresponding to the target object is obtained, the enhanced image can be annotated by an annotator.

[0187] In another possible implementation, after the enhanced image corresponding to the target object is obtained, the method further includes: inputting the enhanced image into a fifth neural network that is pre-trained, and performing defect detection on the enhanced image via the fifth neural network to obtain a defect detection result corresponding to the enhanced image.

[0188] The image enhancement method provided by the embodiments of the present disclosure can be applied to application scenarios such as computer vision, industrial detection, industrial quality inspection, industrial production, image annotation, data annotation, image processing, image enhancement, image rendering, and the like.

[0189] The image enhancement method provided by the embodiments of the present disclosure is described below through a specific application scenario. In this application scenario, the target object is a new energy vehicle battery. A gray image corresponding to the new energy vehicle battery can be acquired by a two-dimensional camera, and point cloud data corresponding to the new energy vehicle battery can be acquired by a three-dimensional camera. The point cloud data can be converted into a depth image corresponding to the new energy vehicle battery.

[0190] The position information of a top cover weld of the new energy vehicle battery can be determined from the gray image, and the battery surfaces on both sides of the top cover weld can be determined as target surfaces of the new energy vehicle battery according to the position information of the top cover weld. According to the position information of the target surfaces in the gray image and the corresponding relationship between the pixels in the gray image and the pixels in the depth image, the position information of the target surfaces in the depth image can be determined.

[0191] According to the depth image, the gradient value of the pixels of the target surfaces in the X-axis direction of the plane coordinate system corresponding to the target surfaces can be determined. A plurality of target points for fitting a plane can be determined from the target surfaces according to the pixels corresponding to the gradient value with the highest frequency in the gradient values of the pixels of the target surfaces in the X-axis direction, and a fitting plane corresponding to the target surfaces can be obtained by plane fitting according to the depth values of the plurality of target points. The difference between the depth values of the corresponding pixels of the target surfaces and the fitting plane can be obtained to obtain a concave-convex representation image corresponding to the target surfaces. The pixel values of the concave-convex representation image can be mapped to [0, 255] by using Formula 1 to obtain a mapped concave-convex representation image.

[0192] According to the gradient of the pixels in the X-axis direction in the depth image, an X-axis direction gradient image corresponding to the new energy vehicle battery can be obtained. The pixel values of the X-axis direction gradient image can be mapped to [0, 255] by using Formula 2 to obtain a mapped X-axis direction gradient image. According to the gradient of the pixels in the Y-axis direction in the depth image, a Y-axis direction gradient image corresponding to the new energy vehicle battery can be obtained. The pixel values of the Y-axis direction gradient image can be mapped to [0, 255] by using Formula 2 to obtain a mapped Y-axis direction gradient image.

[0193] After obtaining the gray image, the mapped X-axis direction gradient image, the mapped Y-axis direction gradient image, and the mapped concave-convex representation image corresponding to the new energy vehicle battery, three of the images can be selected as three channels to synthesize an enhanced image corresponding to the new energy vehicle battery. In this application scenario, different channel images can be synthesized according to actual scenarios and labeling requirements to generate an enhanced image corresponding to the target object.

[0194] Figure 2aA schematic diagram of a gray-scale image corresponding to a new energy automobile battery in an image enhancement method provided by an embodiment of the present disclosure is shown. Figure 2b A schematic diagram of a depth image corresponding to a new energy automobile battery in an image enhancement method provided by an embodiment of the present disclosure is shown. Figure 2c A schematic diagram of a mapped X-axis direction gradient image corresponding to a new energy automobile battery in an image enhancement method provided by an embodiment of the present disclosure is shown. Figure 2d A schematic diagram of an enhanced image synthesized by a gray-scale image corresponding to a new energy automobile battery, a mapped X-axis direction gradient image, and a mapped concave-convex representation image in an image enhancement method provided by an embodiment of the present disclosure is shown. Figure 2e A schematic diagram of an enhanced image synthesized by a mapped X-axis direction gradient image, a mapped Y-axis direction gradient image, and a mapped concave-convex representation image corresponding to a new energy automobile battery in an image enhancement method provided by an embodiment of the present disclosure is shown.

[0195] By using the image enhancement method provided by the application scenario, the visual perception of the potential defect area of the target object can be enhanced, thereby helping to improve the efficiency and accuracy of image labeling of the image corresponding to the target object, and / or helping to improve the accuracy of defect detection of the target object.

[0196] For example, by using the image enhancement method provided by an embodiment of the present disclosure to enhance the image corresponding to the new energy automobile battery, the efficiency and accuracy of labeling defects such as appearance defects, weld defects, and key component defects of the new energy automobile battery can be improved, and / or the accuracy of defect detection of the appearance, weld, and key components of the new energy automobile battery can be improved.

[0197] For example, by using the image enhancement method provided by an embodiment of the present disclosure to enhance the image corresponding to the mechanical components of the automobile, the efficiency and accuracy of labeling defects such as appearance defects and weld defects of the mechanical components of the automobile can be improved, and / or the accuracy of defect detection of the mechanical components of the automobile can be improved.

[0198] For example, by using the image enhancement method provided by an embodiment of the present disclosure to enhance the image corresponding to the general industrial products (such as shoes, water cups, and textiles), the efficiency and accuracy of labeling defects such as appearance defects of the general industrial products can be improved, and / or the accuracy of defect detection of the appearance of the general industrial products can be improved.

[0199] For example, the image enhancement method provided by the embodiments of the present disclosure can be used to enhance the image of an electronic product (such as a mobile phone, a computer, a watch, etc.), which can help improve the efficiency and accuracy of labeling defects such as appearance defects of the electronic product, and / or help improve the accuracy of defect detection of the appearance of the electronic product.

[0200] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form combined embodiments without deviating from the principle logic. Due to the limited space, the present disclosure will not be repeated. Those skilled in the art can understand that the specific execution order of each step in the above-mentioned method should be determined according to its function and possible internal logic.

[0201] In addition, the present disclosure also provides an image enhancement device, an electronic device, a computer readable storage medium, and a computer program product, which can be used to implement any of the image enhancement methods provided by the present disclosure. The corresponding technical solutions and technical effects can be referred to the corresponding description in the method part, and will not be repeated.

[0202] Figure 3 A block diagram of an image enhancement device provided by an embodiment of the present disclosure is shown. As shown in Figure 3 The image enhancement device includes:

[0203] An obtaining module 31 is configured to obtain a depth image corresponding to a target object;

[0204] A first determining module 32 is configured to determine a target surface of the target object;

[0205] A second determining module 33 is configured to determine concave-convex information of the target surface according to the depth image, wherein the concave-convex information represents information of a concave part and / or a convex part of the target surface;

[0206] An image enhancement module 34 is configured to perform image enhancement on a to-be-enhanced image corresponding to the target object based on the concave-convex information, to obtain an enhanced image corresponding to the target object.

[0207] In a possible implementation, the second determining module 33 is configured to:

[0208] determine a fitting plane corresponding to the target surface according to the depth image;

[0209] determine the concave-convex information of the target surface according to a difference between the depth values of corresponding pixels in the target surface and the fitting plane.

[0210] In a possible implementation, the second determining module 33 is configured to:

[0211] determine a gradient value of a pixel of the target surface in a preset direction according to the depth image;

[0212] determine a plurality of target points for fitting a plane from the target surface according to a pixel corresponding to a gradient value that appears most frequently in the gradient values of the pixels of the target surface in the preset direction;

[0213] perform plane fitting according to the depth values of the plurality of target points to obtain a fitting plane corresponding to the target surface.

[0214] In a possible implementation, the preset direction is an X-axis direction or a Y-axis direction of a plane coordinate system corresponding to the target surface, where a coordinate plane of the plane coordinate system corresponding to the target surface is parallel to the target surface.

[0215] In a possible implementation, the first determining module 32 is configured to:

[0216] determine position information of a weld seam of the target object;

[0217] determine two target surfaces of the target object respectively according to object surfaces on two sides of the weld seam according to the position information of the weld seam.

[0218] In a possible implementation, the image to be enhanced includes a grayscale image corresponding to the target object.

[0219] The image enhancement module 34 is configured to:

[0220] perform image enhancement on the grayscale image based on the concave-convex information to obtain an enhanced image corresponding to the target object.

[0221] In a possible implementation, the image enhancement module 34 is configured to:

[0222] obtain a gradient image corresponding to the target object;

[0223] perform image enhancement on the grayscale image based on the concave-convex information and the gradient image to obtain an enhanced image corresponding to the target object.

[0224] In a possible implementation, the image enhancement module 34 is configured to at least one of the following:

[0225] obtain an X-axis direction gradient image corresponding to the target object according to gradients of pixels in the depth image in an X-axis direction of a plane coordinate system corresponding to the target surface;

[0226] According to a gradient of a pixel in the depth image in a Y-axis direction of a plane coordinate system corresponding to the target surface, a gradient image in the Y-axis direction corresponding to the target object is obtained.

[0227] In a possible implementation, the image enhancement module 34 is configured to:

[0228] map the concave-convex information to a first preset pixel value interval to obtain mapped concave-convex information;

[0229] map a pixel value of the gradient image to a second preset pixel value interval to obtain a mapped gradient image;

[0230] perform image enhancement on the grayscale image based on the mapped concave-convex information and the mapped gradient image to obtain an enhanced image corresponding to the target object.

[0231] In a possible implementation, the image to be enhanced is a gradient image corresponding to the target object.

[0232] The image enhancement module 34 is configured to:

[0233] perform image enhancement on the gradient image based on the concave-convex information to obtain an enhanced image corresponding to the target object.

[0234] In a possible implementation, the target object is a battery.

[0235] The first determination module 32 is configured to: determine position information of a top cover weld of the battery, and determine, according to the position information of the top cover weld, battery surfaces on two sides of the top cover weld as two target surfaces of the battery, respectively.

[0236] In the embodiments of the present disclosure, by obtaining a depth image corresponding to a target object, determining a target surface of the target object, determining concave-convex information of the target surface according to the depth image, and performing image enhancement on an image to be enhanced corresponding to the target object based on the concave-convex information to obtain an enhanced image corresponding to the target object, the image is enhanced based on the concave-convex information of the target surface of the target object, which can enhance the visual perception of a potential defect area of the target object, making the potential defect area of the target object more intuitive, thereby helping to reduce the difficulty of image annotation on an image corresponding to the target object, solving the problems of low accuracy and long time caused by an annotator directly annotating an original image collected by an imaging device, and further helping to improve the efficiency and accuracy of image annotation on the image corresponding to the target object, and / or, helping to improve the accuracy of defect detection on the target object.

[0237] In some embodiments, the apparatus provided by the embodiments of the present disclosure has functions or includes modules that can be used to perform the methods described in the above method embodiments, and the specific implementation and technical effects can refer to the description of the above method embodiments. For brevity, they will not be repeated here.

[0238] The embodiments of the present disclosure also provide a computer readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the above method. Wherein, the computer readable storage medium can be a non-volatile computer readable storage medium, or can be a volatile computer readable storage medium.

[0239] The embodiments of the present disclosure also propose a computer program, including computer readable code, when the computer readable code is running in an electronic device, a processor in the electronic device executes the above method.

[0240] The embodiments of the present disclosure also provide a computer program product, including computer readable code, or a non-volatile computer readable storage medium carrying computer readable code, when the computer readable code is running in an electronic device, a processor in the electronic device executes the above method.

[0241] The embodiments of the present disclosure also provide an electronic device, including: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to invoke the executable instructions stored in the memory to execute the above method.

[0242] The electronic device can be provided as a terminal, a server or other forms of devices.

[0243] Figure 4 A block diagram of the electronic device 1900 provided by the embodiments of the present disclosure is shown. For example, the electronic device 1900 can be provided as a server. Referring to Figure 4 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by a memory 1932, for storing instructions executable by the processing component 1922, such as application programs. The application programs stored in the memory 1932 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above method.

[0244] The electronic device 1900 can further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Microsoft Windows Server TM ), Apple's graphical user interface-based operating system (Mac OSX TM ), a multi-user multi-processing computer operating system (Unix TM ), a free and open-source Unix-like operating system (Linux TM ), an open-source Unix-like operating system (FreeBSD TM ), or the like.

[0245] In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above-described method.

[0246] The present disclosure can be a system, a method, and / or a computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present disclosure.

[0247] The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or punched tape, a

[0248] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0249] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computing / processing device, partly on the user's computing / processing device, as a stand-alone software package, partly on the user's computing / processing device and partly on a remote computing / processing device or entirely on the remote computing / processing device or server. In the latter scenario, the remote computing / processing device can be connected to the user's computing / processing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing / processing device, for example, through the Internet using an Internet Service Provider. In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.

[0250] The computer readable program instructions can also be loaded onto a computing / processing device, other programmable data processing apparatus, or other device to cause a series of operations to be performed on the computing / processing device, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computing / processing device, other programmable apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0251] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer readable storage medium having no data signals on it. The instructions can be executed by one or more processors of a computer or other programmable data processing apparatus to produce a computer implemented process such that the instructions, which execute via the one or more processors of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0252] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer readable storage medium having no data signals on it. The instructions can be executed by one or more processors of a computer or other programmable data processing apparatus to produce a computer implemented process such that the instructions, which execute via the one or more processors of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0253] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0254] The computer program product can be embodied by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) or the like.

[0255] The above description of the various embodiments is intended to be illustrative and not restrictive. Many other embodiments will be obvious to those of skill in the art upon reviewing the above description, and the general principles described herein can be applied to other embodiments. Thus, the scope of the disclosure should be determined not with reference to the above description, but should instead be determined with reference to the appended claims, along with their full scope of equivalents.

[0256] If the technical solutions of the embodiments of the present disclosure involve personal information, the product applying the technical solutions of the embodiments of the present disclosure has been explicitly informed of the personal information processing rules before processing the personal information, and has obtained the personal independent consent. If the technical solutions of the embodiments of the present disclosure involve sensitive personal information, the product applying the technical solutions of the embodiments of the present disclosure has obtained the personal independent consent before processing the sensitive personal information, and at the same time meets the requirement of "explicit consent". For example, at the personal information collection device such as camera, a clear and prominent mark is set to inform that the personal information collection range has been entered, and the personal information will be collected. If the person voluntarily enters the collection range, it is considered to agree to collect the personal information. Or on the device for processing personal information, the personal information processing rules are informed by using obvious mark / information, and the personal authorization is obtained by pop-up information or asking the person to upload his / her personal information, etc. The personal information processing rules can include personal information processor, personal information processing purpose, processing method, and personal information type, etc.

[0257] The above has described the embodiments of the present disclosure, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical application, or improvement of the technology in the market, or to enable other ordinary skilled persons in the art to understand the embodiments disclosed herein.

Claims

1. An image enhancement method characterized by, The method comprises the following steps: obtaining a depth image corresponding to a target object; determining a target surface of the target object; determining a fitting plane corresponding to the target surface according to the depth image; determining concave-convex information of the target surface according to a difference between depth values of corresponding pixels in the target surface and the fitting plane, wherein the concave-convex information represents information of a concave part and / or a convex part of the target surface; performing image enhancement on a to-be-enhanced image corresponding to the target object based on the concave-convex information to obtain an enhanced image corresponding to the target object; wherein the concave-convex information is represented by a concave-convex representation image; the concave-convex representation image is used to represent position information of the concave part and / or the convex part of the target surface, and depth information of the concave part and / or height information of the convex part of the target surface; the performing image enhancement on the to-be-enhanced image based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: synthesizing the concave-convex representation image and the to-be-enhanced image corresponding to the target object to obtain the enhanced image corresponding to the target object.

2. The method of claim 1, wherein, the determining the fitting plane corresponding to the target surface according to the depth image comprises: determining gradient values of pixels of the target surface in a preset direction according to the depth image; determining a plurality of target points for fitting a plane from the target surface according to pixels corresponding to a gradient value that appears most frequently or has the highest frequency in the gradient values of the pixels of the target surface in the preset direction; performing plane fitting according to depth values of the plurality of target points to obtain the fitting plane corresponding to the target surface.

3. The method of claim 2, wherein, the preset direction is an X-axis direction or a Y-axis direction of a plane coordinate system corresponding to the target surface, wherein a coordinate plane of the plane coordinate system corresponding to the target surface is parallel to the target surface.

4. The method according to any one of claims 1 to 3, characterized in that, the determining the target surface of the target object comprises: determining position information of a weld seam of the target object; determining object surfaces on both sides of the weld seam as two target surfaces of the target object respectively according to the position information of the weld seam.

5. The method according to any one of claims 1 to 3, characterized in that, the to-be-enhanced image comprises a grayscale image corresponding to the target object; the performing image enhancement on the to-be-enhanced image based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: performing image enhancement on the grayscale image based on the concave-convex information to obtain the enhanced image corresponding to the target object.

6. The method of claim 5, wherein, the performing image enhancement on the grayscale image based on the concave-convex information to obtain the enhanced image corresponding to the target object comprises: obtaining a gradient image corresponding to the target object; performing image enhancement on the grayscale image based on the concave-convex information and the gradient image to obtain the enhanced image corresponding to the target object.

7. The method of claim 6, wherein, the obtaining the gradient image corresponding to the target object comprises at least one of the following: obtaining an X-axis direction gradient image corresponding to the target object according to gradients of pixels in the depth image in an X-axis direction of a plane coordinate system corresponding to the target surface; According to a gradient of a pixel in the depth image in a Y-axis direction of a plane coordinate system corresponding to the target surface, a gradient image in the Y-axis direction corresponding to the target object is obtained.

8. The method of claim 6, wherein, The image enhancement based on the concave-convex information and the gradient image is used to perform image enhancement on the gray-scale image, so as to obtain an enhanced image corresponding to the target object, and the image enhancement based on the concave-convex information includes: The concave-convex information is mapped to a first preset pixel value interval, so as to obtain mapped concave-convex information; The pixel value of the gradient image is mapped to a second preset pixel value interval, so as to obtain a mapped gradient image; The image enhancement based on the mapped concave-convex information and the mapped gradient image is used to perform image enhancement on the gray-scale image, so as to obtain an enhanced image corresponding to the target object.

9. The method according to any one of claims 1 to 3, characterized in that, The image to be enhanced includes a gradient image corresponding to the target object; The image enhancement based on the concave-convex information is used to perform image enhancement on the image to be enhanced corresponding to the target object, so as to obtain an enhanced image corresponding to the target object. The image enhancement based on the concave-convex information is used to perform image enhancement on the gradient image, so as to obtain an enhanced image corresponding to the target object.

10. The method according to any one of claims 1 to 3, characterized in that, The target object includes a battery; The determination of the target surface of the target object includes: The position information of a top cover weld of the battery is determined, and the battery surfaces on both sides of the top cover weld are respectively determined as two target surfaces of the battery according to the position information of the top cover weld.

11. An image enhancement device, characterized by It includes: An obtaining module is configured to obtain a depth image corresponding to a target object; A first determining module is configured to determine a target surface of the target object; A second determining module is configured to determine a fitting plane corresponding to the target surface according to the depth image, and determine concave-convex information of the target surface according to a difference between depth values of corresponding pixels in the target surface and the fitting plane, wherein the concave-convex information represents information of a concave part and / or a convex part of the target surface. An image enhancement module is configured to perform image enhancement on an image to be enhanced corresponding to the target object based on the concave-convex information, so as to obtain an enhanced image corresponding to the target object. The concave-convex information is represented by a concave-convex representation image; the concave-convex representation image is used to represent position information of a concave part and / or a convex part of the target surface, and depth information of the concave part and / or height information of the convex part of the target surface. The image enhancement module is specifically configured to: Synthesize the concave-convex representation image and the image to be enhanced corresponding to the target object, so as to obtain the enhanced image corresponding to the target object.

12. An electronic device, comprising: It includes: One or more processors; Memory for storing executable instructions; The one or more processors are configured to invoke the executable instructions stored in the memory to execute the method in any one of claims 1 to 10.

13. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions are executed by the processor to implement the method in any one of claims 1 to 10.

14. A computer program product, characterised in that, The computer readable code or the non-volatile computer readable storage medium carrying the computer readable code includes computer readable code, and when the computer readable code runs in an electronic device, a processor in the electronic device executes the method in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Image processing device, program and image processing method

    CN104883948A