WO2022011560A1 - Image cropping method and apparatus, electronic device, and storage medium - Google Patents
Image cropping method and apparatus, electronic device, and storage medium Download PDFInfo
- Publication number
- WO2022011560A1 WO2022011560A1 PCT/CN2020/101938 CN2020101938W WO2022011560A1 WO 2022011560 A1 WO2022011560 A1 WO 2022011560A1 CN 2020101938 W CN2020101938 W CN 2020101938W WO 2022011560 A1 WO2022011560 A1 WO 2022011560A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- point cloud
- boundary information
- target
- cloud data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Definitions
- the present disclosure relates to the technical field of image processing, and in particular, to an image cropping method, an image cropping device, an electronic device, and a computer-readable storage medium.
- the image processing capability of the terminal equipment is gradually enhanced.
- a combination of traditional methods and deep learning methods can be used for automatic cropping.
- the image information is missing or there is interference information, the accuracy of image cropping is low.
- the purpose of the present disclosure is to provide an image cropping method, an image cropping device, an electronic device and a computer-readable storage medium, so as to overcome the problem of low image cropping accuracy due to limitations and defects of the related art to a certain extent .
- an image cropping method comprising:
- the color image is cropped according to the target boundary information to obtain a cropped image.
- an image cropping device comprising:
- the image acquisition module is used to acquire the color image and depth image of the target object
- an image boundary information determination module configured to perform perspective transformation on the color image to obtain a perspective transformed image, and extract the image boundary information of the target object in the perspective transformed image
- a point cloud boundary information determination module configured to determine the point cloud boundary information of the target object according to the point cloud data generated based on the depth image
- a target boundary information determination module configured to obtain target boundary information based on the image boundary information and the point cloud boundary information
- An image cropping module configured to crop the color image according to the target boundary information to obtain a cropped image.
- an electronic device comprising:
- a memory configured to store executable instructions for the processor
- the processor is configured to perform the above-mentioned image cropping method by executing the executable instructions.
- a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned image cropping method when executed by a processor.
- the point cloud boundary information of the target object is determined through the depth image, so that the cropping range of the target object can be obtained. And combined with the image boundary information of the target object in the color image, the target boundary information of the target object is determined. In this way, even if the target object has no obvious lines or interference information, the target boundary information can be accurately obtained. Further, cropping the color image according to the target boundary information can improve the accuracy of cropping, thereby improving user experience.
- FIG. 1 shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure
- FIG. 2 shows a flowchart of an image cropping method in an embodiment of the present disclosure
- FIG. 3 shows a flow chart of perspective transformation in an embodiment of the present disclosure
- Fig. 4 shows a kind of schematic diagram of a kind of area detection
- FIG. 5 shows a flow chart of generating point cloud boundary information in an embodiment of the present disclosure
- FIG. 6 shows a schematic diagram of a target object and a point cloud boundary in an embodiment of the present disclosure
- FIG. 7 shows a schematic diagram of performing line segment detection on an image in an embodiment of the present disclosure
- FIG. 8 shows a schematic diagram of determining a target boundary in an embodiment of the present disclosure
- FIG. 9 shows a schematic diagram of displaying a cropped image in a view mode and an edit mode in an embodiment of the present disclosure
- FIG. 10 shows a schematic diagram of displaying a cropped image in a perspective transformation mode in an embodiment of the present disclosure
- FIG. 11 shows a schematic structural diagram of an image cropping apparatus in an embodiment of the present disclosure.
- Example embodiments will now be described more fully with reference to the accompanying drawings.
- Example embodiments can be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
- the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
- FIG. 1 shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure. It should be noted that the electronic device 100 shown in FIG. 1 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
- the electronic device 100 may specifically include: a processor 110, a wireless communication module 120, a mobile communication module 130, a charging management module 140, a power management module 141, a battery 142, a USB (Universal Serial Bus, Universal Serial Bus) ) interface 150, antenna 1, antenna 2, internal memory 161, external memory interface 162, display screen 170, sensor module 180, camera module 190, etc.
- a processor 110 a wireless communication module 120, a mobile communication module 130, a charging management module 140, a power management module 141, a battery 142, a USB (Universal Serial Bus, Universal Serial Bus) ) interface 150, antenna 1, antenna 2, internal memory 161, external memory interface 162, display screen 170, sensor module 180, camera module 190, etc.
- a USB Universal Serial Bus, Universal Serial Bus
- the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
- the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
- the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor , baseband processor and/or neural network processor, etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and the execution is controlled by the processor 110 .
- the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be directly called from the memory, which avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
- the display screen 170 is used to display images, videos, and the like.
- the sensor module 180 may include a depth sensor, a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, and the like. Among them, the depth sensor is used to obtain the depth information of the scene. In some embodiments, the depth sensor may be disposed in the camera module 190 .
- the camera module 190 is used to capture still images or video.
- the object is projected through the lens to generate an optical image onto the photosensitive element.
- the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the image signal processor to convert it into a digital image signal.
- the image signal processor outputs the digital image signal to the digital signal processor for processing.
- the digital signal processor converts the digital image signal into a standard RGB, YUV and other format image signal.
- the electronic device 100 may include one or more camera modules 190 .
- the image can be cropped based on the boundary information of the object.
- the lack of available boundaries in the image as well as the presence of interfering boundaries results in lower accuracy of image cropping.
- the present disclosure provides an image cropping method and device, an electronic device and a computer-readable storage medium, which can improve the accuracy of image cropping.
- FIG. 2 shows a flowchart of an image cropping method in an embodiment of the present disclosure, which may include the following steps:
- Step S210 acquiring a color image and a depth image of the target object.
- Step S220 Perform perspective transformation on the color image to obtain a perspective transformed image, and extract image boundary information of the target object in the perspective transformed image.
- Step S230 Determine point cloud boundary information of the target object according to the point cloud data generated based on the depth image.
- Step S240 based on the image boundary information and the point cloud boundary information, obtain target boundary information.
- Step S250 crop the color image according to the target boundary information to obtain a cropped image.
- the point cloud boundary information of the target object is determined by using the depth image, so that the cropping range of the target object can be obtained. And combined with the image boundary information of the target object in the color image, the target boundary information of the target object is determined. In this way, even if the target object has no obvious lines or interference information, the target boundary information can be accurately obtained. Further, cropping the color image according to the target boundary information can improve the accuracy of cropping, thereby improving user experience.
- step S210 a color image and a depth image of the target object are acquired.
- the target object may be any object to be photographed by the user, and may be a person, an animal, or a scene.
- the electronic device may contain multiple different camera modules, so that different images can be captured for the same target object.
- one of the camera modules can capture color images (eg, RGB images or YUV images, etc.).
- Another camera module can capture the depth information of the target object to obtain a depth image.
- the depth information of the target object can be obtained through a TOF (Time of Flight) sensor.
- the TOF sensor emits modulated near-infrared light, and the near-infrared light is reflected after encountering an object. Get depth information.
- the TOF sensors are not affected by illumination changes and object textures, and can reduce costs on the premise of meeting the accuracy requirements.
- the document scanning (referring to the correction of the perspective relationship) can be independent of the picture information, which greatly improves the application scope of the document scanning.
- the depth sensor may also be a structured light sensor or a binocular sensor, etc., which is not limited in the present disclosure.
- step S220 perspective transformation is performed on the color image to obtain a perspective transformed image, and image boundary information of the target object in the perspective transformed image is extracted.
- perspective transformation is the process of projecting an image onto a new viewing plane.
- an object that is a straight line in reality may appear as an oblique line on the image, and the oblique line can be converted into a straight line through perspective transformation.
- FIG. 3 shows a flowchart of perspective transformation in an embodiment of the present disclosure, which may include the following steps:
- Step S310 performing plane detection on the point cloud data generated based on the depth image, and determining a perspective transformation matrix according to the detected plane.
- point cloud data can be generated after the depth image is transformed by coordinates, that is, the three-dimensional coordinates in the depth image are converted into three-dimensional coordinates in the camera coordinate system to generate three-dimensional point cloud data.
- plane detection can be performed on the 3D point cloud data.
- RANSAC Random Sample Consensus
- other methods can be used to perform plane detection on the 3D point cloud data to obtain 3D plane parameters.
- the 3D plane parameters can be used to represent the detected flat.
- the perspective transformation matrix can be calculated according to the three-dimensional plane parameters.
- the perspective transformation matrix can be calculated by the four-point method or the like.
- Step S320 Perform perspective transformation on the color image through a perspective transformation matrix to obtain a perspective transformed image.
- the position coordinates of the pixel are multiplied by the perspective transformation matrix to obtain the position coordinates after perspective transformation.
- the above process is performed for each pixel to obtain a perspective transformed image.
- the image boundary information of the target object can be more accurately extracted from the perspective transformed image.
- line segment detection may be performed on the perspective transformed image, for example, line segment detection may be performed on the perspective transformed image by means of Hough transform or the like.
- the Hough transform can not only identify the straight lines in the image, but also any other shapes, such as circles, ellipses, etc.
- the image boundary information of the target object can be determined according to the line segment information.
- the present disclosure can also perform validity judgment and classification according to information such as the length and angle of the line segment. For example, shorter segments can be classified as invalid segments, longer segments as valid segments, and so on.
- the validity judgment can delete the invalid line segment information and keep the valid line segment information.
- Classification refers to dividing line segments into different categories, for example, line segments can be divided into horizontal line segments, vertical line segments, and so on.
- the image boundary information of the final extracted target object may contain multiple line segment information.
- the perspective transformation image can be processed based on the region detection algorithm to obtain the main body region image.
- the region detection algorithm may adopt an attention region detection algorithm, a main region detection algorithm, or a method based on saliency region detection, etc., wherein the method based on salient region detection includes: DeepGaze, DenseGaze, FastGaze, and the like.
- FIG. 4 shows a schematic diagram of a region detection. It can be seen that through region detection, a subject region image can be obtained, and the subject region image includes a range frame, and the range frame contains a target object. After that, the image boundary information of the target object can be determined according to the subject area image. It can be understood that the range box in Fig. 4 can be the image boundary of the target object.
- the region detection algorithm when extracting the image boundary information of the target object in the perspective transformed image, can be used after line segment detection and the line segment information is not detected, or the region detection algorithm can be directly used. Not limited.
- the perspective transformed image when using the region detection algorithm, can be processed separately, or the perspective transformed image and the depth image can be processed separately, and fused after processing, which can improve the accuracy of image boundary information determination.
- step S230 point cloud boundary information of the target object is determined according to the point cloud data generated based on the depth image.
- the point cloud boundary information in addition to determining the image boundary information based on the color image, can also be determined based on the depth image, and the boundary information of the target object can be determined from more levels, so as to improve the accuracy of the final determined boundary information.
- FIG. 5 shows a flowchart of generating point cloud boundary information in an embodiment of the present disclosure, which may include the following steps:
- step S510 after plane detection is performed on the point cloud data, plane point cloud data is obtained.
- the 3D plane parameters can be obtained.
- the point cloud belonging to the plane can be extracted to obtain plane point cloud data.
- the point cloud data belonging to the plane may be data on the plane, or point cloud data on the plane, and point cloud data whose distance from the plane is less than the distance threshold.
- the distance threshold can be set according to the actual situation. The smaller the distance threshold, the higher the accuracy of image cropping.
- Step S520 determining the bounding box of the plane point cloud data.
- Bounding box is an algorithm for solving the optimal bounding space of a discrete point set, which can replace complex geometric objects approximately with geometric objects with slightly larger volume and simple characteristics (called bounding boxes). Bounding boxes include: AABB bounding box, bounding sphere, directional bounding box OBB, and fixed-direction convex hull, etc.
- the AABB bounding box is the smallest hexahedron that contains the target object and whose sides are parallel to the coordinate axes.
- the process of calculating the bounding box is to calculate the maximum and minimum values along each axis of the coordinate system.
- Step S530 mapping the bounding box to the perspective transformation image to obtain point cloud boundary information of the target object.
- the point cloud boundary information can be obtained by directly projecting the three-dimensional range (maximum value and minimum value) of the bounding box to the perspective transformed image.
- the plane point cloud data can be filtered.
- the noise point cloud data can be filtered out, so that the target plane point cloud data can be obtained.
- distance filtering processing may be performed on the plane point cloud data, for example, by counting the density of the point cloud, and filtering out the point cloud with a lower density as noise. That is, the noise point cloud that is misjudged as belonging to the target plane in the plane point cloud data is filtered out by distance filtering.
- the plane point cloud data may also be subjected to clustering filtering processing, for example, by clustering the plane point cloud data, to extract the class with the largest number of plane point cloud data.
- clustering filtering processing for example, by clustering the plane point cloud data, to extract the class with the largest number of plane point cloud data.
- the clustering algorithm can be K-means clustering algorithm, DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm, etc.
- distance filtering processing and clustering filtering processing can also be performed on the plane point cloud data, which can further improve the accuracy of the target plane point cloud data compared with performing distance filtering processing or performing cluster filtering processing alone.
- the bounding box of the point cloud data of the target plane can be determined, so that the accuracy of the bounding box can be improved, and then the accuracy of the boundary information of the point cloud can be improved.
- step S240 target boundary information is obtained based on the image boundary information and the point cloud boundary information.
- the image boundary information is information used to describe the image boundary, and different image boundary information corresponds to different image boundaries.
- the point cloud boundary information is the information used to describe the point cloud boundary, and different point cloud boundary information corresponds to different point cloud boundaries.
- the fusion method can be to take the point cloud boundary as the initial value, and select the boundary closest to the outside of the point cloud boundary within a certain range from the image boundary; it can also be to use the point cloud boundary as the initial value, and select a certain range from the image boundary.
- FIG. 6 shows a schematic diagram of a target object and a point cloud boundary in an embodiment of the present disclosure. Due to the influence of sensor performance, sensor accuracy, reflection characteristics of objects, etc., there are a lot of noise point clouds in the point cloud data, so the detection algorithm based on the bounding box cannot give a very accurate object range. That is, affected by the noise point cloud, the boundary of the target object cannot be accurately determined according to the point cloud data. It can be seen that there is a large gap between the point cloud boundary and the actual boundary of the target object.
- the detection result shown in FIG. 7 can be obtained, that is, multiple straight lines can be detected. Since the detected line is on the inner side of the point cloud boundary, when the detected line and the point cloud boundary are fused, the point cloud boundary can be used as the initial value, and the most inner side of the point cloud boundary can be selected from multiple straight lines.
- the boundary of the target after fusion can be seen in Figure 8.
- the point cloud boundary can be used as the initial value
- the line segment with the closest distance to the point cloud boundary and the included angle smaller than the angle threshold that is, the target line segment
- the line segment information corresponding to the target line segment can be used as the target boundary information.
- the angle threshold can be set according to the actual situation, for example, it can be 10°, 15° and so on. Since an image boundary can include multiple directions, for example, for a rectangular boundary, four different directions are included. Therefore, the line segment with the closest distance to the point cloud boundary and whose included angle is smaller than the angle threshold refers to the line segment with the closest distance to the point cloud boundary in each direction and whose included angle is smaller than the angle threshold.
- the line segments finally selected are also line segments in multiple directions, and the line segments in multiple directions constitute the target boundary.
- the color image after obtaining the target boundary information, the color image may not be cropped, but the target boundary information may be displayed in the color image for the user's reference, so that the user can manually adjust the color image based on the target boundary information.
- Image is cropped. That is, the target boundary information is displayed in the color image to assist the user in manual cropping.
- the user may directly crop according to the target boundary information, or of course, it may not be cropped according to the target boundary information.
- step S250 the color image is cropped according to the target boundary information to obtain a cropped image.
- the target boundary information after obtaining the target boundary information, it can also be directly and automatically cropped to obtain a cropped image.
- the cropped image can also be displayed to the user. As shown in FIG. 9 , when displaying the cropped image, it can also be displayed in view mode, the user can click “manual crop” to enter the editing mode, and the user can further manually crop the image.
- users can adjust the crop box, rotate the image, translate the image, stretch the image, apply a perspective transformation to the image, and more.
- the user can drag the four corners of the cropping frame to adjust the size of the cropping frame, or adjust the size of the cropping frame by dragging the borders of the cropping frame.
- the user can rotate the image by dragging. When rotating, the rotation angle can be displayed to assist the user to rotate.
- the image can also be panned by dragging, and the image can be stretched by touching with two fingers. Semi-automatic stretching can also be achieved by means of a sliding bar.
- the user can click "Perspective Transformation" to enter the perspective transformation mode.
- the user can manually drag each corner point to realize perspective transformation.
- the electronic device edits the cropped image in response to the user's editing operation on the cropped image, so that an image that better meets the user's needs can be obtained.
- the image cropping method of the embodiment of the present disclosure obtains plane point cloud data by performing plane detection on the point cloud data, and performs perspective transformation on a color image based on the plane point cloud data to obtain a perspective transformed image, so that perspective transformation does not depend on image information. And based on the three-dimensional information of the plane point cloud data, the bounding box is calculated, and the information of the cropping range is obtained according to the projection position of the bounding box in the perspective transformed image.
- the line segment information in the color image it can further assist to correct the result of point cloud detection and improve the accuracy of automatic cropping.
- the subject range can be obtained without line segment information to assist in the range calculation of automatic cropping.
- the present disclosure can accurately obtain the boundary range of the target object and perform automatic cropping when the target object has no obvious lines or any direction information, or even when there is interfering information (such as line segment stripes of the object, etc.). , which can improve the accuracy of cropping.
- the user can further perform manual cropping, so as to obtain an image that is more in line with the user's needs.
- an image cropping apparatus 1100 includes:
- the image acquisition module 1110 is used to acquire the color image and the depth image of the target object
- the image boundary information determination module 1120 is used to perform perspective transformation on the color image to obtain the perspective transformed image, and extract the image boundary information of the target object in the perspective transformed image;
- the point cloud boundary information determination module 1130 is configured to determine the point cloud boundary information of the target object according to the point cloud data generated based on the depth image;
- a target boundary information determination module 1140 configured to obtain target boundary information based on the image boundary information and the point cloud boundary information
- the image cropping module 1150 is used for cropping the color image according to the target boundary information to obtain a cropped image.
- the image boundary information determination module includes:
- a line segment detection unit for performing line segment detection on the perspective transformed image
- the image boundary information first determining unit is configured to determine the image boundary information of the target object according to the line segment information when the perspective transformation image contains line segment information.
- the image boundary information determination module further includes:
- the second image boundary information determining unit is used to process the perspective transformed image based on a region detection algorithm when the line segment information is not included in the perspective transformed image to obtain an image of the main region; and determine the image boundary information of the target object according to the image of the main region.
- the image boundary information determination module further includes:
- the perspective transformation unit is used to perform plane detection on the point cloud data generated based on the depth image, and determine a perspective transformation matrix according to the detected plane; perform perspective transformation on the color image through the perspective transformation matrix to obtain a perspective transformation image.
- the point cloud boundary information determination module includes:
- the plane point cloud data acquisition unit is used to obtain plane point cloud data after plane detection is performed on the point cloud data generated based on the depth image;
- the bounding box determination unit is used to determine the bounding box of the plane point cloud data
- the mapping unit is used to map the bounding box to the perspective transformation image to obtain the point cloud boundary information of the target object.
- the above-mentioned image cropping apparatus further includes:
- the plane point cloud data filtering module is used to filter the plane point cloud data after obtaining the plane point cloud data to obtain the target plane point cloud data;
- the bounding box determination unit is specifically used to determine the bounding box of the point cloud data of the target plane.
- the plane point cloud data filtering module is specifically configured to perform distance filtering processing on plane point cloud data; or perform cluster filtering processing on plane point cloud data; or perform distance filtering processing on plane point cloud data; Distance filtering processing and cluster filtering processing.
- the target boundary information determination module includes:
- the target line segment selection unit is used to select the target line segment from the line segment represented by the image boundary information, wherein the target line segment is the closest to the line segment represented by the point cloud boundary information and the included angle is smaller than the angle threshold;
- the target boundary information determining unit is used for taking the line segment information corresponding to the target line segment as the target boundary information.
- the above-mentioned image cropping apparatus further includes:
- the image display module is used for displaying the target boundary information in the color image after obtaining the target boundary information, so that the user can crop the color image based on the target boundary information.
- the above-mentioned image cropping apparatus further includes:
- the image display module is also used for displaying the cropped image to the user after the cropped image is obtained;
- the image editing module is used to edit the cropped image in response to the user's editing operation on the cropped image.
- a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer executes any of the methods described above.
- the computer-readable storage medium shown in the present disclosure can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory, read only memory, erasable programmable read only memory (EPROM) or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
- a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
- a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
- Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, radio frequency, etc., or any suitable combination of the foregoing.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
Description
本公开涉及图像处理技术领域,尤其涉及一种图像裁剪方法、图像裁剪装置、电子设备及计算机可读存储介质。The present disclosure relates to the technical field of image processing, and in particular, to an image cropping method, an image cropping device, an electronic device, and a computer-readable storage medium.
随着终端设备的发展,终端设备对图像的处理能力也逐渐增强。其中,在对图像进行裁剪时,可以采用传统方法和深度学习相结合的方法进行自动裁剪。但是,在图像信息缺失或者存在干扰信息的情况下,图像裁剪的准确性较低。With the development of terminal equipment, the image processing capability of the terminal equipment is gradually enhanced. Among them, when cropping an image, a combination of traditional methods and deep learning methods can be used for automatic cropping. However, when the image information is missing or there is interference information, the accuracy of image cropping is low.
发明内容SUMMARY OF THE INVENTION
本公开的目的在于提供一种图像裁剪方法、图像裁剪装置、电子设备及计算机可读存储介质,进而在一定程度上克服由于相关技术的限制和缺陷而导致的图像裁剪的准确性较低的问题。The purpose of the present disclosure is to provide an image cropping method, an image cropping device, an electronic device and a computer-readable storage medium, so as to overcome the problem of low image cropping accuracy due to limitations and defects of the related art to a certain extent .
根据本公开的第一方面,提供一种图像裁剪方法,包括:According to a first aspect of the present disclosure, there is provided an image cropping method, comprising:
获取目标物体的彩色图像和深度图像;Obtain the color image and depth image of the target object;
对所述彩色图像进行透视变换,得到透视变换图像,并提取所述透视变换图像中所述目标物体的图像边界信息;Perform perspective transformation on the color image to obtain a perspective transformed image, and extract the image boundary information of the target object in the perspective transformed image;
根据基于所述深度图像生成的点云数据,确定所述目标物体的点云边界信息;Determine the point cloud boundary information of the target object according to the point cloud data generated based on the depth image;
基于所述图像边界信息和所述点云边界信息,得到目标边界信息;Based on the image boundary information and the point cloud boundary information, obtain target boundary information;
根据所述目标边界信息对所述彩色图像进行裁剪,得到裁剪图像。The color image is cropped according to the target boundary information to obtain a cropped image.
根据本公开的第二方面,提供一种图像裁剪装置,包括:According to a second aspect of the present disclosure, there is provided an image cropping device, comprising:
图像获取模块,用于获取目标物体的彩色图像和深度图像;The image acquisition module is used to acquire the color image and depth image of the target object;
图像边界信息确定模块,用于对所述彩色图像进行透视变换,得到透视变换图像,并提取所述透视变换图像中所述目标物体的图像边界信息;an image boundary information determination module, configured to perform perspective transformation on the color image to obtain a perspective transformed image, and extract the image boundary information of the target object in the perspective transformed image;
点云边界信息确定模块,用于根据基于所述深度图像生成的点云数据,确定所述目标物体的点云边界信息;a point cloud boundary information determination module, configured to determine the point cloud boundary information of the target object according to the point cloud data generated based on the depth image;
目标边界信息确定模块,用于基于所述图像边界信息和所述点云边界信息,得到目标边界信息;a target boundary information determination module, configured to obtain target boundary information based on the image boundary information and the point cloud boundary information;
图像裁剪模块,用于根据所述目标边界信息对所述彩色图像进行裁剪,得到裁剪图像。An image cropping module, configured to crop the color image according to the target boundary information to obtain a cropped image.
根据本公开的第三方面,提供一种电子设备,包括:According to a third aspect of the present disclosure, there is provided an electronic device, comprising:
处理器;以及processor; and
存储器,被配置为存储所述处理器的可执行指令;a memory configured to store executable instructions for the processor;
其中,所述处理器配置为经由执行所述可执行指令来执行上述图像裁剪方法。Wherein, the processor is configured to perform the above-mentioned image cropping method by executing the executable instructions.
根据本公开的第四方面,提供一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现上述图像裁剪方法。According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned image cropping method when executed by a processor.
本公开示例性实施例至少可以具有以下部分或全部有益效果:Exemplary embodiments of the present disclosure may have at least some or all of the following beneficial effects:
在本公开的一示例实施方式所提供的图像裁剪方法中,通过深度图像确定目标物体的点云边界信息,从而可以得到目标物体的裁剪范围。并结合彩色图像中目标物体的图像边界信息,确定目标物体的目标边界信息。这样,即使目标物体在没有明显线条或者存在干扰信息的情况下,也可以准确得到目标边界信息。进一步的,根据目标边界信息对彩色图像进行裁剪,可以提高裁剪的准确性,从而可以提升用户体验。In the image cropping method provided by an exemplary embodiment of the present disclosure, the point cloud boundary information of the target object is determined through the depth image, so that the cropping range of the target object can be obtained. And combined with the image boundary information of the target object in the color image, the target boundary information of the target object is determined. In this way, even if the target object has no obvious lines or interference information, the target boundary information can be accurately obtained. Further, cropping the color image according to the target boundary information can improve the accuracy of cropping, thereby improving user experience.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他 的附图。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1示出了适于用来实现本公开实施例的电子设备的结构示意图;FIG. 1 shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure;
图2示出了本公开实施例中图像裁剪方法的一种流程图;FIG. 2 shows a flowchart of an image cropping method in an embodiment of the present disclosure;
图3示出了本公开实施例中透视变换的一种流程图;FIG. 3 shows a flow chart of perspective transformation in an embodiment of the present disclosure;
图4示出了一种区域检测的一种示意图;Fig. 4 shows a kind of schematic diagram of a kind of area detection;
图5示出了本公开实施例中生成点云边界信息的一种流程图;FIG. 5 shows a flow chart of generating point cloud boundary information in an embodiment of the present disclosure;
图6示出了本公开实施例中目标物体和点云边界的一种示意图;6 shows a schematic diagram of a target object and a point cloud boundary in an embodiment of the present disclosure;
图7示出了本公开实施例中对图像进行线段检测的一种示意图;FIG. 7 shows a schematic diagram of performing line segment detection on an image in an embodiment of the present disclosure;
图8示出了本公开实施例中确定目标边界的一种示意图;FIG. 8 shows a schematic diagram of determining a target boundary in an embodiment of the present disclosure;
图9示出了本公开实施例中以视图模式与编辑模式显示裁剪图像的一种示意图;FIG. 9 shows a schematic diagram of displaying a cropped image in a view mode and an edit mode in an embodiment of the present disclosure;
图10示出了本公开实施例中以透视变换模式显示裁剪图像的一种示意图;FIG. 10 shows a schematic diagram of displaying a cropped image in a perspective transformation mode in an embodiment of the present disclosure;
图11示出了本公开实施例中图像裁剪装置的一种结构示意图。FIG. 11 shows a schematic structural diagram of an image cropping apparatus in an embodiment of the present disclosure.
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments, however, can be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
需要说明的是,本公开中,用语“包括”、“配置有”、“设置于”用以表示开放式的包括在内的意思,并且是指除了列出的要素/组成部分/等之外还可存在另外的要素/组成部分/等;用语“第一”、“第二”等仅作为标记使用,不是对其对象数量或次序的限制。It should be noted that, in the present disclosure, the terms "comprising", "configured with", and "disposed on" are used to indicate an open-ended inclusive meaning, and refer to elements/components/etc. other than the listed elements/components/etc. Additional elements/components/etc. may also be present; the terms "first," "second," etc. are used merely as labels and not as limitations on the number or order of the objects.
参见图1,图1示出了适于用来实现本公开实施例的电子设备的结构示意图。需要说明的是,图1示出的电子设备100仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring to FIG. 1 , FIG. 1 shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure. It should be noted that the electronic device 100 shown in FIG. 1 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
如图1所示,电子设备100具体可以包括:处理器110、无线通信 模块120、移动通信模块130、充电管理模块140、电源管理模块141、电池142、USB(Universal Serial Bus,通用串行总线)接口150、天线1、天线2、内部存储器161、外部存储器接口162、显示屏170、传感器模块180和摄像模组190等。As shown in FIG. 1 , the electronic device 100 may specifically include: a processor 110, a wireless communication module 120, a mobile communication module 130, a
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件、软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如,处理器110可以包括应用处理器、调制解调处理器、图形处理器、图像信号处理器、控制器、视频编解码器、数字信号处理器、基带处理器和/或神经网络处理器等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor , baseband processor and/or neural network processor, etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。存储器可以存储用于实现六个模块化功能的指令:检测指令、连接指令、信息管理指令、分析指令、数据传输指令和通知指令,并由处理器110来控制执行。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用,避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. The memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and the execution is controlled by the processor 110 . In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be directly called from the memory, which avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
显示屏170用于显示图像、视频等。The display screen 170 is used to display images, videos, and the like.
传感器模块180可以包括深度传感器、压力传感器、陀螺仪传感器、气压传感器、磁传感器、加速度传感器、距离传感器、指纹传感器、温度传感器和触摸传感器等。其中,深度传感器用于获取景物的深度信息。在一些实施例中,深度传感器可以设置于摄像模组190。The sensor module 180 may include a depth sensor, a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, and the like. Among them, the depth sensor is used to obtain the depth information of the scene. In some embodiments, the depth sensor may be disposed in the camera module 190 .
摄像模组190用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件把光信号转换成电信号,之后将电信号传递给图像信号处理器转换成数字图像信号。图像信号处理器将数字图像 信号输出到数字信号处理器加工处理。数字信号处理器将数字图像信号转换成标准的RGB、YUV等格式的图像信号。在一些实施例中,电子设备100可以包括一个或多个摄像模组190。The camera module 190 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the image signal processor to convert it into a digital image signal. The image signal processor outputs the digital image signal to the digital signal processor for processing. The digital signal processor converts the digital image signal into a standard RGB, YUV and other format image signal. In some embodiments, the electronic device 100 may include one or more camera modules 190 .
以下对本公开实施例的技术方案进行详细阐述。The technical solutions of the embodiments of the present disclosure are described in detail below.
在图像裁剪技术中,可以基于物体的边界信息对图像进行裁剪。然而,在图像中缺少可用边界以及存在干扰边界的情况下,导致图像裁剪的准确性较低。In the image cropping technology, the image can be cropped based on the boundary information of the object. However, the lack of available boundaries in the image as well as the presence of interfering boundaries results in lower accuracy of image cropping.
为了解决上述问题,本公开提供了一种图像裁剪方法与装置、电子设备及计算机可读存储介质,可以提高图像裁剪的准确性。In order to solve the above problems, the present disclosure provides an image cropping method and device, an electronic device and a computer-readable storage medium, which can improve the accuracy of image cropping.
参见图2,图2示出了本公开实施例中图像裁剪方法的一种流程图,可以包括以下步骤:Referring to FIG. 2, FIG. 2 shows a flowchart of an image cropping method in an embodiment of the present disclosure, which may include the following steps:
步骤S210,获取目标物体的彩色图像和深度图像。Step S210, acquiring a color image and a depth image of the target object.
步骤S220,对彩色图像进行透视变换,得到透视变换图像,并提取透视变换图像中目标物体的图像边界信息。Step S220: Perform perspective transformation on the color image to obtain a perspective transformed image, and extract image boundary information of the target object in the perspective transformed image.
步骤S230,根据基于深度图像生成的点云数据,确定目标物体的点云边界信息。Step S230: Determine point cloud boundary information of the target object according to the point cloud data generated based on the depth image.
步骤S240,基于图像边界信息和点云边界信息,得到目标边界信息。Step S240, based on the image boundary information and the point cloud boundary information, obtain target boundary information.
步骤S250,根据目标边界信息对彩色图像进行裁剪,得到裁剪图像。Step S250, crop the color image according to the target boundary information to obtain a cropped image.
本公开实施例的图像裁剪方法,通过深度图像确定目标物体的点云边界信息,从而可以得到目标物体的裁剪范围。并结合彩色图像中目标物体的图像边界信息,确定目标物体的目标边界信息。这样,即使目标物体在没有明显线条或者存在干扰信息的情况下,也可以准确得到目标边界信息。进一步的,根据目标边界信息对彩色图像进行裁剪,可以提高裁剪的准确性,从而可以提升用户体验。In the image cropping method of the embodiment of the present disclosure, the point cloud boundary information of the target object is determined by using the depth image, so that the cropping range of the target object can be obtained. And combined with the image boundary information of the target object in the color image, the target boundary information of the target object is determined. In this way, even if the target object has no obvious lines or interference information, the target boundary information can be accurately obtained. Further, cropping the color image according to the target boundary information can improve the accuracy of cropping, thereby improving user experience.
以下对本公开实施例的图像裁剪方法进行更加详细的介绍。The image cropping method according to the embodiment of the present disclosure will be introduced in more detail below.
在步骤S210中,获取目标物体的彩色图像和深度图像。In step S210, a color image and a depth image of the target object are acquired.
本公开实施例中,目标物体可以是用户要拍摄的任意物体,可以是 人物、动物或景物等。电子设备中可以包含多个不同的摄像模组,这样,针对同一个目标物体,可以拍摄不同的图像。例如,其中一个摄像模组可以拍摄彩色图像(例如RGB图像或YUV图像等)。另一个摄像模组可以拍摄目标物体的深度信息,得到深度图像。例如,可以通过TOF(Time of Flight,飞行时间)传感器获取目标物体的深度信息。具体的,TOF传感器发出经调制的近红外光,近红外光遇到物体后发生反射,通过计算光线发射和反射之间的时间差或相位差来确定TOF传感器与被拍摄物体之间的距离,从而获取深度信息。In this embodiment of the present disclosure, the target object may be any object to be photographed by the user, and may be a person, an animal, or a scene. The electronic device may contain multiple different camera modules, so that different images can be captured for the same target object. For example, one of the camera modules can capture color images (eg, RGB images or YUV images, etc.). Another camera module can capture the depth information of the target object to obtain a depth image. For example, the depth information of the target object can be obtained through a TOF (Time of Flight) sensor. Specifically, the TOF sensor emits modulated near-infrared light, and the near-infrared light is reflected after encountering an object. Get depth information.
TOF传感器具有不受光照变化和物体纹理影响的特点,在满足精度要求的前提下,还能够降低成本。而借助TOF传感器的三维数据来辅助获取目标物体的三维信息,计算透视变换矩阵,可以使文档扫描(指矫正透视关系)不依赖于图片信息,极大提高文档扫描的适用范围。当然,深度传感器也可以是结构光传感器或双目传感器等,本公开对此不做限定。TOF sensors are not affected by illumination changes and object textures, and can reduce costs on the premise of meeting the accuracy requirements. With the help of the three-dimensional data of the TOF sensor to assist in obtaining the three-dimensional information of the target object and calculating the perspective transformation matrix, the document scanning (referring to the correction of the perspective relationship) can be independent of the picture information, which greatly improves the application scope of the document scanning. Of course, the depth sensor may also be a structured light sensor or a binocular sensor, etc., which is not limited in the present disclosure.
在步骤S220中,对彩色图像进行透视变换,得到透视变换图像,并提取透视变换图像中目标物体的图像边界信息。In step S220, perspective transformation is performed on the color image to obtain a perspective transformed image, and image boundary information of the target object in the perspective transformed image is extracted.
需要说明的是,透视变换是将图像投影到一个新的视平面的过程。例如,对于现实中为直线的物体,在图像上可能呈现为斜线,通过透视变换可以将斜线转换成直线。It should be noted that perspective transformation is the process of projecting an image onto a new viewing plane. For example, an object that is a straight line in reality may appear as an oblique line on the image, and the oblique line can be converted into a straight line through perspective transformation.
参见图3,图3示出了本公开实施例中透视变换的一种流程图,可以包括以下步骤:Referring to FIG. 3, FIG. 3 shows a flowchart of perspective transformation in an embodiment of the present disclosure, which may include the following steps:
步骤S310,对基于深度图像生成的点云数据进行平面检测,根据检测到的平面确定透视变换矩阵。Step S310, performing plane detection on the point cloud data generated based on the depth image, and determining a perspective transformation matrix according to the detected plane.
其中,深度图像经过坐标转换之后可以生成点云数据,即将深度图像中的三维坐标转换为相机坐标系下的三维坐标,生成三维点云数据。之后,可以对三维点云数据进行平面检测,例如,可以通过RANSAC(Random Sample Consensus)等方法对三维点云数据进行平面检测,得到三维平面参数,该三维平面参数可以用于表示所检测到的平面。之后,可以根据该三维平面参数计算透视变换矩阵。例如,可以通过四点法等 计算透视变换矩阵。Among them, point cloud data can be generated after the depth image is transformed by coordinates, that is, the three-dimensional coordinates in the depth image are converted into three-dimensional coordinates in the camera coordinate system to generate three-dimensional point cloud data. After that, plane detection can be performed on the 3D point cloud data. For example, RANSAC (Random Sample Consensus) and other methods can be used to perform plane detection on the 3D point cloud data to obtain 3D plane parameters. The 3D plane parameters can be used to represent the detected flat. Afterwards, the perspective transformation matrix can be calculated according to the three-dimensional plane parameters. For example, the perspective transformation matrix can be calculated by the four-point method or the like.
步骤S320,通过透视变换矩阵对彩色图像进行透视变换,得到透视变换图像。Step S320: Perform perspective transformation on the color image through a perspective transformation matrix to obtain a perspective transformed image.
在得到透视变换矩阵之后,对于彩色图像中的每个像素,将该像素的位置坐标与透视变换矩阵相乘,即可得到透视变换后的位置坐标。每个像素均执行以上过程,即可得到透视变换图像。After the perspective transformation matrix is obtained, for each pixel in the color image, the position coordinates of the pixel are multiplied by the perspective transformation matrix to obtain the position coordinates after perspective transformation. The above process is performed for each pixel to obtain a perspective transformed image.
本公开实施例中,从透视变换图像中可以更准确地提取到目标物体的图像边界信息。在本公开的一种实现方式中,可以对透视变换图像进行线段检测,例如,可以通过霍夫变换等方式对透视变换图像进行线段检测。其中,霍夫变换不仅能识别图像中的直线,也能够识别其他任何形状,例如圆形、椭圆形等。在透视变换图像中包含线段信息时,可以根据线段信息确定目标物体的图像边界信息。In the embodiment of the present disclosure, the image boundary information of the target object can be more accurately extracted from the perspective transformed image. In an implementation manner of the present disclosure, line segment detection may be performed on the perspective transformed image, for example, line segment detection may be performed on the perspective transformed image by means of Hough transform or the like. Among them, the Hough transform can not only identify the straight lines in the image, but also any other shapes, such as circles, ellipses, etc. When the line segment information is included in the perspective transformed image, the image boundary information of the target object can be determined according to the line segment information.
具体的,本公开还可以根据线段的长度、角度等信息进行有效性判断以及归类。例如,可以将较短的线段归为无效的线段,将较长的线段归为有效线段等。有效性判断可以将无效的线段信息删除,将有效的线段信息保留。归类指的是将线段分为不同的类别,例如,可以将线段分为横向线段、竖向线段等。最终提取的目标物体的图像边界信息可以包含多个线段信息。Specifically, the present disclosure can also perform validity judgment and classification according to information such as the length and angle of the line segment. For example, shorter segments can be classified as invalid segments, longer segments as valid segments, and so on. The validity judgment can delete the invalid line segment information and keep the valid line segment information. Classification refers to dividing line segments into different categories, for example, line segments can be divided into horizontal line segments, vertical line segments, and so on. The image boundary information of the final extracted target object may contain multiple line segment information.
在另一种情况下,如果透视变换图像中不包含线段信息,通过上述线段检测方法将无法得到目标物体的图像边界信息。此时,可以基于区域检测算法对透视变换图像进行处理,得到主体区域图像。具体的,对于透视变换图像,可以先计算显著性分布,之后再计算范围框。区域检测算法可以采用注意力区域检测算法、主体区域检测算法或基于显著性区域检测的方法等,其中,基于显著性区域检测的方法包括:DeepGaze、DenseGaze、FastGaze等。In another case, if the perspective transformed image does not contain line segment information, the image boundary information of the target object cannot be obtained by the above-mentioned line segment detection method. At this time, the perspective transformation image can be processed based on the region detection algorithm to obtain the main body region image. Specifically, for a perspective transformed image, the saliency distribution can be calculated first, and then the range box can be calculated. The region detection algorithm may adopt an attention region detection algorithm, a main region detection algorithm, or a method based on saliency region detection, etc., wherein the method based on salient region detection includes: DeepGaze, DenseGaze, FastGaze, and the like.
参见图4,图4示出了一种区域检测的一种示意图,可以看出,通过区域检测,可以得到主体区域图像,主体区域图像中包含一个范围框,该范围框中包含目标物体。之后,可以根据主体区域图像,确定目标物体的图像边界信息。可以理解的是,图4中的范围框可以为目标物体的 图像边界。Referring to FIG. 4, FIG. 4 shows a schematic diagram of a region detection. It can be seen that through region detection, a subject region image can be obtained, and the subject region image includes a range frame, and the range frame contains a target object. After that, the image boundary information of the target object can be determined according to the subject area image. It can be understood that the range box in Fig. 4 can be the image boundary of the target object.
需要说明的是,在提取透视变换图像中目标物体的图像边界信息时,可以在经过线段检测之后,未检测到线段信息的情况下,利用区域检测算法,也可以直接利用区域检测算法,本公开不做限定。并且,在利用区域检测算法时,可以单独对透视变换图像进行处理,也可以对透视变换图像和深度图像分别进行处理,并在处理之后进行融合,这样可以提高图像边界信息确定的准确性。It should be noted that, when extracting the image boundary information of the target object in the perspective transformed image, the region detection algorithm can be used after line segment detection and the line segment information is not detected, or the region detection algorithm can be directly used. Not limited. Moreover, when using the region detection algorithm, the perspective transformed image can be processed separately, or the perspective transformed image and the depth image can be processed separately, and fused after processing, which can improve the accuracy of image boundary information determination.
在步骤S230中,根据基于深度图像生成的点云数据,确定目标物体的点云边界信息。In step S230, point cloud boundary information of the target object is determined according to the point cloud data generated based on the depth image.
本公开实施例中,除了基于彩色图像确定图像边界信息之外,还可以基于深度图像确定点云边界信息,从更多层面来确定目标物体的边界信息,以提高最终确定的边界信息的准确性。In the embodiment of the present disclosure, in addition to determining the image boundary information based on the color image, the point cloud boundary information can also be determined based on the depth image, and the boundary information of the target object can be determined from more levels, so as to improve the accuracy of the final determined boundary information. .
具体的,根据深度图像生成点云数据的过程可参见步骤S310中的描述。根据点云数据确定目标物体的点云边界信息的过程可参见图5,图5示出了本公开实施例中生成点云边界信息的一种流程图,可以包括以下步骤:Specifically, for the process of generating point cloud data according to the depth image, reference may be made to the description in step S310. For the process of determining the point cloud boundary information of the target object according to the point cloud data, reference may be made to FIG. 5 . FIG. 5 shows a flowchart of generating point cloud boundary information in an embodiment of the present disclosure, which may include the following steps:
步骤S510,在对点云数据进行平面检测后,得到平面点云数据。In step S510, after plane detection is performed on the point cloud data, plane point cloud data is obtained.
如前所述,在对点云数据进行平面检测之后,可以得到三维平面参数。根据三维平面参数,可以抽取属于该平面的点云,得到平面点云数据。需要说明的是,属于该平面的点云数据,可以是在该平面上的数据,也可以是在该平面上的点云数据,以及与该平面的距离小于距离阈值的点云数据。距离阈值可以根据实际情况进行设定,距离阈值越小,图像裁剪的准确度越高。As mentioned above, after plane detection is performed on the point cloud data, the 3D plane parameters can be obtained. According to the three-dimensional plane parameters, the point cloud belonging to the plane can be extracted to obtain plane point cloud data. It should be noted that the point cloud data belonging to the plane may be data on the plane, or point cloud data on the plane, and point cloud data whose distance from the plane is less than the distance threshold. The distance threshold can be set according to the actual situation. The smaller the distance threshold, the higher the accuracy of image cropping.
步骤S520,确定平面点云数据的包围盒。Step S520, determining the bounding box of the plane point cloud data.
具体的,假设所检测的平面为目标平面,可以以目标平面的法线以及目标平面的两个切向为正交基建立直角坐标系,在该坐标系下计算平面点云数据的包围盒。包围盒是一种求解离散点集最优包围空间的算法,可以用体积稍大且特性简单的几何体(称为包围盒)来近似地代替复杂的几何对象。包围盒包括:AABB包围盒、包围球、方向包围盒 OBB以及固定方向凸包等。Specifically, assuming that the detected plane is the target plane, a rectangular coordinate system can be established with the normal of the target plane and the two tangential directions of the target plane as the orthogonal basis, and the bounding box of the plane point cloud data can be calculated in this coordinate system. Bounding box is an algorithm for solving the optimal bounding space of a discrete point set, which can replace complex geometric objects approximately with geometric objects with slightly larger volume and simple characteristics (called bounding boxes). Bounding boxes include: AABB bounding box, bounding sphere, directional bounding box OBB, and fixed-direction convex hull, etc.
AABB包围盒是包含目标对象,且边平行于坐标轴的最小六面体。本公开在使用AABB包围盒时,计算包围盒的过程,也就是计算沿着该坐标系各轴向的最大和最小值。The AABB bounding box is the smallest hexahedron that contains the target object and whose sides are parallel to the coordinate axes. When the AABB bounding box is used in the present disclosure, the process of calculating the bounding box is to calculate the maximum and minimum values along each axis of the coordinate system.
步骤S530,将包围盒映射至透视变换图像,得到目标物体的点云边界信息。Step S530, mapping the bounding box to the perspective transformation image to obtain point cloud boundary information of the target object.
本公开实施例中,在得到包围盒之后,直接将包围盒的三维范围(最大值和最小值)定点投影至透视变换图像,即可得到点云边界信息。In the embodiment of the present disclosure, after the bounding box is obtained, the point cloud boundary information can be obtained by directly projecting the three-dimensional range (maximum value and minimum value) of the bounding box to the perspective transformed image.
需要说明的是,在得到平面点云数据之后,在执行步骤S520之前,可以对平面点云数据进行滤波处理,通过滤波处理,可以滤除掉噪声点云数据,从而可以得到目标平面点云数据。在本公开的一种实现方式中,可以对平面点云数据进行距离滤波处理,例如通过统计点云的密度,将密度较低的点云作为噪音进行滤除。即通过距离滤波来滤除平面点云数据中被误判为属于目标平面的噪声点云。It should be noted that, after the plane point cloud data is obtained, before step S520 is performed, the plane point cloud data can be filtered. Through the filtering process, the noise point cloud data can be filtered out, so that the target plane point cloud data can be obtained. . In an implementation manner of the present disclosure, distance filtering processing may be performed on the plane point cloud data, for example, by counting the density of the point cloud, and filtering out the point cloud with a lower density as noise. That is, the noise point cloud that is misjudged as belonging to the target plane in the plane point cloud data is filtered out by distance filtering.
在本公开的又一种实现方式中,还可以对平面点云数据进行聚类滤波处理,例如通过对平面点云数据进行聚类,抽取出平面点云数据的数量最多的类。这样,可以滤除属于其他物体但因为和目标平面相交而被计算的非主体点云。其中,聚类算法可以使K均值聚类算法、DBSCAN(Density-Based Spatial Clustering of Applications with Noise)聚类算法等。当然,也可以对平面点云数据进行距离滤波处理以及聚类滤波处理,与单独进行距离滤波处理或者进行聚类滤波处理相比,可以进一步提高目标平面点云数据的准确性。In another implementation manner of the present disclosure, the plane point cloud data may also be subjected to clustering filtering processing, for example, by clustering the plane point cloud data, to extract the class with the largest number of plane point cloud data. In this way, non-subject point clouds that belong to other objects but are computed because they intersect the target plane can be filtered out. Among them, the clustering algorithm can be K-means clustering algorithm, DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm, etc. Of course, distance filtering processing and clustering filtering processing can also be performed on the plane point cloud data, which can further improve the accuracy of the target plane point cloud data compared with performing distance filtering processing or performing cluster filtering processing alone.
相应地,在滤波处理之后,可以确定目标平面点云数据的包围盒,从而可以提高包围盒的准确性,进而可以提高点云边界信息的准确性。Correspondingly, after the filtering process, the bounding box of the point cloud data of the target plane can be determined, so that the accuracy of the bounding box can be improved, and then the accuracy of the boundary information of the point cloud can be improved.
在步骤S240中,基于图像边界信息和点云边界信息,得到目标边界信息。In step S240, target boundary information is obtained based on the image boundary information and the point cloud boundary information.
本公开实施例中,图像边界信息是用于描述图像边界的信息,不同的图像边界信息对应不同的图像边界。点云边界信息是用于描述点云边界的信息,不同的点云边界信息对应不同的点云边界。将基于彩色图像 所计算的图像边界信息与基于点云数据所计算的点云边界信息进行融合,可以获得更为精确的目标边界信息。In this embodiment of the present disclosure, the image boundary information is information used to describe the image boundary, and different image boundary information corresponds to different image boundaries. The point cloud boundary information is the information used to describe the point cloud boundary, and different point cloud boundary information corresponds to different point cloud boundaries. By fusing the image boundary information calculated based on the color image with the point cloud boundary information calculated based on the point cloud data, more accurate target boundary information can be obtained.
其中,融合方式可以为以点云边界为初始值,从图像边界中选取一定范围内最靠点云边界外侧的边界;也可以为以点云边界为初始值,从图像边界中选取一定范围内最靠点云边界里侧的边界。Among them, the fusion method can be to take the point cloud boundary as the initial value, and select the boundary closest to the outside of the point cloud boundary within a certain range from the image boundary; it can also be to use the point cloud boundary as the initial value, and select a certain range from the image boundary. The boundary closest to the inner side of the point cloud boundary.
参见图6,图6示出了本公开实施例中目标物体和点云边界的一种示意图。由于受传感器性能、传感器精度、物体的反射特性等的影响,使得点云数据里存在大量噪声点云,因而基于包围盒的检测算法无法给出非常精确的物体范围。也就是,受到噪声点云的影响,根据点云数据无法准确确定目标物体的边界。可以看出,点云边界与目标物体的实际边界差距较大。Referring to FIG. 6, FIG. 6 shows a schematic diagram of a target object and a point cloud boundary in an embodiment of the present disclosure. Due to the influence of sensor performance, sensor accuracy, reflection characteristics of objects, etc., there are a lot of noise point clouds in the point cloud data, so the detection algorithm based on the bounding box cannot give a very accurate object range. That is, affected by the noise point cloud, the boundary of the target object cannot be accurately determined according to the point cloud data. It can be seen that there is a large gap between the point cloud boundary and the actual boundary of the target object.
根据本公开实施例的方法,例如通过线段检测,可以得到如图7所示的检测结果,即可以检测到多条直线。由于检测到的直线在点云边界的里侧,因此,将检测到的直线以及点云边界进行融合时,可以以点云边界为初始值,从多条直线中选取最靠点云边界里侧的边界,融合之后的目标边界可参见图8。According to the method of the embodiment of the present disclosure, for example, through line segment detection, the detection result shown in FIG. 7 can be obtained, that is, multiple straight lines can be detected. Since the detected line is on the inner side of the point cloud boundary, when the detected line and the point cloud boundary are fused, the point cloud boundary can be used as the initial value, and the most inner side of the point cloud boundary can be selected from multiple straight lines. The boundary of the target after fusion can be seen in Figure 8.
另外,还可以以点云边界为初始值,从图像边界中选取与该点云边界距离最近且夹角小于角度阈值的线段,即目标线段,并将目标线段对应的线段信息作为目标边界信息。角度阈值可以根据实际情况进行设置,例如可以是10°、15°等。由于图像边界可以包括多个方向,例如,对于矩形边界,包括四个不同的方向。因此,与点云边界距离最近且夹角小于角度阈值的线段指的是分别与各个方向的点云边界距离最近且夹角小于角度阈值的线段。相应地,最终选取的线段也是多个方向的线段,多个方向的线段构成目标边界。In addition, the point cloud boundary can be used as the initial value, and the line segment with the closest distance to the point cloud boundary and the included angle smaller than the angle threshold, that is, the target line segment, can be selected from the image boundary, and the line segment information corresponding to the target line segment can be used as the target boundary information. The angle threshold can be set according to the actual situation, for example, it can be 10°, 15° and so on. Since an image boundary can include multiple directions, for example, for a rectangular boundary, four different directions are included. Therefore, the line segment with the closest distance to the point cloud boundary and whose included angle is smaller than the angle threshold refers to the line segment with the closest distance to the point cloud boundary in each direction and whose included angle is smaller than the angle threshold. Correspondingly, the line segments finally selected are also line segments in multiple directions, and the line segments in multiple directions constitute the target boundary.
在本公开的一种实现方式中,在得到目标边界信息后,可以不对彩色图像进行裁剪,而是将目标边界信息显示在彩色图像中,供用户参考,以使用户基于目标边界信息手动对彩色图像进行裁剪。也就是,将目标边界信息显示在彩色图像中,来辅助用户手动裁剪,用户可以直接按照目标边界信息进行裁剪,当然也可以不按照目标边界信息进行裁剪。In an implementation manner of the present disclosure, after obtaining the target boundary information, the color image may not be cropped, but the target boundary information may be displayed in the color image for the user's reference, so that the user can manually adjust the color image based on the target boundary information. Image is cropped. That is, the target boundary information is displayed in the color image to assist the user in manual cropping. The user may directly crop according to the target boundary information, or of course, it may not be cropped according to the target boundary information.
在步骤S250中,根据目标边界信息对彩色图像进行裁剪,得到裁剪图像。In step S250, the color image is cropped according to the target boundary information to obtain a cropped image.
需要说明的是,在得到目标边界信息后,也可以直接自动裁剪,得到裁剪图像。在得到裁剪图像后,还可以将裁剪图像显示给用户。如图9所示,在显示裁剪图像时,还可以以视图模式进行显示,用户可以点击“手动裁剪”进入编辑模式,用户可以进一步手动裁剪图像。It should be noted that, after obtaining the target boundary information, it can also be directly and automatically cropped to obtain a cropped image. After the cropped image is obtained, the cropped image can also be displayed to the user. As shown in FIG. 9 , when displaying the cropped image, it can also be displayed in view mode, the user can click “manual crop” to enter the editing mode, and the user can further manually crop the image.
在编辑模式下,用户可以调整裁剪框、旋转图像、平移图像、拉伸图像、对图像进行透视变换等。用户可以拖曳裁剪框的四个角点来调整裁剪框的大小,或者通过拖曳裁剪框的边界来调整裁剪框的大小。用户可以通过拖曳的方式来实现图像的旋转,旋转时可以显示旋转的角度以辅助用户旋转,还可以通过拖曳的方式来实现图像的平移,以及通过双指触碰的拉伸来拉伸图像,也可以通过滑动条的方式来实现半自动拉伸。In edit mode, users can adjust the crop box, rotate the image, translate the image, stretch the image, apply a perspective transformation to the image, and more. The user can drag the four corners of the cropping frame to adjust the size of the cropping frame, or adjust the size of the cropping frame by dragging the borders of the cropping frame. The user can rotate the image by dragging. When rotating, the rotation angle can be displayed to assist the user to rotate. The image can also be panned by dragging, and the image can be stretched by touching with two fingers. Semi-automatic stretching can also be achieved by means of a sliding bar.
本公开实施例中,用户可以点击“透视变换”进入透视变换模式。如图10所示,通过给定四个角点,可以使用户手动拖曳各个角点实现透视变换。In this embodiment of the present disclosure, the user can click "Perspective Transformation" to enter the perspective transformation mode. As shown in Figure 10, by giving four corner points, the user can manually drag each corner point to realize perspective transformation.
在用户对裁剪图像进行编辑操作时,电子设备响应于用户对裁剪图像的编辑操作,对裁剪图像进行编辑,从而可以得到更符合用户需求的图像。When the user performs an editing operation on the cropped image, the electronic device edits the cropped image in response to the user's editing operation on the cropped image, so that an image that better meets the user's needs can be obtained.
本公开实施例的图像裁剪方法,通过对点云数据进行平面检测获取平面点云数据,基于平面点云数据对彩色图像进行透视变换,得到透视变换图像,使得透视变换不依赖于图像信息。并基于平面点云数据的三维信息去计算包围盒,根据包围盒在透视变换图像中的投影位置,从而得到裁剪范围的信息。通过利用彩色图像中的线段信息,可以进一步辅助修正点云检测的结果,提高自动裁剪的精度。或者通过对彩色图像进行区域检测,可以在没有线段信息的情况下也获得主体范围,辅助自动裁剪的范围计算。因此,本公开可以在目标物体没有明显的线条或任何方向信息的情况下,甚至是存在干扰的信息(如物体的线段条纹等)的情况下,准确的获得目标物体的边界范围,进行自动裁剪,可以提高裁 剪的准确性。并且,用户也可以进一步进行手动裁剪,从而可以得到更符合用户需求的图像。The image cropping method of the embodiment of the present disclosure obtains plane point cloud data by performing plane detection on the point cloud data, and performs perspective transformation on a color image based on the plane point cloud data to obtain a perspective transformed image, so that perspective transformation does not depend on image information. And based on the three-dimensional information of the plane point cloud data, the bounding box is calculated, and the information of the cropping range is obtained according to the projection position of the bounding box in the perspective transformed image. By using the line segment information in the color image, it can further assist to correct the result of point cloud detection and improve the accuracy of automatic cropping. Or by performing region detection on a color image, the subject range can be obtained without line segment information to assist in the range calculation of automatic cropping. Therefore, the present disclosure can accurately obtain the boundary range of the target object and perform automatic cropping when the target object has no obvious lines or any direction information, or even when there is interfering information (such as line segment stripes of the object, etc.). , which can improve the accuracy of cropping. In addition, the user can further perform manual cropping, so as to obtain an image that is more in line with the user's needs.
应当注意,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。It should be noted that although the various steps of the methods of the present disclosure are depicted in the figures in a particular order, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps must be performed to achieve the desired the result of. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, and the like.
相应于上述方法实施例,本公开实施例还提供了一种图像裁剪装置,参见图11,图像裁剪装置1100,包括:Corresponding to the above method embodiments, the embodiments of the present disclosure further provide an image cropping apparatus. Referring to FIG. 11 , an
图像获取模块1110,用于获取目标物体的彩色图像和深度图像;The
图像边界信息确定模块1120,用于对彩色图像进行透视变换,得到透视变换图像,并提取透视变换图像中目标物体的图像边界信息;The image boundary
点云边界信息确定模块1130,用于根据基于深度图像生成的点云数据,确定目标物体的点云边界信息;The point cloud boundary information determination module 1130 is configured to determine the point cloud boundary information of the target object according to the point cloud data generated based on the depth image;
目标边界信息确定模块1140,用于基于图像边界信息和点云边界信息,得到目标边界信息;a target boundary information determination module 1140, configured to obtain target boundary information based on the image boundary information and the point cloud boundary information;
图像裁剪模块1150,用于根据目标边界信息对彩色图像进行裁剪,得到裁剪图像。The
在本公开的一种示例性实施例中,图像边界信息确定模块,包括:In an exemplary embodiment of the present disclosure, the image boundary information determination module includes:
线段检测单元,用于对透视变换图像进行线段检测;a line segment detection unit for performing line segment detection on the perspective transformed image;
图像边界信息第一确定单元,用于在透视变换图像中包含线段信息时,根据线段信息确定目标物体的图像边界信息。The image boundary information first determining unit is configured to determine the image boundary information of the target object according to the line segment information when the perspective transformation image contains line segment information.
在本公开的一种示例性实施例中,图像边界信息确定模块,还包括:In an exemplary embodiment of the present disclosure, the image boundary information determination module further includes:
图像边界信息第二确定单元,用于在透视变换图像中不包含线段信息时,基于区域检测算法对透视变换图像进行处理,得到主体区域图像;根据主体区域图像,确定目标物体的图像边界信息。The second image boundary information determining unit is used to process the perspective transformed image based on a region detection algorithm when the line segment information is not included in the perspective transformed image to obtain an image of the main region; and determine the image boundary information of the target object according to the image of the main region.
在本公开的一种示例性实施例中,图像边界信息确定模块,还包括:In an exemplary embodiment of the present disclosure, the image boundary information determination module further includes:
透视变换单元,用于对基于深度图像生成的点云数据进行平面检测,根据检测到的平面确定透视变换矩阵;通过透视变换矩阵对彩色图 像进行透视变换,得到透视变换图像。The perspective transformation unit is used to perform plane detection on the point cloud data generated based on the depth image, and determine a perspective transformation matrix according to the detected plane; perform perspective transformation on the color image through the perspective transformation matrix to obtain a perspective transformation image.
在本公开的一种示例性实施例中,点云边界信息确定模块包括:In an exemplary embodiment of the present disclosure, the point cloud boundary information determination module includes:
平面点云数据获取单元,用于在对基于深度图像生成的点云数据进行平面检测后,得到平面点云数据;The plane point cloud data acquisition unit is used to obtain plane point cloud data after plane detection is performed on the point cloud data generated based on the depth image;
包围盒确定单元,用于确定平面点云数据的包围盒;The bounding box determination unit is used to determine the bounding box of the plane point cloud data;
映射单元,用于将包围盒映射至透视变换图像,得到目标物体的点云边界信息。The mapping unit is used to map the bounding box to the perspective transformation image to obtain the point cloud boundary information of the target object.
在本公开的一种示例性实施例中,上述图像裁剪装置还包括:In an exemplary embodiment of the present disclosure, the above-mentioned image cropping apparatus further includes:
平面点云数据过滤模块,用于在得到平面点云数据之后,对平面点云数据进行滤波处理,得到目标平面点云数据;The plane point cloud data filtering module is used to filter the plane point cloud data after obtaining the plane point cloud data to obtain the target plane point cloud data;
包围盒确定单元,具体用于确定目标平面点云数据的包围盒。The bounding box determination unit is specifically used to determine the bounding box of the point cloud data of the target plane.
在本公开的一种示例性实施例中,平面点云数据过滤模块具体用于对平面点云数据进行距离滤波处理;或对平面点云数据进行聚类滤波处理;或对平面点云数据进行距离滤波处理以及聚类滤波处理。In an exemplary embodiment of the present disclosure, the plane point cloud data filtering module is specifically configured to perform distance filtering processing on plane point cloud data; or perform cluster filtering processing on plane point cloud data; or perform distance filtering processing on plane point cloud data; Distance filtering processing and cluster filtering processing.
在本公开的一种示例性实施例中,目标边界信息确定模块,包括:In an exemplary embodiment of the present disclosure, the target boundary information determination module includes:
目标线段选取单元,用于从图像边界信息所表示的线段中选取目标线段,其中,目标线段与点云边界信息所表示的线段距离最近且夹角小于角度阈值;The target line segment selection unit is used to select the target line segment from the line segment represented by the image boundary information, wherein the target line segment is the closest to the line segment represented by the point cloud boundary information and the included angle is smaller than the angle threshold;
目标边界信息确定单元,用于将目标线段对应的线段信息作为目标边界信息。The target boundary information determining unit is used for taking the line segment information corresponding to the target line segment as the target boundary information.
在本公开的一种示例性实施例中,上述图像裁剪装置还包括:In an exemplary embodiment of the present disclosure, the above-mentioned image cropping apparatus further includes:
图像显示模块,用于在得到目标边界信息后,将目标边界信息显示在彩色图像中,以使用户基于目标边界信息对彩色图像进行裁剪。The image display module is used for displaying the target boundary information in the color image after obtaining the target boundary information, so that the user can crop the color image based on the target boundary information.
在本公开的一种示例性实施例中,上述图像裁剪装置还包括:In an exemplary embodiment of the present disclosure, the above-mentioned image cropping apparatus further includes:
图像显示模块,还用于在得到裁剪图像后,将裁剪图像显示给用户;The image display module is also used for displaying the cropped image to the user after the cropped image is obtained;
图像编辑模块,用于响应于用户对裁剪图像的编辑操作,对裁剪图像进行编辑。The image editing module is used to edit the cropped image in response to the user's editing operation on the cropped image.
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被计算机执行时,计算机执行上述 任意一项所述的方法。In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer executes any of the methods described above.
需要说明的是,本公开所示的计算机可读存储介质例如可以是—但不限于—电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器、只读存储器、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、射频等等,或者上述的任意合适的组合。It should be noted that the computer-readable storage medium shown in the present disclosure can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory, read only memory, erasable programmable read only memory (EPROM) or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, radio frequency, etc., or any suitable combination of the foregoing.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Other embodiments of the present disclosure will readily suggest themselves to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (13)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/101938 WO2022011560A1 (en) | 2020-07-14 | 2020-07-14 | Image cropping method and apparatus, electronic device, and storage medium |
| CN202080102636.0A CN115836322B (en) | 2020-07-14 | 2020-07-14 | Image cropping method and device, electronic device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/101938 WO2022011560A1 (en) | 2020-07-14 | 2020-07-14 | Image cropping method and apparatus, electronic device, and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022011560A1 true WO2022011560A1 (en) | 2022-01-20 |
Family
ID=79555933
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/101938 Ceased WO2022011560A1 (en) | 2020-07-14 | 2020-07-14 | Image cropping method and apparatus, electronic device, and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN115836322B (en) |
| WO (1) | WO2022011560A1 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115100270A (en) * | 2022-06-14 | 2022-09-23 | 广州艾视维智能科技有限公司 | A method and device for intelligent extraction of various trajectories based on 3D image information |
| CN115575976A (en) * | 2022-10-13 | 2023-01-06 | 深圳市正浩创新科技股份有限公司 | Path planning method, device, computer readable medium and electronic device along edge |
| CN117329971A (en) * | 2023-12-01 | 2024-01-02 | 海博泰科技(青岛)有限公司 | A method and system for cabin balance detection based on three-dimensional lidar |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105139359A (en) * | 2015-09-02 | 2015-12-09 | 小米科技有限责任公司 | Image converting method and device |
| CN107194962A (en) * | 2017-04-01 | 2017-09-22 | 深圳市速腾聚创科技有限公司 | Point cloud and plane picture fusion method and device |
| CN107578418A (en) * | 2017-09-08 | 2018-01-12 | 华中科技大学 | A kind of indoor scene profile testing method of confluent colours and depth information |
| US20190164346A1 (en) * | 2017-11-27 | 2019-05-30 | Electronics And Telecommunications Research Institute | Method and apparatus for providing realistic 2d/3d ar experience service based on video image |
| CN110427917A (en) * | 2019-08-14 | 2019-11-08 | 北京百度网讯科技有限公司 | Method and apparatus for detecting key point |
| CN110580725A (en) * | 2019-09-12 | 2019-12-17 | 浙江大学滨海产业技术研究院 | A kind of box sorting method and system based on RGB-D camera |
| CN111104921A (en) * | 2019-12-30 | 2020-05-05 | 西安交通大学 | Multi-mode pedestrian detection model and method based on Faster rcnn |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2886043A1 (en) * | 2013-12-23 | 2015-06-24 | a.tron3d GmbH | Method for continuing recordings to detect three-dimensional geometries of objects |
| US10593042B1 (en) * | 2017-04-11 | 2020-03-17 | Zoox, Inc. | Perspective conversion for multi-dimensional data analysis |
| CN109087388A (en) * | 2018-07-12 | 2018-12-25 | 南京邮电大学 | Object dimensional modeling method based on depth transducer |
| CN110120010B (en) * | 2019-04-12 | 2023-02-07 | 嘉兴恒创电力集团有限公司博创物资分公司 | Camera image stitching-based visual checking method and system for three-dimensional goods shelf |
| CN110796602B (en) * | 2019-10-30 | 2021-08-31 | 福州大学 | A method for reducing image distortion after perspective transformation |
-
2020
- 2020-07-14 CN CN202080102636.0A patent/CN115836322B/en active Active
- 2020-07-14 WO PCT/CN2020/101938 patent/WO2022011560A1/en not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105139359A (en) * | 2015-09-02 | 2015-12-09 | 小米科技有限责任公司 | Image converting method and device |
| CN107194962A (en) * | 2017-04-01 | 2017-09-22 | 深圳市速腾聚创科技有限公司 | Point cloud and plane picture fusion method and device |
| CN107578418A (en) * | 2017-09-08 | 2018-01-12 | 华中科技大学 | A kind of indoor scene profile testing method of confluent colours and depth information |
| US20190164346A1 (en) * | 2017-11-27 | 2019-05-30 | Electronics And Telecommunications Research Institute | Method and apparatus for providing realistic 2d/3d ar experience service based on video image |
| CN110427917A (en) * | 2019-08-14 | 2019-11-08 | 北京百度网讯科技有限公司 | Method and apparatus for detecting key point |
| CN110580725A (en) * | 2019-09-12 | 2019-12-17 | 浙江大学滨海产业技术研究院 | A kind of box sorting method and system based on RGB-D camera |
| CN111104921A (en) * | 2019-12-30 | 2020-05-05 | 西安交通大学 | Multi-mode pedestrian detection model and method based on Faster rcnn |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115100270A (en) * | 2022-06-14 | 2022-09-23 | 广州艾视维智能科技有限公司 | A method and device for intelligent extraction of various trajectories based on 3D image information |
| CN115575976A (en) * | 2022-10-13 | 2023-01-06 | 深圳市正浩创新科技股份有限公司 | Path planning method, device, computer readable medium and electronic device along edge |
| CN117329971A (en) * | 2023-12-01 | 2024-01-02 | 海博泰科技(青岛)有限公司 | A method and system for cabin balance detection based on three-dimensional lidar |
| CN117329971B (en) * | 2023-12-01 | 2024-02-27 | 海博泰科技(青岛)有限公司 | A method and system for cabin balance detection based on three-dimensional lidar |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115836322A (en) | 2023-03-21 |
| CN115836322B (en) | 2024-11-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11521311B1 (en) | Collaborative disparity decomposition | |
| Liang et al. | Image based localization in indoor environments | |
| US20230047211A1 (en) | Method and system for automatic characterization of a three-dimensional (3d) point cloud | |
| CN109801374B (en) | Method, medium, and system for reconstructing three-dimensional model through multi-angle image set | |
| CN109102537B (en) | Three-dimensional modeling method and system combining two-dimensional laser radar and dome camera | |
| CN112598780B (en) | Method and device for constructing instance object model, readable medium and electronic device | |
| CN109118569A (en) | Rendering method and device based on threedimensional model | |
| CN108830892B (en) | Face image processing method and device, electronic equipment and computer readable storage medium | |
| US20190228263A1 (en) | Training assistance using synthetic images | |
| WO2019161813A1 (en) | Dynamic scene three-dimensional reconstruction method, apparatus and system, server, and medium | |
| CN109640066B (en) | Method and device for generating high-precision dense depth image | |
| US9311756B2 (en) | Image group processing and visualization | |
| CN108830894A (en) | Remote guide method, apparatus, terminal and storage medium based on augmented reality | |
| CN113763478B (en) | Unmanned vehicle camera calibration method, device, equipment, storage medium and system | |
| CN113052907B (en) | Positioning method of mobile robot in dynamic environment | |
| WO2018112788A1 (en) | Image processing method and device | |
| CN116109684B (en) | Online video monitoring two-dimensional and three-dimensional data mapping method and device for variable electric field station | |
| CN110798677A (en) | Three-dimensional scene modeling method and device, electronic device, readable storage medium and computer equipment | |
| WO2022011560A1 (en) | Image cropping method and apparatus, electronic device, and storage medium | |
| CN112270702A (en) | Volume measurement method and apparatus, computer readable medium and electronic device | |
| CN114399781A (en) | Document image processing method and device, electronic equipment and storage medium | |
| CN113298708A (en) | Three-dimensional house type generation method, device and equipment | |
| CN117115274B (en) | Method, device, equipment and storage medium for determining three-dimensional information | |
| CN114677439A (en) | Camera pose determination method and device, electronic equipment and storage medium | |
| CN113362387B (en) | Environment map construction method of dynamic environment mobile robot |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20945142 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20945142 Country of ref document: EP Kind code of ref document: A1 |