Ocular surface image optimization method and device, portable ocular surface imager and electronic equipment
By dividing real-time frames into grids and calculating modulation transfer functions in grid units, the problem of inability to optimize images in real-time in the prior art is solved, and faster image processing speed and higher computing efficiency are achieved.
Patent Information
- Application Number
- CN202510006093.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art cannot calculate the optimized image based on multi-frame images in a short focal length scenario in real time, resulting in slow image processing speed.
By dividing real-time frames into grids and calculating the modulation transfer function in units of grids, the clarity value of each grid is obtained, and the imaging quality space is synthesized using the differential fitting algorithm to generate an optimized image.
This greatly reduces the calculation amount, shortens the calculation time during the image optimization process, and solves the problem that it is impossible to calculate the optimized image based on multi-frame images in real time.
Smart Images

Figure CN119767160A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multispectral imaging, and in particular to an ocular surface image optimization method, device, portable ocular surface imager and electronic equipment. Background Art
[0002] Currently, in the field of multispectral imaging, especially in high-precision image acquisition of dynamic scenes, the focus problem has always been a technical difficulty. In existing technologies, image clarity is usually evaluated by calculating the MTF (Modulation Transfer Function), and the clarity is maximized by adjusting the focal length.
[0003] At present, in the scenario of short focal length (focusing distance not exceeding 40mm), the existing technology calculates the MTF of each pixel point and synthesizes multiple frames of images into one frame of optimized image based on the calculation results. This method has the problem of slow image processing speed and cannot calculate the optimized image based on multiple frames of images in real time. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide an ocular surface image optimization method, device, portable ocular surface imager and electronic device, which can calculate the modulation transfer function in grid units, improve the calculation speed, and solve the problem that the optimized image cannot be calculated based on multiple frames of images in real time. The specific scheme is as follows:
[0005] In a first aspect, the present application provides an ocular surface image optimization method, which is applied to a mobile device, comprising:
[0006] Acquire a target number of real-time frames obtained by the portable ocular surface imager through image acquisition of the target object, and perform a grid division operation on the real-time frames to obtain each target grid on each real-time frame;
[0007] Calculating a preset modulation transfer function in each of the target grids to obtain each clarity value corresponding to each of the target grids, and drawing the clarity values of each of the target grids corresponding to a single real-time frame into an imaging quality space of a target size;
[0008] The imaging quality spaces corresponding to the real-time frames are synthesized into a target imaging quality space by using a differential fitting algorithm, and an optimized image is generated based on the target imaging quality space.
[0009] Optionally, calculating a preset modulation transfer function in each of the target grids includes:
[0010] A function calculation instruction corresponding to the preset modulation transfer function is obtained, and the preset modulation transfer function is calculated in parallel in each of the target grids according to the function calculation instruction and a general graphics processor technology.
[0011] Optionally, the step of synthesizing the imaging quality spaces corresponding to the real-time frames into a target imaging quality space by using a differential fitting algorithm includes:
[0012] Analyzing the clarity values corresponding to the target grids by using the differential fitting algorithm to obtain the clarity change trend between the target grids;
[0013] The imaging quality spaces are synthesized based on the clarity variation trend between the target grids to obtain the target imaging quality space.
[0014] Optionally, generating an optimized image based on the target imaging quality space includes:
[0015] A matching and synthesis operation is performed on the target imaging quality space and each of the imaging quality spaces in the cache of the local graphics processor to obtain the optimized image corresponding to the target object.
[0016] Optionally, before acquiring a target number of real-time frames obtained by the portable ocular surface imager collecting images of the target object, the method further includes:
[0017] Acquiring spectral parameters of the portable ocular surface imager when acquiring images, and determining target function parameter values corresponding to the initial modulation transfer function according to the spectral parameters;
[0018] The initial modulation transfer function is adjusted according to the objective function parameter value adjustment to obtain the preset modulation transfer function.
[0019] Optionally, the picture pixels of the optimized image are consistent with the picture pixels of the real-time frame.
[0020] In a second aspect, the present application provides an ocular surface image optimization method, which is applied to a portable ocular surface imager, comprising:
[0021] Obtaining an image acquisition request, and performing image acquisition on a target object according to the image acquisition request, so as to obtain a target number of real-time frames corresponding to the target object;
[0022] Each of the real-time frames is sent to a mobile device so that the mobile device performs a grid division operation on each of the real-time frames, calculates a preset modulation transfer function in each target grid obtained based on the grid division operation to obtain each clarity value corresponding to each of the target grids, and plots the clarity values of each of the target grids corresponding to a single real-time frame into an imaging quality space of a target size, then uses a differential fitting algorithm to synthesize the imaging quality spaces corresponding to each of the real-time frames into a target imaging quality space, and generates an optimized image based on the target imaging quality space.
[0023] In a third aspect, the present application provides an ocular surface image optimization device, which is applied to a mobile device, comprising:
[0024] A grid division module is used to obtain a target number of real-time frames obtained by the portable ocular surface imager through image acquisition of the target object, and perform a grid division operation on the real-time frames to obtain each target grid on each real-time frame;
[0025] A function calculation module, used for calculating a preset modulation transfer function in each target grid to obtain each clarity value corresponding to each target grid, and drawing the clarity values of each target grid corresponding to a single real-time frame into an imaging quality space of a target size;
[0026] The image sending module is used to synthesize the imaging quality spaces corresponding to the real-time frames into a target imaging quality space by using a differential fitting algorithm, and generate an optimized image based on the target imaging quality space.
[0027] In a fourth aspect, the present application provides a portable ocular surface imager, comprising an image acquisition device for acquiring images and a communication interface for communicating with a mobile device;
[0028] Wherein, the portable ocular surface imager also includes a processor for executing a computer program to implement the aforementioned ocular surface image optimization method.
[0029] In a fifth aspect, the present application provides an electronic device, including:
[0030] Memory, used to store computer programs;
[0031] A processor is used to execute the computer program to implement the aforementioned ocular surface image optimization method.
[0032] In the present application, the mobile device first obtains the target number of real-time frames obtained by the portable ocular surface imager for image acquisition of the target object, and performs a grid division operation on the real-time frames to obtain each target grid on each real-time frame, and then calculates the preset modulation transfer function in each target grid to obtain each clarity value corresponding to each target grid, and draws the clarity value of each target grid corresponding to a single real-time frame into an imaging quality space of the target size, and finally uses a differential fitting algorithm to synthesize each imaging quality space corresponding to each real-time frame into a target imaging quality space, and generates an optimized image based on the target imaging quality space. It can be seen that the present application obtains the clarity value corresponding to each grid by performing a grid division operation on each real-time frame and calculating the modulation transfer function in each grid in units of grids; by calculating the modulation transfer function in units of grids rather than pixels, the amount of calculation is greatly reduced, thereby shortening the calculation time required in the image optimization process, and solving the problem that the optimized image cannot be calculated in real time based on multiple frames of images. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0034] Figure 1 A flow chart of an ocular surface image optimization method provided in this application;
[0035] Figure 2 A flow chart of an ocular surface image optimization method provided in this application;
[0036] Figure 3 A schematic diagram of the disassembled structure of a portable ocular surface imager provided in this application;
[0037] Figure 4 A schematic diagram of the structure of a portable ocular surface imaging device component provided in this application;
[0038] Figure 5 A schematic diagram of the structure of an ocular surface image optimization device provided in this application;
[0039] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] At present, in the short focal length scenario, the existing image optimization method has the problem that it is impossible to calculate the optimized image based on multiple frame images in real time. To this end, the present application provides an ocular surface image optimization method, which solves the problem that it is impossible to calculate the optimized image based on multiple frame images in real time by dividing the real-time frame into different grids and calculating the modulation transfer function in units of grids.
[0042] See also Figure 1 As shown, an embodiment of the present invention discloses an ocular surface image optimization method, which is applied to a mobile device, comprising:
[0043] Step S11, obtaining a target number of real-time frames obtained by performing image acquisition of a target object by a portable ocular surface imager, and performing a grid division operation on the real-time frames to obtain each target grid on each real-time frame.
[0044] In this embodiment, first, the mobile device needs to be connected to the portable ocular surface imager to obtain the real-time frame captured by the portable ocular surface imager. It should be noted that the real-time frame captured by the mobile device can be a plurality of continuous image frames captured by the portable ocular surface imager, for example, 3 continuous images, or a plurality of discontinuous image frames; then, each real-time frame is meshed. The size of the mesh divided in this embodiment can be determined according to actual needs. For example, the real-time frame can be divided into a small grid of 40×30 pixels. According to the pixel size of the real-time frame, each real-time frame can be divided into a plurality of grids, wherein each grid is represented as a local space; in this embodiment, the code for obtaining the real-time frame is frame_n = capture_frame(); the key code for meshing the real-time frame is as follows:
[0045] def divide_into_grids(frame, grid_size=(40, 30)):
[0046] grids = [];
[0047] for x in range(0, frame.width, grid_size[0]):
[0048] for y in range(0, frame.height, grid_size[1]):
[0049] grid = frame.get_region(x, y, grid_size[0], grid_size[1]);
[0050] grids.append(grid);
[0051] return grids;
[0052] grids_n = divide_into_grids(frame_n); / / Divide the current frame into local grids.
[0053] In this embodiment, before obtaining the real-time frame collected by the portable ocular surface imager, it also includes: obtaining the spectral parameters of the portable ocular surface imager when collecting images, determining the target function parameter value corresponding to the initial modulation transfer function according to the spectral parameters; adjusting the initial modulation transfer function according to the target function parameter value to obtain a preset modulation transfer function; it can be understood that the portable ocular surface imager will use different spectral parameters for image collection to meet the imaging requirements of different scenes, including infrared light, cobalt blue light and white light, and the modulation transfer function has a corresponding function parameter value under each spectral parameter, that is, different spectral parameters have different function parameter values. By dividing each real-time frame into multiple grids, the workload for subsequent function calculation steps is reduced. By using the local segmentation grid MTF calculation method, at least three consecutive frames are synthesized into a clear image, and the algorithm processing time does not exceed 30ms, thereby improving the image processing efficiency.
[0054] Step S12, calculating a preset modulation transfer function in each of the target grids to obtain each clarity value corresponding to each of the target grids, and drawing the clarity values of each of the target grids corresponding to a single real-time frame into an imaging quality space of the target size.
[0055] In this embodiment, the process of calculating the preset modulation transfer function in each target grid may specifically include: obtaining a function calculation instruction corresponding to the preset modulation transfer function, and calculating the preset modulation transfer function in parallel in each target grid according to the function calculation instruction and the general-purpose graphics processor technology; that is, after receiving the calculation instruction, using GPGPU (General-Purpose computing on Graphics Processing Units, i.e., general-purpose graphics processor) technology to simultaneously calculate the MTF in each target grid, obtain the clarity value of each grid, and record it as the initial imaging quality space; it should be noted that the working environment of the system in this embodiment is OpenGL or OpenGLES (i.e., a software interface) environment, and in the above target working environment, the calculation task can be efficiently completed with the help of Compute Shader (a type of Shader program in OpenGL). In this embodiment, the key code for calculating MTF in each grid is as follows:
[0056] def calculate_mtf(grid):
[0057] # MTF calculation logic here;
[0058] return mtf_value;
[0059] mtf_values_n = [calculate_mtf(grid) for grid in grids_n];
[0060] The key code for drawing the imaging quality space is as follows:
[0061] def generate_quality_map(mtf_values, grid_count=(40, 30)):
[0062] quality_map = [[0] * grid_count[1] for _ in range(grid_count[0])];
[0063] for i, value in enumerate(mtf_values):
[0064] x, y = divmod(i, grid_count[1]);
[0065] quality_map[x][y] = value;
[0066] return quality_map;
[0067] quality_map_n = generate_quality_map(mtf_values_n);
[0068] In this embodiment, the clarity values of each target grid corresponding to a single real-time frame need to be plotted into an imaging quality space of a target pixel size. For example, if there are three real-time frames, three imaging quality spaces corresponding to the three real-time frames are obtained. It should be noted that the pixel size of the obtained imaging quality space corresponds to the pixel size of the real-time frame, for example, 1600 pixels, and the obtained total imaging quality space is used to intuitively reflect the clarity distribution of the entire frame image. In this embodiment, the code for differential fitting into the target quality space is as follows:
[0069] def differential_fitting(*quality_maps):
[0070] # Combine quality maps using differential fitting;
[0071] combined_quality_map = [] # Placeholder logic;
[0072] return combined_quality_map;
[0073] combined_quality_map= differential_fitting(quality_map_n, *quality_maps);
[0074] By calculating the imaging quality space for each real-time frame separately, the image clarity distribution can be intuitively reflected; by calculating the image clarity in grid units, the method of calculating the image clarity in single pixel units is avoided, which greatly reduces the system calculation amount and improves work efficiency.
[0075] Step S13: using a differential fitting algorithm to synthesize the imaging quality spaces corresponding to the real-time frames into a target imaging quality space, and generating an optimized image based on the target imaging quality space.
[0076] In this embodiment, the process of synthesizing the imaging quality space corresponding to each real-time frame image using the differential fitting algorithm may specifically include: analyzing the clarity values corresponding to each target grid using the differential fitting algorithm to obtain the clarity change trend between each target grid; synthesizing each imaging quality space based on the clarity change trend between each target grid to obtain the target imaging quality space; for example, if three consecutive real-time frames are obtained, then after analyzing the clarity change trend between local grids using the differential fitting method, the imaging quality spaces of the three frames n, n+1 and n+2 are synthesized into a new quality space, i.e., the target imaging quality space, according to the analysis results. In this embodiment, if three real-time frames are obtained, the key code for performing the same grid division operation on the other two frames is as follows:
[0077] frames = [capture_frame() for _ in range(2)] ; / / Get n+1 and n+2 frames
[0078] quality_maps = [generate_quality_map( [calculate_mtf(grid) for gridin divide_into_grids(frame)]) for frame in frames];
[0079] In this embodiment, the process of generating an optimized image based on the target imaging quality space may specifically include: matching and synthesizing the target imaging quality space with each imaging quality space in the cache of the local graphics processor to obtain the optimized image corresponding to the target object; that is, according to the new imaging quality space, i.e., the target imaging quality space, matching and synthesizing the original pixel information in the GPU (Graphic Processing Unit, i.e., image processor) cache, i.e., each imaging quality space, and finally generating an optimized output image, i.e., the optimized image; it should be noted that the picture pixels of the optimized output image are consistent with the picture pixels of the real-time frame, which are determined by the portable ocular surface imager. The code for synthesizing the above-mentioned optimized image is as follows:
[0080] def synthesize_image(combined_quality_map, frames):
[0081] # Match quality map to original frames and synthesize finalimage;
[0082] final_image = [] # Placeholder logic;
[0083] return final_image;
[0084] output_image=synthesize_image(combined_quality_map, [frame_n] +frames);
[0085] The code to output the final optimized image is print("Output image generated.");
[0086] By matching the target imaging quality space with the imaging quality space corresponding to each real-time frame, it is ensured that the clarity of the optimized image obtained meets the requirements.
[0087] It can be seen that the present application obtains the clarity value corresponding to each grid by dividing each real-time frame into a grid and calculating the modulation transfer function in each grid in units of grids; by calculating the modulation transfer function in units of grids rather than pixels, the amount of calculation is greatly reduced, thereby shortening the calculation time required for the image optimization process, and solving the problem of not being able to calculate the optimized image based on multiple frames of images in real time.
[0088] Based on the previous embodiment, this application describes the specific process of image optimization that a mobile device is responsible for during the ocular surface image optimization process. To make the technology of the present invention more complete, this application will describe the workflow of a portable ocular surface imager. Figure 2 As shown, an embodiment of the present invention discloses an ocular surface image optimization method applied to a portable ocular surface imager, comprising:
[0089] Step S21: obtaining an image acquisition request, and performing image acquisition on a target object according to the image acquisition request to obtain a target number of real-time frames corresponding to the target object.
[0090] In this embodiment, the real-time frame images captured by the portable ocular surface imager using a multispectral camera can be captured under infrared light, white light or cobalt blue light, that is, the ocular surface imager in this embodiment has infrared lamps, LED (Light Emitting Diode) lamps and cobalt blue lamps; the resolution of the real-time frames captured by the imager is determined by the properties of the ocular surface imager itself, for example, the image resolution is 1600×1200. It can be understood that the image acquisition device in the ocular surface imager in this embodiment, that is, the macro lens in the portable ocular surface camera, is used to capture ocular surface images, and the focal length of the macro lens is 20-40mm; it should be noted that the structure of the portable ocular surface imager in this embodiment also includes an infrared tracking module, which is used to track the positional relationship between the ocular surface and the macro lens, so that the ocular surface imager can better capture images.
[0091] Step S22: sending each of the real-time frames to a mobile device so that the mobile device performs a grid division operation on each of the real-time frames, calculating a preset modulation transfer function in each target grid obtained based on the grid division operation to obtain each clarity value corresponding to each target grid, and drawing the clarity values of each target grid corresponding to a single real-time frame into an imaging quality space of a target size, and then using a differential fitting algorithm to synthesize the imaging quality spaces corresponding to each of the real-time frames into a target imaging quality space, and generating an optimized image based on the target imaging quality space.
[0092] In this embodiment, the portable ocular surface imager needs to be connected to a mobile device so that after the connection, the ocular surface imager can send the collected real-time frames to the mobile device and perform image optimization operations on the mobile device. It can be understood that the structure of the portable ocular surface imager also includes an auxiliary fixing sleeve, and the ocular surface imager and the mobile device can be connected and fixed by the auxiliary fixing sleeve; it should be noted that the real-time frame images collected by the portable ocular surface imager may include dozens of frames, and some of them include real-time frames that do not meet the optimization conditions. Therefore, when sending real-time frames, multiple frames can be selected from the collected real-time frames, such as 3 frames of real-time frames that can improve image clarity, and the above 3 frames of real-time frame images are sent to the mobile device without sending all the collected real-time frames.
[0093] It should be noted that the structure of the portable ocular surface imaging device in this embodiment also includes the following: Figure 3 The Placido mask, cushioning foam, portable ocular surface camera and bracket with Bluetooth module shown in the figure; the portable ocular surface imager after the Placido mask and lens are combined as shown in the figure Figure 4As shown; through the Placido mask, in addition to performing image acquisition operations, the ocular surface imager can also project concentric ring images on the ocular surface and analyze the ocular surface conditions based on the concentric ring images, thereby increasing the application scope of the portable ocular surface imager.
[0094] It can be seen that the present application obtains the clarity value corresponding to each grid by dividing each real-time frame into a grid and calculating the modulation transfer function in each grid in units of grids; by calculating the modulation transfer function in units of grids rather than pixels, the amount of calculation is greatly reduced, thereby shortening the calculation time required for the image optimization process, and solving the problem of not being able to calculate the optimized image based on multiple frames of images in real time.
[0095] See also Figure 5 As shown, an embodiment of the present invention discloses an ocular surface image optimization device, which is applied to a mobile device, comprising:
[0096] A grid division module 11 is used to obtain a target number of real-time frames obtained by the portable ocular surface imager performing image acquisition on the target object, and perform a grid division operation on the real-time frames to obtain each target grid on each real-time frame;
[0097] The function calculation module 12 is used to calculate the preset modulation transfer function in each target grid to obtain the clarity values corresponding to each target grid, and draw the clarity values of each target grid corresponding to a single real-time frame into an imaging quality space of the target size;
[0098] The image sending module 13 is used to synthesize the imaging quality spaces corresponding to the real-time frames into a target imaging quality space by using a differential fitting algorithm, and generate an optimized image based on the target imaging quality space.
[0099] It can be seen that the present application obtains the clarity value corresponding to each grid by dividing each real-time frame into a grid and calculating the modulation transfer function in each grid in units of grids; by calculating the modulation transfer function in units of grids rather than pixels, the amount of calculation is greatly reduced, thereby shortening the calculation time required for the image optimization process, and solving the problem of not being able to calculate the optimized image based on multiple frames of images in real time.
[0100] In some specific embodiments, the grid division module 11 further includes:
[0101] a parameter value determination unit, used for obtaining spectral parameters of the portable ocular surface imager when acquiring images, and determining a target function parameter value corresponding to an initial modulation transfer function according to the spectral parameters;
[0102] The function adjustment unit is used to adjust the initial modulation transfer function according to the target function parameter value to obtain the preset modulation transfer function.
[0103] In some specific embodiments, the function calculation module 12 specifically includes:
[0104] The function calculation unit is used to obtain a function calculation instruction corresponding to the preset modulation transfer function, and calculate the preset modulation transfer function in parallel in each of the target grids according to the function calculation instruction and a general graphics processor technology.
[0105] In some specific embodiments, the image sending module 13 specifically includes:
[0106] A clarity analysis unit, used to analyze the clarity values corresponding to the target grids by using the differential fitting algorithm to obtain a clarity change trend between the target grids;
[0107] The quality space acquisition unit is used to synthesize each of the imaging quality spaces based on the clarity change trend between the target grids to obtain the target imaging quality space.
[0108] In some specific embodiments, the image sending module 13 specifically includes:
[0109] An image acquisition unit is used to perform a matching and synthesis operation on the target imaging quality space and each of the imaging quality spaces in the cache of a local graphics processor to obtain the optimized image corresponding to the target object.
[0110] Furthermore, the present application also discloses an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0111] Figure 6 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the ocular surface image optimization method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0112] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0113] In addition, the memory 22 as a carrier for storing resources may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.
[0114] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, and may be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs that can be used to complete the ocular surface image optimization method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.
[0115] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed ocular surface image optimization method is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0116] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0117] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0118] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0119] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0120] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for optimizing an ocular surface image, characterized in that: Applicable to mobile devices, including: Acquire a target number of real-time frames obtained by the portable ocular surface imager through image acquisition of the target object, and perform a grid division operation on the real-time frames to obtain each target grid on each real-time frame; Calculating a preset modulation transfer function in each of the target grids to obtain each clarity value corresponding to each of the target grids, and drawing the clarity values of each of the target grids corresponding to a single real-time frame into an imaging quality space of a target size; The imaging quality spaces corresponding to the real-time frames are synthesized into a target imaging quality space by using a differential fitting algorithm, and an optimized image is generated based on the target imaging quality space.
2. The ocular surface image optimization method according to claim 1, characterized in that: The calculating a preset modulation transfer function in each of the target grids comprises: A function calculation instruction corresponding to the preset modulation transfer function is obtained, and the preset modulation transfer function is calculated in parallel in each of the target grids according to the function calculation instruction and a general graphics processor technology.
3. The ocular surface image optimization method according to claim 1, characterized in that: The method of synthesizing the imaging quality spaces corresponding to the real-time frames into a target imaging quality space by using a differential fitting algorithm includes: Analyzing the clarity values corresponding to the target grids by using the differential fitting algorithm to obtain the clarity change trend between the target grids; The imaging quality spaces are synthesized based on the clarity variation trend between the target grids to obtain the target imaging quality space.
4. The ocular surface image optimization method according to claim 1, characterized in that: Generating an optimized image based on the target imaging quality space includes: A matching and synthesis operation is performed on the target imaging quality space and each of the imaging quality spaces in the cache of the local graphics processor to obtain the optimized image corresponding to the target object.
5. The ocular surface image optimization method according to any one of claims 1 to 4, characterized in that: Before acquiring the target number of real-time frames obtained by the portable ocular surface imager collecting images of the target object, the method further includes: Acquiring spectral parameters of the portable ocular surface imager when acquiring images, and determining target function parameter values corresponding to the initial modulation transfer function according to the spectral parameters; The initial modulation transfer function is adjusted according to the objective function parameter value adjustment to obtain the preset modulation transfer function.
6. The ocular surface image optimization method according to claim 1, characterized in that: The picture pixels of the optimized image are consistent with the picture pixels of the real-time frame.
7. A method for optimizing an ocular surface image, characterized in that: Applications in portable ocular surface imagers, including: Obtaining an image acquisition request, and performing image acquisition on a target object according to the image acquisition request, so as to obtain a target number of real-time frames corresponding to the target object; Each of the real-time frames is sent to a mobile device so that the mobile device performs a grid division operation on each of the real-time frames, calculates a preset modulation transfer function in each target grid obtained based on the grid division operation to obtain each clarity value corresponding to each of the target grids, and plots the clarity values of each of the target grids corresponding to a single real-time frame into an imaging quality space of a target size, then uses a differential fitting algorithm to synthesize the imaging quality spaces corresponding to each of the real-time frames into a target imaging quality space, and generates an optimized image based on the target imaging quality space.
8. An ocular surface image optimization device, characterized in that: Applicable to mobile devices, including: A grid division module is used to obtain a target number of real-time frames obtained by the portable ocular surface imager through image acquisition of the target object, and perform a grid division operation on the real-time frames to obtain each target grid on each real-time frame; A function calculation module, used for calculating a preset modulation transfer function in each target grid to obtain each clarity value corresponding to each target grid, and drawing the clarity values of each target grid corresponding to a single real-time frame into an imaging quality space of a target size; The image sending module is used to synthesize the imaging quality spaces corresponding to the real-time frames into a target imaging quality space by using a differential fitting algorithm, and generate an optimized image based on the target imaging quality space.
9. A portable ocular surface imaging device, characterized in that: including an image acquisition device for acquiring images and a communication interface for communicating with a mobile device; Wherein, the portable ocular surface imager also includes a processor for executing a computer program to implement the ocular surface image optimization method as described in claim 7.
10. An electronic device, characterized in that: Used for a memory and a processor; wherein the memory is used to store a computer program, and the processor is used to execute the computer program to implement the ocular surface image optimization method as described in any one of claims 1 to 7.
Citation Information
Cited By
Ocular surface image optimization method and apparatus, portable ocular surface imager, and electronic device
WO2026143826A1