Image sharpening method based on liquid lens, optical lens and visual system
Through liquid lens technology combining voltage data and image recognition, the focus positioning and depth of field information are quickly positioned, which solves the problem of rapid fusion and clarity of depth of field pictures, and achieves significant advantages for industrial-grade applications and improves image clarity.
Patent Information
- Application Number
- CN202411582128.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to achieve rapid fusion and clarity of depth of field pictures, especially in industrial-grade applications that require rapid focus and recognition.
Through liquid lens technology combining voltage data and image recognition, focus positioning and depth of field information can be quickly identified, thereby achieving rapid fusion and clear processing of multiple images.
A significant advantage over application scenarios requiring fast focus and recognition is achieved, and a globally clear image is generated, improving the clarity and detail expressiveness of the image.
Smart Images

Figure CN119485014A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an image sharpening method based on a liquid lens, an optical lens and a visual system. Background Art
[0002] The human eye is an exquisitely designed and extremely precise optical imaging system that changes the focal length by changing the shape of the lens. The human eye changes the curvature of the lens and thus the refractive power of the eye by contracting and relaxing the ciliary muscle. However, since the invention of the first optical lens in the 1280s, the industry has been trying to find a perfect solution to enable machines to have visual capabilities close to those of the human eye. Liquid lens technology is an optical solution that imitates the structure of the human eye lens. This technology makes it possible for machines to achieve "human eye-level" seamless focusing. In some industrial applications, such as Figure 1 The fixed intelligent barcode scanning module shown needs to quickly focus on the barcode position and identify it, which requires an extremely fast focusing speed, which can be achieved through a liquid lens.
[0003] The focusing principle of liquid lenses is based on electrowetting or membrane pressure technology. The single-point electrowetting direction reference Figure 2 , using the principle of electrowetting, the contact angle at the junction of the two liquids is changed by changing the voltage, thereby changing the curvature of the liquid surface to achieve the purpose of zooming. The equal-density double liquid can ensure that the lens performance is not affected by gravity.
[0004] Therefore, in order to expand the application of liquid lenses, the present invention needs to solve the problem of using the voltage data of the driving power supply and the image test samples corresponding to the voltage to realize the fusion and clarity of the depth of field image. Summary of the invention
[0005] The main purpose of the present invention is to provide an image sharpening method, an optical lens and a visual system based on a liquid lens, so as to realize a fusion and sharpening solution of a depth of field image.
[0006] To achieve the above object, the present invention provides an image clearing method based on a liquid lens, comprising the following steps:
[0007] Acquire a set of image data using a liquid lens, the set of image data comprising a plurality of first images, where the plurality is a positive integer greater than or equal to 1;
[0008] Identifying a focus position of a first image, and identifying depth of field information of the first image where the focus position is located;
[0009] Based on the depth of field information, a plurality of first images are arranged and fused to obtain a second image after fusion and sharpening processing.
[0010] Furthermore, the step of identifying a focus position of a first image includes:
[0011] Identifying voltage data inputted by a driving power source to an electrode of a liquid lens, and determining concave-convex information of the liquid lens through the voltage data, wherein the concave-convex information includes a curvature of the liquid lens;
[0012] Retrieving a preset image sample, simulating a straight-on viewing angle and using consistent concave-convex information to determine a focus position in the image sample, wherein the image sample is a sample image with a 1:1 ratio to the first image;
[0013] The image sample and the first image are matched, and a focus position is determined on the first image.
[0014] Furthermore, the step of identifying the depth of field information of the first image where the focus position is located includes:
[0015] Performing image recognition on the first image using the image model to establish a front, middle, and back depth of field framework in the first image;
[0016] It is determined whether the focus position is at any one of the front, middle and back positions in the depth of field frame.
[0017] Furthermore, the step of arranging and fusing a plurality of first images based on the depth of field information includes:
[0018] Extracting clear area portions of respective focus positions in a plurality of first images;
[0019] The images of each clear area are merged into the last image in the arrangement order to obtain a second image.
[0020] Furthermore, the step of fusing the images of the clear area parts into the last one in the arrangement order includes:
[0021] When extracting, sharpen and extract the 1px pixel grid circle at the edge of each clear area;
[0022] During fusion, each pixel grid circle is softened by comparing it with the color value of the corresponding position of the last first image in the arrangement order.
[0023] The present invention also provides an optical lens, comprising:
[0024] Liquid lenses;
[0025] A driving power source, wherein the electrodes of the driving power source are connected to the conductive liquid in the liquid lens;
[0026] A data acquisition module, used for real-time acquisition of the voltage of the driving power supply electrode;
[0027] The lens body is assembled with the liquid lens, the driving phone and the data acquisition module to form an optical lens.
[0028] Furthermore, the liquid lens comprises a concave lens and a convex lens, and liquids of equal density are respectively arranged in the concave lens and the convex lens.
[0029] Furthermore, the liquid disposed in the concave lens and the convex lens is blocked by insulating liquid.
[0030] The present invention further provides a visual system, comprising a memory and a processor, wherein the memory stores a system program, and the processor implements the steps of the above-mentioned liquid lens-based image sharpening method when executing the system program.
[0031] Furthermore, the visual system includes a plurality of optical lenses, which collect multiple sets of image data at set angles to create an image sample database.
[0032] The image clearing method based on liquid lens, optical lens and visual system provided by the present invention have the following beneficial effects:
[0033] (1) Through liquid lens technology, combined with voltage data and image recognition, the present invention can quickly locate the focus position and identify depth of field information, thereby realizing the rapid fusion and clarity processing of multiple images. It has significant advantages for application scenarios that require rapid focus and recognition, such as industrial code scanning and automatic detection.
[0034] (2) By identifying the depth of field information of the image and extracting the clear area of each image for fusion, the present invention can generate a globally clear image. This depth of field fusion technology not only improves the clarity of the image, but also enhances the detail expression and layering of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the industrial fixed intelligent code scanning module proposed in the background technology of the present invention;
[0036] Figure 2 is a schematic diagram of a liquid lens proposed in the background technology of the present invention;
[0037] Figure 3 4 is a schematic diagram of depth of field fusion of an image sharpening method based on a liquid lens in one embodiment of the present invention.
[0038] Figure 4 Schematic diagram of a flow chart of an image sharpening method based on a liquid lens in one embodiment of the present invention
[0039] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0041] Reference Figure 4 , is a flow chart of an image sharpening method based on a liquid lens proposed in the present invention, comprising the following steps:
[0042] S1, using a liquid lens to acquire a set of image data, the set of image data comprising a plurality of first images, where the plurality is a positive integer greater than or equal to 1;
[0043] S2, identifying a focus position of a first image, and identifying depth of field information of the first image where the focus position is located;
[0044] S3, arranging and fusing a plurality of first images based on the depth of field information to obtain a second image after fusion and sharpening processing.
[0045] In the specific implementation process: a liquid lens is used as an optical element, and the focal length is changed by adjusting its shape (such as curvature) to obtain image data at different focal lengths. A set of image data is obtained, and the set of data includes several first images. In the first image obtained, the focus position needs to be identified. The focus position refers to the clearest and sharpest part of the image, and it is also the part that the observer or machine vision system pays most attention to. At the same time, the depth of field information of the focus position needs to be identified. The depth of field is a concept that describes the clarity of objects at different distances in the image, reflecting the clarity distribution of the image in the depth direction. By identifying the depth of field information of the focus position, the relative position of the part in the image space can be understood. Based on the depth of field information obtained in step S2, several first images are arranged and fused. The clear parts of the images obtained at different focal lengths are combined to form a globally clear image. In the fusion process, the relative position and size of the clear areas in each image, as well as the transition and connection between them, are considered to ensure that the fused image is visually coherent and clear. The final second image is the result of fusion and sharpening processing, and is clearer and sharper than any single first image as a whole.
[0046] In one embodiment, the step of identifying a focus position of a first image includes:
[0047] Identifying voltage data inputted by a driving power source to an electrode of a liquid lens, and determining concave-convex information of the liquid lens through the voltage data, wherein the concave-convex information includes a curvature of the liquid lens;
[0048] Retrieving a preset image sample, simulating a straight-on viewing angle and using consistent concave-convex information to determine a focus position in the image sample, wherein the image sample is a sample image with a 1:1 ratio to the first image;
[0049] The image sample and the first image are matched, and a focus position is determined on the first image.
[0050] Specifically: The working principle of the liquid lens is to adjust the focal length by changing its shape (such as concave-convex degree or curvature). This shape change is usually achieved by inputting different voltages to the liquid lens electrodes. In this step, the voltage data input by the driving power supply to the liquid lens electrodes is first identified. These voltage data are directly related to the shape change of the liquid lens. By analyzing the voltage data, the specific shape of the liquid lens in the current state can be determined, including key parameters such as its concave-convex degree and curvature. In order to determine the focus position in the image, a reference or benchmark is required. The "image sample" is a reference, which is a sample image with the same size (1:1 ratio) as the first image actually taken. The image sample contains the image features that should be presented at the right angle under different concave-convex information (i.e., different curvatures of the liquid lens). These features can be specific edges, textures, or contrast changes, etc., which help determine the focus position. Retrieve this image sample and simulate the image features that should be seen at the right angle under the current concave-convex information of the liquid lens (determined by the voltage data). Next, match the image sample with the first image actually taken. This matching can be based on factors corresponding to the edges of the image features.
[0051] like Figure 3 The step of identifying the depth of field information of the first image where the focus position is located comprises:
[0052] Performing image recognition on the first image using the image model to establish a front, middle, and back depth of field framework in the first image;
[0053] It is determined whether the focus position is at any one of the front, middle and back positions in the depth of field frame.
[0054] Specifically,
[0055] An image model is an algorithm or tool that can understand and analyze the content of an image. In this step, the image model is used to identify the first image.
[0056] The purpose of image recognition is to extract key information from an image, which may include the shape, position, color, texture, etc. In this context, special attention is paid to the depth information in the image, that is, the distance between different parts of the image and the observer.
[0057] Through the recognition of the image model, the depth distribution in the first image is analyzed. It is a frame in three-dimensional space, which contains the depth information of each part of the image relative to the observer. The depth frame is divided into three areas: front, middle, and back, representing the parts of the image that are close, medium, and far from the observer respectively. This division is based on visual clues in the image, such as the size of the object, occlusion relationship, perspective effect, etc.
[0058] After the depth of field framework is established, the specific position of the focus position in the image is determined. By comparing the focus position with the front, middle and back regions in the depth of field framework, it can be determined in which region the first image corresponding to the focus position is located.
[0059] Among them, the image model includes the GoogLeNet model, and the GoogLeNet model is executed as follows:
[0060] 1. Depth of field analysis and framework establishment
[0061] The GoogLeNet model is used to extract features from sample images. The Inception module of GoogLeNet can capture features of different scales and levels in the image, which are crucial for depth of field analysis.
[0062] Depth of field classification: The extracted features are input into the classification layer of GoogLeNet, and the model is trained to distinguish the front, middle, and back depth of field areas in the image. During the training process, sample images with depth of field labels can be used for supervised learning.
[0063] Depth frame establishment: For the first input image, the GoogLeNet model will output the probability that each pixel belongs to the front, middle, and back depth regions. Based on the probability information, the depth frame of the image can be established.
[0064] 2. Focus position recognition
[0065] Feature comparison: Based on the depth of field framework, the GoogLeNet model can further extract the features of the focus area and compare them with the features of each area in the depth of field framework.
[0066] Position judgment: By comparing the similarity or distance between features, the GoogLeNet model can determine the specific position of the focus point in the depth of field framework.
[0067] In one embodiment, the step of arranging and fusing a plurality of first images based on the depth of field information includes:
[0068] Extracting clear area portions of respective focus positions in a plurality of first images;
[0069] The images of each clear area are merged into the last image in the arrangement order to obtain a second image.
[0070] Specifically, the step of fusing the images of the clear area parts into the last one in the arrangement order includes:
[0071] When extracting, sharpen and extract the 1px pixel grid circle at the edge of each clear area;
[0072] During fusion, each pixel grid circle is softened by comparing it with the color value of the corresponding position of the last first image in the arrangement order.
[0073] The present invention provides an optical lens, comprising:
[0074] Liquid lenses;
[0075] A driving power source, wherein the electrodes of the driving power source are connected to the conductive liquid in the liquid lens;
[0076] A data acquisition module, used for real-time acquisition of the voltage of the driving power supply electrode;
[0077] The lens body is assembled with the liquid lens, the driving phone and the data acquisition module to form an optical lens.
[0078] The liquid lens comprises a concave lens and a convex lens, and liquids of equal density are respectively arranged in the concave lens and the convex lens.
[0079] The liquids disposed in the concave lens and the convex lens are blocked by the insulating liquid.
[0080] The present invention also provides a visual system, including a memory and a processor, wherein the memory stores a system program, and the processor implements the steps of the above-mentioned liquid lens-based image sharpening method when executing the system program.
[0081] The visual system includes several optical lenses, which collect multiple sets of image data at set angles to create an image sample database.
[0082] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0083] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for image sharpening based on a liquid lens, characterized in that: The following steps are involved: Acquire a set of image data using a liquid lens, the set of image data comprising a plurality of first images, where the plurality is a positive integer greater than or equal to 1; Identifying a focus position of a first image, and identifying depth of field information of the first image where the focus position is located; Based on the depth of field information, a plurality of first images are arranged and fused to obtain a second image after fusion and sharpening processing.
2. The image sharpening method based on liquid lens according to claim 1, characterized in that: The step of identifying a focus position of a first image includes: Identifying voltage data inputted by a driving power source to an electrode of a liquid lens, and determining concave-convex information of the liquid lens through the voltage data, wherein the concave-convex information includes a curvature of the liquid lens; Retrieving a preset image sample, simulating a straight-on viewing angle and using consistent concave-convex information to determine a focus position in the image sample, wherein the image sample is a sample image with a 1:1 ratio to the first image; The image sample and the first image are matched, and a focus position is determined on the first image.
3. The method for image sharpening based on liquid lens according to claim 1, characterized in that: The step of identifying the depth of field information of the first image where the focus position is located includes: Performing image recognition on the first image using the image model to establish a front, middle, and back depth of field framework in the first image; It is determined whether the focus position is at any one of the front, middle and back positions in the depth of field frame.
4. The image sharpening method based on liquid lens according to claim 1, characterized in that: The step of arranging and fusing a plurality of first images based on the depth of field information comprises: Extracting clear area portions of respective focus positions in a plurality of first images; The images of each clear area are merged into the last image in the arrangement order to obtain a second image.
5. The method for image sharpening based on liquid lens according to claim 4, characterized in that: The step of fusing the images of the clear area parts into the last one in the arrangement order comprises: When extracting, sharpen and extract the 1px pixel grid circle at the edge of each clear area; During fusion, each pixel grid circle is softened by comparing it with the color value of the corresponding position of the last first image in the arrangement order.
6. An optical lens, characterized in that: include: Liquid lenses; A driving power source, wherein the electrodes of the driving power source are connected to the conductive liquid in the liquid lens; A data acquisition module, used for real-time acquisition of the voltage of the driving power supply electrode; The lens body is assembled with the liquid lens, the driving phone and the data acquisition module to form an optical lens.
7. The optical lens according to claim 6, characterized in that: The liquid lens comprises a concave lens and a convex lens, and liquids of equal density are respectively arranged in the concave lens and the convex lens.
8. The optical lens according to claim 7, characterized in that: The liquids disposed in the concave lens and the convex lens are blocked by the insulating liquid.
9. A visual system, comprising a memory and a processor, wherein the memory stores a system program, characterized in that: When the processor executes the system program, the steps of the liquid lens-based image sharpening method according to any one of claims 1 to 5 are implemented.
10. The visual system according to claim 9, characterized in that: It includes several optical lenses, which collect multiple sets of image data at set angles to create an image sample database.
Citation Information
Cited By
Method and system for detecting surface and internal defects of transparent object
CN121231512A