Image processing apparatus and method
By using an image processing device to perform grayscale and binarization processing in structured light technology, the curvature image is generated, and the complex problems of high-frequency shooting and precision calculation in the prior art are solved, the equipment burden and calculation complexity are simplified, and the image processing application is expanded.
Patent Information
- Application Number
- CN202311672361.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-23
- Filing Date
- 2023-12-06
- Publication Date
- 2025-05-23
AI Technical Summary
The existing structured light technology requires high frequency shooting of structured light images and precisely calculating the three-dimensional coordinates of objects, resulting in high equipment burden and calculation complexity.
Through the image processing device, a structured light image is captured and grayscale processing and binarization processing are performed to generate a curvature image. The device includes a photographing device and a computing circuit that generates a corresponding curvature image based on the binarized image.
It realizes the generation of curvature images of structured light images without high frequency shooting and precise calculation of three-dimensional coordinates, which simplifies the equipment burden and calculation complexity, and expands image processing applications.
Smart Images

Figure CN120034727A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention mainly relate to an image processing technology, and more particularly to an image processing technology for generating a curvature image by using a structured light image. Background Art
[0002] Structured light technology is a technology used in three-dimensional (3D) measurement. In structured light technology, the surface morphology and three-dimensional coordinates of an object can be reconstructed by taking high-frequency shots and analyzing the deformation of feature patterns on the front and back structured light images. Therefore, in current structured light technology, it is necessary to take structured light images at a high frequency and to accurately calculate the three-dimensional coordinates of the object.
[0003] Therefore, how to generate structured light images without the need to capture structured light images at a high frequency and accurately calculate the three-dimensional coordinates of the object, and then apply them to different image processing applications, will be a topic worth studying. Summary of the invention
[0004] In view of the above problems in the prior art, an embodiment of the present invention provides an image processing device and method.
[0005] According to one embodiment of the present invention, an image processing device is provided. The image processing device includes a shooting device and a computing circuit. The shooting device can shoot a target object illuminated by a structured light to generate a structured light image. The computing circuit can perform a grayscale process on the structured light image to generate a grayscale image, can perform a binarization process on the grayscale image to generate a binarized image, and can generate a curvature image corresponding to the structured light image based on the binarized image.
[0006] According to one embodiment of the present invention, an image processing method is provided. The above-mentioned image processing method can be applied to an image processing device. In addition, the above-mentioned image processing method may include the following steps. By means of a shooting device of the above-mentioned image processing device, a target object illuminated by a structured light is photographed to generate a structured light image; by means of an operation circuit of the above-mentioned image processing device, a grayscale processing is performed on the above-mentioned structured light image to generate a grayscale image; by means of the above-mentioned operation circuit, a binarization processing is performed on the above-mentioned grayscale image to generate a binarized image; and by means of the above-mentioned operation circuit, a curvature image corresponding to the above-mentioned structured light image is generated according to the above-mentioned binarized image.
[0007] As for other additional features and advantages of the present invention, those skilled in the art can make slight changes and modifications to the image processing device and method disclosed in the implementation method of this case without departing from the spirit and scope of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 FIG. 1 is a block diagram of an image processing device 100 according to an embodiment of the present invention.
[0009] Figure 2 FIG. 4 is a schematic diagram showing the generation of a curvature image according to an embodiment of the present invention.
[0010] Figure 3 FIG. 4 is a schematic diagram showing the generation of a curvature image according to another embodiment of the present invention.
[0011] Figure 4 It is a schematic diagram showing an image stitching according to an embodiment of the present invention.
[0012] Figure 5 The figure is a flow chart of an image processing method according to an embodiment of the present invention.
[0013]
Explanation of symbols
[0014] 100: Image classification device
[0015] 110: Shooting device
[0016] 120: Operational Circuit
[0017] 130: Storage device
[0018] 200: Structured light generating device
[0019] 300: Target
[0020] A1: Structured light image
[0021] A2, B2, B3: Curvature images
[0022] B1: Grid
[0023] M, M1: pixel matrix
[0024] P, P1, P2: pixels
[0025] S510~S540: Steps DETAILED DESCRIPTION
[0026] This section describes the preferred method of implementing the present invention, which is intended to illustrate the spirit of the present invention rather than to limit the scope of protection of the present invention. The scope of protection of the present invention shall be determined by the appended claims.
[0027] Figure 1 The block diagram of an image processing device 100 according to an embodiment of the present invention is shown. Figure 1As shown, the image processing device 100 may include a photographing device 110, a computing circuit 120, and a storage device 130. Figure 1 The block diagram shown in the figure is only for the convenience of explaining the embodiments of the present invention, but the present invention is not limited to Figure 1 The image processing device 100 may also include other components.
[0028] According to one embodiment of the present invention, the photographing device 110 may be an electronic device with a photographing function, such as a mobile phone, a camera, or a dental mirror, but the present invention is not limited thereto. According to one embodiment of the present invention, the photographing device 110 may photograph a target object 300 illuminated by a structured light to generate a structured light image. In one embodiment, the structured light may be a structured light generating device 200 from an outside. In another embodiment, the structured light generating device 200 may also be integrated into the photographing device 110. The structured light generating device 200 may generate a parallel line (or linear) structured light, a grid-shaped structured light, or a dot structured light, but the present invention is not limited thereto.
[0029] According to an embodiment of the present invention, the computing circuit 120 may be used to process the operations and calculations required for the image processing of the present invention.
[0030] According to one embodiment of the present invention, the storage device 130 may be a volatile memory (e.g., random access memory (RAM)), a non-volatile memory (e.g., flash memory, read-only memory (ROM)), a hard disk, or a combination of the above devices. The storage unit may be used to store files and data required for image processing, as well as the operations and calculations required by the operation circuit 120.
[0031] According to an embodiment of the present invention, the image processing device 100 may also include a processor. The processor may be used to control the operations performed by the camera device 110 , the computing circuit 120 , and the storage device 130 .
[0032] According to an embodiment of the present invention, after the photographing device 110 generates a structured light image, the operation circuit 120 may perform a grayscale processing on the structured light image to generate a grayscale image. Specifically, the operation circuit 120 may convert the structured light image from a color image to a grayscale image through grayscale processing. Then, the operation circuit 120 may binarize the grayscale image to generate a binarized image, and then generate a curvature image (or a curvature map, or an auxiliary image) corresponding to the structured light image based on the binarized image. According to an embodiment of the present invention, the generated curvature image corresponding to the structured light image can be used in different applications, such as: image stitching, establishing a three-dimensional (3D) model of an object, and adding it to the training data of an artificial intelligence (AI) model, but the present invention is not limited thereto.
[0033] According to an embodiment of the present invention, the grayscale processing algorithm includes, for example, averaging the RGB pixels of the color image to obtain the pixel value of the grayscale image (i.e., grayscale value = 0.33R + 0.33G + 0.33B). Another common grayscale processing algorithm is based on the sensitivity of the human eye to different colors and designs different weights for RGB. The calculation formula is as follows, i.e., grayscale value = 0.299R + 0.587G + 0.114B.
[0034] According to an embodiment of the present invention, when the structured light irradiated on the target 300 is a parallel structured light, in the binarization process, the operation circuit 120 can perform a binarization process on each pixel of the grayscale image according to a threshold. For example, it is assumed that the threshold is set to 130, but the present invention is not limited thereto. When the pixel value (or grayscale value) of a pixel of the grayscale image is lower than 130, the operation circuit 120 can set the pixel value of the pixel to a first value (for example: 0), and when the pixel value (or grayscale value) of a pixel of the grayscale image is not lower than (higher than or equal to) 130, the operation circuit 120 can set the pixel value of the pixel to a second value (for example: 255) to perform a binarization process on the grayscale image. Through the above-mentioned binarization process, the operation circuit 120 can convert the grayscale image into a binary image.
[0035] Next, the operation circuit 120 may perform an average operation on all pixels in a preset range corresponding to each pixel of the binary image to generate a pixel value corresponding to each pixel of the curvature image. Figure 2For illustration. According to an embodiment of the present invention, the preset range can be determined according to a set kernel value. If the kernel is set to 5, the range corresponding to each pixel of the binary image will include 25 (5*5) pixels. In a specific embodiment, the kernel value is an odd number and is between 3 and 21, for example, 3, 5, 7, 9, 11, but the present invention is not limited thereto.
[0036] Figure 2 is a schematic diagram showing the generation of a curvature image according to an embodiment of the present invention. Figure 2 As shown, after the grayscale processing and binarization processing of a pixel P of a structured light image A1 corresponding to the parallel structured light, the corresponding pixel value is 255. In addition, the preset range corresponding to the pixel P is a 5*5 pixel matrix M (i.e., core value = 5) with the pixel P as the center. The operation circuit 120 can perform an average operation on all pixel values of the pixel matrix M to calculate the pixel value corresponding to the pixel P in the curvature image A2 is 132 (i.e., 255*13 / 25). It is noted that Figure 2 It is only used to illustrate one embodiment of the present invention, but the present invention is not limited thereto.
[0037] According to another embodiment of the present invention, when the structured light irradiated on the target object 300 is a grid-shaped structured light, in the binarization processing step, the operation circuit 120 can set the pixel value of the pixel of the grayscale image corresponding to the structured light (i.e., the pixel illuminated by the structured light, or the pixel covered by the grid line) to a first value (e.g., 255), and set the pixel value of the pixel of the grayscale image not corresponding to the structured light (i.e., the pixel not illuminated by the structured light) to a second value (e.g., 0) to generate a binary image.
[0038] Next, the operation circuit 120 can calculate the distances from the top, bottom, left, and right of each pixel corresponding to the second value (for example: 0, i.e., the pixel that is not covered by the structured light and is set to 0) to the grid structured light (i.e., the distances from the top, bottom, left, and right to the grid lines), and perform a sum operation and a normalization operation on the distances from the top, bottom, left, and right of each pixel corresponding to the second value to the grid structured light (for example: converting the range corresponding to the sum value of the distances of all pixels (for example: 200 to 900, but the present invention is not limited thereto) to the range of 0 to 255) to generate a pixel value corresponding to each pixel in the curvature image that does not correspond to the structured light.
[0039] In addition, in one embodiment, the operation circuit 120 may first set the pixel value corresponding to each pixel in the curvature image corresponding to the first numerical value (for example: 255, i.e., the pixel covered by the structured light) to a preset value (for example: 0). Then, the operation circuit 120 may perform an average operation on all pixels in a range (for example: taking a 3*3 pixel matrix, but the present invention is not limited to this) corresponding to each pixel set to the preset value (i.e., the pixel corresponding to the structured light) to generate a pixel value corresponding to each pixel in the curvature image corresponding to the structured light. How the operation circuit 120 generates a curvature image corresponding to a structured light image corresponding to a grid-like structured light will be described below. Figure 3 To illustrate.
[0040] Figure 3 is a schematic diagram showing a curvature image generated according to another embodiment of the present invention, as shown in FIG. Figure 3 As shown, after the pixels of a grid B1 in a structured light image corresponding to the grid structured light are gray-scaled and binarized, the pixel values of the pixels corresponding to the structured light (i.e., the pixels illuminated by the structured light, or the pixels covered by the grid lines) can be set to a first value (e.g., 255), and the pixel values of the pixels not corresponding to the structured light (i.e., the pixels not illuminated by the structured light) can be set to a second value (e.g., 0). Then, the operation circuit 120 can calculate the distances from the top, bottom, left, and right of each pixel in the grid B1 corresponding to the second value (e.g., 0) to the grid structured light, and perform a summation and a normalization operation on the distances from the top, bottom, left, and right of each pixel corresponding to the second value to the grid structured light. For example, Figure 3 As shown, the distances from the pixel P1 in the grid B1 to the upper, lower, left and right grid lines are 10, 11, 16 and 7 respectively. Therefore, the operation circuit 120 can sum all the distance values (i.e., 10+11+16+7=44). Then, after calculating the sum operation of each pixel corresponding to all the second numerical values, the operation circuit 120 can perform a normalization operation, that is, converting the range corresponding to all the distance sum values (for example: 200~900, but the present invention is not limited to this) to the range of 0~255. In other words, the distance sum value corresponding to the pixel P1 will be converted to the range of 0~255, so as to generate the pixel value of the pixel P1 in the curvature image B2 (or curvature image B3). Similarly, the operation circuit 120 will be able to generate the pixel values of all pixels corresponding to the structured light in the grid B1 in the curvature image B2 (or curvature image B3). In particular, in Figure 3 In the curvature images B2 and B3, all pixels corresponding to the structured light in the grid B1 display the same pixel value (or grayscale value), but the present invention is not limited to this. Figure 3In the curvature images B2 and B3 , all pixels corresponding to the structured light in the grid B1 may also correspond to different pixel values (or grayscale values).
[0041] In addition, in one embodiment, the operation circuit 120 may set the pixel value corresponding to each pixel (e.g., pixel P2) corresponding to the first numerical value (e.g., 255) in the curvature image B2 to a preset value (e.g., 0). Then, the operation circuit 120 may perform an averaging operation on all pixels in a range corresponding to each pixel set to the preset value (i.e., the pixel corresponding to the structured light) to generate a pixel value corresponding to each pixel in the curvature image B3 corresponding to the structured light. For example, the operation circuit 120 may perform an averaging operation on the pixels in a range corresponding to the pixel P2 of the curvature image B2 (a 3*3 pixel matrix M1 centered on the pixel P2) to generate a pixel value corresponding to the pixel P2 in the curvature image B3. The curvature image B3 can be regarded as the final curvature image corresponding to the grid B1 of the structured light image. Note that, Figure 3 It is only used to illustrate one embodiment of the present invention, but the present invention is not limited thereto.
[0042] It is particularly noted that the embodiments of the present invention are only described using parallel structured light and grid structured light as examples, but the present invention is not limited thereto. Through appropriate adjustments, the embodiments of the present invention can also be applied to other different types of structured light. For example, if it is a dot structured light, the calculation circuit 120 can also consider the degree of deformation of the dot (i.e., the ratio of the major and minor axes of the dot when it is deformed into an ellipse) to generate a curvature image.
[0043] According to one embodiment of the present invention, the curvature image corresponding to the structured light image can be used in image stitching to improve the accuracy of image stitching. Specifically, the shooting device 110 can continuously shoot the target object 300 to generate a plurality of normal images (i.e., images not irradiated with structured light). In addition, the shooting device 110 can also generate a plurality of structured light images corresponding to a plurality of normal images. The operation circuit 120 can then convert the plurality of structured light images into a plurality of curvature images. Then, the operation circuit 120 can obtain the feature point information contained in each normal image and each curvature image according to a feature point extraction algorithm. The operation circuit 120 can merge the feature point information contained in each normal image and its corresponding curvature image to generate merged feature point information corresponding to each normal image. Then, the operation circuit 120 can stitch all normal images according to the merged feature point information corresponding to each normal image. The following will be described in detail. Figure 4 To illustrate.
[0044] According to an embodiment of the present invention, the feature point extraction algorithm is, for example, a HOG (hog histogram of oriented gradients) algorithm, a SIFT (sift scale invariant feature transform) algorithm, and a MSER (maximally stable extremal regions) algorithm.
[0045] Figure 4 It is a schematic diagram showing an image stitching according to an embodiment of the present invention. Figure 4 As shown, the shooting device 110 can continuously shoot a target to generate a plurality of normal images i-1~in, and the shooting device 110 can generate a plurality of structured light images corresponding to the plurality of normal images i-1~in. The operation circuit 120 can then convert the plurality of structured light images into a plurality of curvature images d-1~dn. The operation circuit 120 can obtain the feature point information contained in each normal image i-1~in and each curvature image d-1~dn according to a feature point extraction algorithm, and merge the feature point information contained in each normal image i-1~in and its corresponding curvature image to generate the merged feature point information corresponding to each normal image i-1~in. Then, the operation circuit 120 can splice the normal images i-1~in according to the merged feature point information corresponding to each normal image i-1~in.
[0046] like Figure 4As shown, taking the splicing of the first normal image i-1 and the second normal image i-2 as an example. The operation circuit 120 can obtain the first feature point information corresponding to the first normal image i-1 (for example: feature point coordinates (x1, y1), (x2, y2), (x3, y3)) according to the feature point extraction algorithm, and obtain the second feature point information of the first curvature image d-1 corresponding to the first normal image i-1 (for example: feature point coordinates (x4, y4), (x5, y5)). The operation circuit 120 can obtain the third feature point information corresponding to the second normal image i-2 (for example: feature point coordinates (x6, y6), (x7, y7)) according to the feature point extraction algorithm, and obtain the fourth feature point information of the second curvature image d-2 corresponding to the second normal image i-2 (for example: feature point coordinates (x8, y8), (x9, y9), (x10, y10)). Next, the operation circuit 120 may merge the first feature point information and the second feature point information to generate a first merged feature point information corresponding to the first normal image i-1 (for example, feature point coordinates (x1, y1), (x2, y2), (x3, y3), (x4, y4), (x5, y5)); and merge the third feature point information and the fourth feature point information to generate a second merged feature point information corresponding to the second normal image i-2 (for example, feature point coordinates (x6, y6), (x7, y7), (x8, y8), (x9, y9), (x10, y10)). Next, the operation circuit 120 may splice the first normal image i-1 and the second normal image i-2 according to the first merged feature point information and the second merged feature point information.
[0047] According to another embodiment of the present invention, the curvature image corresponding to the structured light image can be used in establishing a three-dimensional (3D) model to improve the accuracy of establishing the 3D model. Specifically, the shooting device 110 can continuously shoot the target 300 to generate a plurality of normal images (i.e., images without structured light). In addition, the shooting device 110 can also generate a plurality of structured light images corresponding to the plurality of normal images. The operation circuit 120 can then convert the plurality of structured light images into a plurality of curvature images. Then, the operation circuit 120 can obtain the feature point information contained in each normal image and each curvature image according to a feature point extraction algorithm. The operation circuit 120 can merge the feature point information contained in each normal image and its corresponding curvature image to generate the merged feature point information corresponding to each normal image. Then, the operation circuit 120 can generate the rotation matrix and the translation matrix corresponding to each normal image according to the merged feature point information corresponding to each normal image. The operation circuit 120 can splice all normal images according to the rotation matrix and the translation matrix to establish the 3D model of the corresponding target.
[0048] According to another embodiment of the present invention, the curvature image corresponding to the structured light image can be used in the training data of the artificial intelligence (AI) model. More specifically, the curvature image corresponding to the structured light image can be used as a data channel in the AI model to serve as input data when generating training data. For example, in the application of this embodiment, the convolutional neural network (CNN) model will have four data channels of R, G, B and curvature image to serve as input data for the CNN model to generate training data. The curvature image can provide depth-related information to increase the success rate of the AI model in object recognition.
[0049] Figure 5 FIG. 1 is a flow chart of an image processing method according to an embodiment of the present invention. The image processing method may be applied to the image processing device 100. Figure 5 As shown, in step S510 , a photographing device of the image processing device 100 may photograph a target object illuminated by a structured light to generate a structured light image.
[0050] In step S520 , a computing circuit of the image processing device 100 may perform a grayscale processing on the structured light image to generate a grayscale image.
[0051] In step S530 , the computing circuit 540 of the image processing apparatus 100 may perform a process of performing a computation on the image processing apparatus 100 .
[0052] In step S540 , the computing circuit of the image processing device 100 may generate a curvature image corresponding to the structured light image according to the binary image.
[0053] According to an embodiment of the present invention, in the image processing method, when the structured light is a parallel structured light, in the binarization process, the computing circuit of the image processing device 100 may perform the binarization process on each pixel of the grayscale image according to a threshold value to generate the binarized image. Then, the computing circuit of the image processing device 100 may perform an average operation on all pixels in a range corresponding to each pixel of the binarized image to generate a pixel value corresponding to each pixel of the curvature image.
[0054] According to one embodiment of the present invention, in the image processing method, when the structured light is a grid-shaped structured light, in the binarization step, the operation circuit of the image processing device 100 may set the pixels of the grayscale image corresponding to the structured light to a first value, and set the pixels of the grayscale image not corresponding to the structured light to a second value, so as to generate the binary image.
[0055] In one embodiment, in the image processing method, the computing circuit of the image processing device 100 may further calculate the distances from the structured light to each pixel corresponding to the second value in the binary image. Then, the computing circuit of the image processing device 100 may perform a summation operation and a normalization operation on the distances from the structured light to each pixel corresponding to the second value, so as to generate a pixel value corresponding to each pixel in the curvature image that does not correspond to the structured light.
[0056] In addition, in the image processing method, in one embodiment, the computing circuit of the image processing device 100 may also set the pixel value corresponding to each pixel of the curvature image corresponding to the first value to a preset value. Then, the computing circuit of the image processing device 100 may perform an average operation on all pixels of a range corresponding to each pixel of the curvature image corresponding to the first value to generate a pixel value corresponding to each pixel of the curvature image corresponding to the structured light.
[0057] According to an embodiment of the present invention, in the image processing method, the shooting device of the image processing device 100 can directly and continuously shoot the above-mentioned target object to generate a first normal image and a second normal image. Then, the shooting device of the image processing device 100 can generate a first structured light image corresponding to the first normal image, and generate a second structured light image corresponding to the second normal image. Then, the computing circuit of the image processing device 100 can generate a first curvature image corresponding to the first structured light, and generate a second curvature light image corresponding to the second structured light image.
[0058] According to an embodiment of the present invention, in the image processing method, the computing circuit of the image processing device 100 may obtain a first feature point information corresponding to the first normal image, and obtain a second feature point information corresponding to the first curvature image. Then, the computing circuit of the image processing device 100 may merge the first feature point information and the second feature point information to generate a first merged feature point information. In addition, the computing circuit of the image processing device 100 may obtain a third feature point information corresponding to the second normal image, and obtain a fourth feature point information corresponding to the second curvature image. Then, the computing circuit of the image processing device 100 may merge the third feature point information and the fourth feature point information to generate a second merged feature point information.
[0059] According to an embodiment of the present invention, in the image processing method, the computing circuit of the image processing device 100 may splice the first normal image and the second normal image according to the first merged feature point information and the second merged feature point information.
[0060] According to another embodiment of the present invention, in the image processing method, the arithmetic circuit of the image processing apparatus 100 may generate a rotation matrix and a translation matrix according to the above-mentioned first merged feature point information and the above-mentioned second merged feature point information. Then, the arithmetic circuit of the image processing apparatus 100 may establish a three-dimensional model corresponding to the target object according to the above-mentioned rotation matrix and the above-mentioned translation matrix.
[0061] The image processing method proposed according to the embodiments of the present invention can generate a curvature image corresponding to the structured light image by means of an image processing apparatus, and then perform different image processing applications by means of the curvature image. In addition, the image processing method proposed according to the embodiments of the present invention does not need to frequently capture structured light images and precisely calculate the three-dimensional coordinates of an object.
[0062] The serial numbers in this specification and the claims, such as "first", "second", etc., are only for convenience of description and there is no sequential precedence relationship between them.
[0063] The steps of the methods and algorithms disclosed in the specification of the present invention can be directly applied to hardware and software modules or a combination of both by a processor. A software module (including execution instructions and related data) and other data can be stored in a data memory, such as a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a portable hard disk, a compact disc read-only memory (CD-ROM), a DVD, or any other computer-readable storage medium format in the prior art in this field. A storage medium can be coupled to a machine device, for example, a computer / processor (for convenience of description, the processor is used to represent in this specification). The above-mentioned processor can read information (such as program code) and write information to the storage medium. A storage medium can integrate a processor. An application-specific integrated circuit (ASIC) includes a processor and a storage medium. A user device includes an application-specific integrated circuit. In other words, the processor and the storage medium are included in the user device in a way that does not directly connect to the user device. In addition, in some embodiments, any suitable computer program product includes a readable storage medium, where the readable storage medium includes program code related to one or more disclosed embodiments. In some embodiments, the computer program product may include a packaging material.
[0064] The above paragraphs use multiple levels for description. Obviously, the teachings of this article can be implemented in multiple ways, and any specific architecture or function disclosed in the examples is only a representative situation. According to the teachings of this article, anyone familiar with the art should understand that each level disclosed in this article can be implemented independently or two or more levels can be combined for implementation.
[0065] Although the present disclosure has been disclosed as above by the embodiments, it is not intended to limit the present disclosure. Any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the invention shall be determined by the definition of the appended claims.
Claims
1. An image processing device, include: A photographing device photographs a target object illuminated by a structured light to generate a structured light image; as well as An operation circuit performs a grayscale process on the structured light image to generate a grayscale image, performs a binarization process on the grayscale image to generate a binarized image, and generates a curvature image corresponding to the structured light image according to the binarized image.
2. The image processing device as claimed in claim 1, wherein when the structured light is a parallel structured light, in the binarization process, the operation circuit performs the binarization process on each pixel of the grayscale image according to a threshold.
3. The image processing device as described in claim 2, wherein the above-mentioned operation circuit further performs an average operation on all pixels in a range corresponding to each pixel of the above-mentioned binary image to generate a pixel value corresponding to each pixel of the above-mentioned curvature image.
4. The image processing device as described in claim 1, wherein when the structured light is a grid-shaped structured light, in the binarization processing, the operation circuit sets the pixels of the grayscale image corresponding to the structured light to a first value, and sets the pixels of the grayscale image not corresponding to the structured light to a second value to generate the binary image.
5. The image processing device as described in claim 4, wherein the above-mentioned operation circuit further calculates the distances from the structured light to the top, bottom, left, and right of each pixel corresponding to the above-mentioned second value in the above-mentioned binary image, and performs a summation operation and a normalization operation on the distances from the structured light to the top, bottom, left, and right of each pixel corresponding to the above-mentioned second value, so as to generate a pixel value corresponding to each pixel in the above-mentioned curvature image that does not correspond to the structured light.
6. The image processing device as claimed in claim 4, wherein the computing circuit further performs an average operation on all pixels in a range corresponding to each pixel corresponding to the first value to generate a pixel value corresponding to each pixel of the curvature image corresponding to the structured light.
7. An image processing device as described in claim 1, wherein the above-mentioned shooting device also continuously shoots the above-mentioned target object to generate a first normal image and a second normal image, and generates a first structured light image corresponding to the above-mentioned first normal image, and generates a second structured light image corresponding to the above-mentioned second normal image, and wherein the above-mentioned operation circuit generates a first curvature image corresponding to the above-mentioned first structured light image, and a second curvature image corresponding to the above-mentioned second structured light image.
8. An image processing device as described in claim 7, wherein the above-mentioned operation circuit obtains a first feature point information corresponding to the above-mentioned first normal image, and obtains a second feature point information corresponding to the above-mentioned first curvature image, and merges the first feature point information and the second feature point information to generate a first merged feature point information; and the above-mentioned operation circuit obtains a third feature point information corresponding to the above-mentioned second normal image, and obtains a fourth feature point information corresponding to the above-mentioned second curvature image, and merges the third feature point information and the fourth feature point information to generate a second merged feature point information.
9. The image processing device as described in claim 8, wherein the above-mentioned operation circuit splices the above-mentioned first normal image and the above-mentioned second normal image according to the above-mentioned first merged feature point information and the above-mentioned second merged feature point information.
10. An image processing device as described in claim 8, wherein the above-mentioned operation circuit generates a rotation matrix and a translation matrix according to the above-mentioned first merged feature point information and the above-mentioned second merged feature point information, and the above-mentioned operation circuit establishes a three-dimensional model corresponding to the above-mentioned target object according to the above-mentioned rotation matrix and the above-mentioned translation matrix.
11. An image processing method, applicable to an image processing device, include: Using a photographing device of the image processing device, photographing a target object illuminated by a structured light to generate a structured light image; Performing a grayscale processing on the structured light image by a computing circuit of the image processing device to generate a grayscale image; By using the computing circuit, the grayscale image is binarized to generate a binarized image; and The computing circuit generates a curvature image corresponding to the structured light image according to the binary image.
12. The image processing method according to claim 11, further comprising: include: When the structured light is a parallel structured light, in the binarization process, the operation circuit performs the binarization process on each pixel of the grayscale image according to a threshold value to generate the binarized image.
13. The image processing method according to claim 12, further comprising: include: The computing circuit performs an average operation on all pixels in a range corresponding to each pixel of the binary image to generate a pixel value corresponding to each pixel of the curvature image.
14. The image processing method according to claim 11, further comprising: include: When the structured light is a grid-shaped structured light, in the binarization process, the pixels of the grayscale image corresponding to the structured light are set to a first value, and the pixels of the grayscale image not corresponding to the structured light are set to a second value, so as to generate the binary image.
15. The image processing method according to claim 14, further comprising: include: The computing circuit is used to calculate the distances from each pixel corresponding to the second value in the binary image to the structured light in the vertical direction and horizontal direction. as well as The computing circuit performs a summation and a normalization operation on the distances from each pixel corresponding to the second value to the structured light, so as to generate a pixel value corresponding to each pixel in the curvature image that does not correspond to the structured light.
16. The image processing method according to claim 14, further comprising: include: The operation circuit performs an average operation on all pixels in a range corresponding to each pixel corresponding to the first value to generate a pixel value corresponding to each pixel of the curvature image corresponding to the structured light.
17. The image processing method according to claim 11, further comprising: include: The target object is photographed continuously by the photographing device to generate a first normal image and a second normal image; By using the photographing device, a first structured light image corresponding to the first normal image and a second structured light image corresponding to the second normal image are generated; and A first curvature image corresponding to the first structured light image and a second curvature image corresponding to the second structured light image are generated by the computing circuit.
18. The image processing method according to claim 17, further comprising: include: By means of the computing circuit, a first feature point information corresponding to the first normal image is obtained, and a second feature point information corresponding to the first curvature image is obtained; By means of the computing circuit, the first feature point information and the second feature point information are combined to generate first combined feature point information; Obtaining a third feature point information corresponding to the second normal image and a fourth feature point information corresponding to the second curvature image by means of the computing circuit; and The third feature point information and the fourth feature point information are combined by the operation circuit to generate second combined feature point information.
19. The image processing method according to claim 18, further comprising: include: The first normal image and the second normal image are spliced together according to the first combined feature point information and the second combined feature point information by the computing circuit.
20. The image processing method according to claim 18, further comprising: include: By means of the computing circuit, a rotation matrix and a translation matrix are generated according to the first combined feature point information and the second combined feature point information; as well as A three-dimensional model corresponding to the target object is established by the computing circuit according to the rotation matrix and the translation matrix.