An auxiliary focusing method, device, electronic device and storage medium

By determining and displaying the sharpness value of the image frame in the thermal imaging device, the problem of low focus efficiency caused by relying on human judgment is solved, synchronous calculation and display are realized, and the accuracy and speed of focus are improved.

CN116095481BActive Publication Date: 2025-07-04HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310063544.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-13
Publication Date
2025-07-04
Estimated Expiration
2043-01-13

AI Technical Summary

Technical Problem

The existing thermal imaging hand-twist focus equipment relies on human subjective judgment during the focusing process, resulting in low focus efficiency and possible misjudgment or waiting for display of clarity values.

Method used

By determining the moving image format descriptor value of the target image frame and filling it into an additional data row, the sharpness value is parsed and overlaid on the image frame for the user to focus based on the sharpness value.

Benefits of technology

The focus efficiency is improved, ensuring that the AFD value is synchronized with the image data of each frame, ensuring that the calculation and display are completed within the same frame, and improving the accuracy and speed of focus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116095481B_ABST
    Figure CN116095481B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides an auxiliary focusing method, device, electronic device, and storage medium. Since each image frame has a corresponding additional data row, after determining the active image format descriptor value of the target image frame, the active image format descriptor value is directly filled into the additional data row of the target image frame. In this way, after obtaining the data of the target image frame, the additional data row of the target image frame can be parsed to obtain the clarity value of the target image frame, and the clarity value of the target image frame is superimposed and displayed on the target image frame while the target image frame is being displayed, so that the user can perform focusing based on the clarity value of the target image frame. In this way, it can ensure that the AFD value is synchronized with each frame of image data, ensure that the AFD calculation and display can be completed within the same frame, and thus improve the focusing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of assisted focusing, and particularly to an assisted focusing method, apparatus, electronic device, and storage medium. Background Art

[0002] In existing thermal imaging hand-twist focusing devices, during the focusing process, it is generally subjectively judged by humans whether the picture has reached the clearest state. However, human observation is relatively subjective. When hand-twisting for rapid focusing, the displayed clarity evaluation value may be the clarity evaluation value of the previous few frames, and it is easy to misjudge the clarity of the current picture during the focusing process; or during the focusing process, it is adjusted in a stop-and-go manner to wait for the displayed clarity value to be the clarity of the current picture before making a judgment, resulting in low focusing efficiency. Summary of the Invention

[0003] The purpose of the embodiments of this application is to provide an assisted focusing method, apparatus, electronic device, and storage medium to improve the focusing efficiency. The specific technical solutions are as follows:

[0004] The embodiments of this application provide an assisted focusing method, and the method includes:

[0005] For a currently acquired target image frame, determine the active image format descriptor value of the target image frame;

[0006] Fill the active image format descriptor value into the additional data row of the target image frame;

[0007] Parse the additional data row of the target image frame to obtain the clarity value of the target image frame;

[0008] Display the target image frame, and at the same time, superimpose and display the clarity value of the target image frame on the target image frame, so that the user can perform focusing based on the clarity value of the target image frame.

[0009] In a possible embodiment, for the currently acquired target image frame, determining the active image format descriptor value of the target image frame includes:

[0010] For the currently acquired target image frame, obtain a pre-determined focusing area;

[0011] Calculate the active image format descriptor value of the focusing area of the target image frame to obtain the active image format descriptor value of the target image frame.

[0012] In a possible embodiment, the method further includes:

[0013] Obtain a rectangular drawing area drawn by the user in the preview image of the shooting scene;

[0014] Based on the rectangular drawing area, determine the focusing area.

[0015] In a possible embodiment, the determining the focusing area based on the rectangular drawing area includes:

[0016] Obtain each window area of the preview image screen of the shooting scene, where the preview image screen is divided into multiple window areas;

[0017] According to the position of the rectangular drawing area, determine each window area covered by the rectangular drawing area to obtain each target window area, where each of the target window areas constitutes the focusing area.

[0018] In a possible embodiment, the displaying the target image frame and simultaneously superimposing and displaying the sharpness value of the target image frame on the target image frame includes:

[0019] Obtain the sharpness value of the on-screen display (OSD) character of the most recently displayed screen menu adjustment mode to obtain a first sharpness value;

[0020] In a case where the difference between the first sharpness value and the sharpness value of the target image frame is greater than a preset threshold, generate an on-screen display (OSD) character of the sharpness value of the target image frame; display the target image frame and simultaneously superimpose and display the on-screen display (OSD) character of the target image frame on the target image frame;

[0021] The method further includes: in a case where the difference between the first sharpness value and the sharpness value of the target image frame is not greater than the preset threshold, display the target image frame and simultaneously superimpose and display the on-screen display (OSD) character of the most recently displayed screen menu adjustment mode on the target image frame.

[0022] An embodiment of the present application further provides an auxiliary focusing device, and the device includes:

[0023] A determination module, configured to determine the active image format descriptor value of the target image frame for the currently captured target image frame;

[0024] A filling module, configured to fill the active image format descriptor value into the additional data row of the target image frame;

[0025] An analysis module, configured to analyze the additional data row of the target image frame to obtain the sharpness value of the target image frame;

[0026] A processing module, configured to display the target image frame and simultaneously superimpose and display the sharpness value of the target image frame, so that a user can perform focusing based on the sharpness value of the target image frame.

[0027] In a possible embodiment, the determining module is specifically configured to:

[0028] For the currently acquired target image frame, obtain a pre-determined focusing area;

[0029] Calculate the active image format descriptor value of the focusing area of the target image frame to obtain the active image format descriptor value of the target image frame.

[0030] In a possible embodiment, the device further includes:

[0031] An acquisition module, configured to acquire a rectangular drawing area drawn by a user in a preview image screen of a shooting scene;

[0032] A focusing area determination module, configured to determine the focusing area based on the rectangular drawing area.

[0033] In a possible embodiment, the focusing area determination module is specifically configured to:

[0034] Obtain each window area of the preview image screen of the shooting scene, where the preview image screen is divided into multiple window areas;

[0035] According to the position of the rectangular drawing area, determine each window area covered by the rectangular drawing area to obtain each target window area, where each of the target window areas constitutes the focusing area.

[0036] In a possible embodiment, the processing module is specifically configured to:

[0037] Obtain the clarity value of the on-screen menu adjustment method character displayed most recently to obtain a first clarity value;

[0038] When the difference between the first clarity value and the clarity value of the target image frame is greater than a preset threshold, generate an on-screen menu adjustment method character for the clarity value of the target image frame; display the target image frame, and simultaneously superimpose and display the on-screen menu adjustment method character of the target image frame on the target image frame;

[0039] The device further includes: when the difference between the first clarity value and the clarity value of the target image frame is not greater than the preset threshold, display the target image frame, and simultaneously superimpose and display the on-screen menu adjustment method character displayed most recently on the target image frame.

[0040] An embodiment of the present application further provides a device, and the device includes:

[0041] A main control chip, FPGA;

[0042] The FPGA is used to determine the active image format descriptor value of the currently acquired target image frame, fill the active image format descriptor value into the additional data row of the target image frame; and send the additional data row of the target image frame to the main control chip;

[0043] The main control chip parses the additional data row of the target image frame to obtain the clarity value of the target image frame, displays the target image frame, and simultaneously superimposes and displays the clarity value of the target image frame on the target image frame, so that the user can perform focusing based on the clarity value of the target image frame.

[0044] In a possible embodiment, the FPGA is specifically used for:

[0045] For the currently acquired target image frame, obtain the pre-determined focusing area;

[0046] Calculate the active image format descriptor value of the focusing area of the target image frame to obtain the active image format descriptor value of the target image frame.

[0047] In a possible embodiment, the main control chip is used to obtain the coordinate information of the rectangular drawing area drawn by the user in the preview image of the shooting scene, and send the coordinate information to the FPGA;

[0048] The FPGA is used to determine the focusing area based on the coordinate information.

[0049] In a possible embodiment, the FPGA is specifically used for:

[0050] Obtain each window area of the preview image of the shooting scene, where the preview image is divided into multiple window areas;

[0051] According to the position of the rectangular drawing area, determine each window area covered by the rectangular drawing area to obtain each target window area, where each of the target window areas constitutes the focusing area.

[0052] In a possible embodiment, the main control chip is specifically used for:

[0053] Obtain the clarity value of the on-screen menu adjustment method character displayed most recently to obtain the first clarity value;

[0054] When the difference between the first sharpness value and the sharpness value of the target image frame is greater than a preset threshold, generate on-screen display (OSD) characters for adjusting the sharpness value of the target image frame; display the target image frame and simultaneously superimpose and display the OSD characters for adjusting the sharpness value of the target image frame on the target image frame.

[0055] The device further includes: when the difference between the first sharpness value and the sharpness value of the target image frame is not greater than a preset threshold, display the target image frame and simultaneously superimpose and display the most recently displayed OSD characters for adjusting the sharpness value on the target image frame.

[0056] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the auxiliary focusing method described in any one of the above is implemented.

[0057] An embodiment of the present application also provides a computer program product containing instructions, which when running on a computer, causes the computer to execute the auxiliary focusing method described in any one of the above.

[0058] Advantages of the embodiments of the present application:

[0059] For the auxiliary focusing method, device, electronic device and storage medium provided by the embodiments of the present application, since each image frame has a corresponding additional data row, after determining the active format descriptor (AFD) value of the target image frame, the AFD value is directly filled into the additional data row of the target image frame. Thus, after obtaining the data of the target image frame, the additional data row of the target image frame can be parsed to obtain the sharpness value of the target image frame, and the sharpness value of the target image frame is superimposed and displayed on the target image frame while the target image frame is displayed, so that the user can perform focusing based on the sharpness value of the target image frame. In this way, it can be ensured that the AFD value is synchronized with each frame of image data, and the AFD calculation and display can be completed within the same frame, thereby improving the focusing efficiency.

[0060] Of course, when implementing any product or method of the present application, it is not necessarily required to achieve all the above-mentioned advantages at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other embodiments according to these drawings.

[0062] Figure 1aThe first flowchart of the auxiliary focusing method provided by the embodiment of the present application;

[0063] Figure 1b A schematic diagram of an additional data row provided by the embodiment of the present application;

[0064] Figure 1c The second flowchart of the auxiliary focusing method provided by the embodiment of the present application;

[0065] Figure 1d The third flowchart of the auxiliary focusing method provided by the embodiment of the present application;

[0066] Figure 2a A schematic diagram of a user selecting a focusing area provided by the embodiment of the present application;

[0067] Figure 2b A schematic diagram of a 16-screen segmentation provided by the embodiment of the present application;

[0068] Figure 2c A schematic diagram of a user selecting a rectangular drawing area provided by the embodiment of the present application;

[0069] Figure 2d A schematic diagram of coordinate information transmission provided by the embodiment of the present application;

[0070] Figure 2e The fourth flowchart of the auxiliary focusing method provided by the embodiment of the present application;

[0071] Figure 3 A schematic diagram of the structure of an auxiliary focusing device provided by the embodiment of the present application;

[0072] Figure 4 A schematic diagram of the structure of a device provided by the embodiment of the present application. Detailed implementation manners

[0073] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art based on the present application belong to the scope of protection of the present application.

[0074] In order to improve the focusing efficiency, the embodiment of the present application provides an auxiliary focusing method, device, electronic device, computer-readable storage medium, and computer program product including instructions.

[0075] Next, the auxiliary focusing method provided by the embodiments of the present application will be introduced first. This method is applied to any electronic device that can provide auxiliary focusing services, such as cameras, mobile phones, personal computers, servers, etc. The auxiliary focusing method provided by the embodiments of the present application can be implemented by at least one of software, hardware circuits, and logic circuits provided in the electronic device.

[0076] As Figure 1a shown, Figure 1a FIG. 1 is a first flowchart of the auxiliary focusing method provided by the embodiments of the present application. The above method includes:

[0077] S110, for the currently captured target image frame, determine the active image format descriptor value of the target image frame;

[0078] S120, fill the active image format descriptor value into the additional data row of the target image frame;

[0079] S130, parse the additional data row of the target image frame to obtain the clarity value of the target image frame;

[0080] S140, display the target image frame, and at the same time superimpose and display the clarity value of the target image frame on the target image frame, so that the user can perform focusing based on the clarity value of the target image frame.

[0081] For the currently captured target image frame, determine the active image format descriptor value of the target image frame, that is, determine the AFD (Active Format Description) value of the target image frame; the AFD value is a quantitative evaluation value used to characterize the clarity of the picture. The clearer the picture, the larger the AFD value, and the blurrier the picture, the smaller the AFD value. After obtaining the currently captured target image frame, the AFD value can be calculated based on a focusing evaluation algorithm. Among them, the focusing evaluation algorithm can be an evaluation algorithm based on gradient edges, a frequency domain evaluation algorithm, an evaluation algorithm based on information entropy, or an evaluation algorithm based on image statistics. Specifically, it can be set according to the actual situation and is not limited here.

[0082] The target image frame has additional data rows. The additional data rows refer to that a preset number of data rows are newly added at a preset position of the raw data of each target image frame to be used for filling additional information of the electronic device. The additional information of the electronic device may include the status of the electronic device, etc. The status of the electronic device may be the AFD value of the target image frame. The preset number of rows may be 2 rows, 4 rows, 6 rows, etc., which can be specifically set according to the actual situation and are not limited herein. Exemplarily, the additional data rows may be newly added with a preset number of rows at the end of the raw data of each target image frame. For example, 4 rows are newly added at the end of the raw data of each target image frame to fill the additional information of the electronic device. The additional data rows may also be newly added with a preset number of rows at the beginning of the raw data of each target image frame, or the additional data rows may also be newly added with a preset number of rows at the middle position of the raw data of each target image frame. The position of the additional data rows can be set according to the actual situation and is not limited herein.

[0083] Suppose the resolution of the electronic device is 384*288, that is, the resolution of the raw data of the image frame collected by the electronic device is 384*288, and the image frame has additional data rows, as Figure 1b shown. The raw data of the image frame collected by the electronic device is 14-bit raw data, that is, the resolution of the RAW (RAW Image Format, raw image coding data) data is 384*288. There are 4 additional data rows, namely RAW additional row 1, RAW additional row 2, RAW additional row 3, and RAW additional row 4 shown in the figure. Each additional row includes 384 pixels, and each pixel corresponds to a preset number of bytes. For example, each pixel corresponds to 2 bytes. The number of bytes corresponding to each pixel is related to the electronic device and can be specifically set based on the electronic device. After determining the AFD value of the target data frame, the AFD value can be filled into the additional data rows, and then the resolution of the output raw data image format becomes 384*292, where the 289th to 292nd rows are the corresponding additional data rows.

[0084] In addition, the position where the AFD information is filled can be a specified position of the additional data rows. The specified position can be set based on the actual situation. For example, the position where the AFD information is filled is the 81st and 82nd pixel positions of the first additional row, occupying two pixels.

[0085] Then, the additional data rows of the target image frame are parsed to obtain the clarity value of the target image frame, the target image frame is displayed, and at the same time, the clarity value of the target image frame is superimposed and displayed on the target image frame so that the user can perform focusing based on the clarity value of the target image frame.

[0086] Since each image frame has a corresponding additional data row, after determining the active image format descriptor value of the target image frame, the active image format descriptor value is directly filled into the additional data row of the target image frame. In this way, after obtaining the data of the target image frame, the additional data row of the target image frame can be parsed to obtain the clarity value of the target image frame, and the clarity value of the target image frame is superimposed and displayed on the target image frame while the target image frame is being displayed, so that the user can perform focusing based on the clarity value of the target image frame. In this way, it can be ensured that the AFD value is synchronized with each frame of image data, and it is ensured that the AFD calculation and display can be completed within the same frame, thereby improving the focusing efficiency.

[0087] Exemplarily, the electronic device includes a thermal imaging module, an FPGA (Field-Programmable Gate Array), and a DSP (Digital Signal Processing). The thermal imaging module outputs the raw data of each image frame. After receiving the raw data of each image frame, the FPGA first calculates the AFD value of each image frame through an integrated focusing evaluation algorithm inside, and at the same time, 4 additional data rows are added to the end of the raw data of each image frame, and the AFD value is superimposed on the specified position of the additional data row. The raw data after adding the additional row is transmitted to the main control platform in parallel port mode. The main control platform can be a main control chip. Among them, the main control chip runs DSP and APP (Application) and other software. The APP is used to perform operations such as coordinate parsing and coordinate mapping. In addition, the storage medium of the main control platform stores a BSP (Board Support Package) for constructing an embedded operating system. After receiving the raw data, the DSP in the main control platform parses the AFD value of the additional row in the raw data at the specified position and superimposes it on the screen in the form of OSD.

[0088] As Figure 1c shown, Figure 1cThis is the second process schematic diagram of the auxiliary focusing method provided by the embodiments of this application. The thermal imaging module outputs the raw data of each image frame to the FPGA in the form of FPC parallel signals. After receiving the raw data, the FPGA calculates the AFD value of the raw data to obtain the AFD value of each frame. Then, the FPGA superimposes the calculated AFD value at a specified position in the additional data row of the raw data. Then, the FPGA outputs the raw data with the additional row information added and transfers it to the DSP of the main control platform in a parallel port manner. Among them, the parallel port can include 16 lines, plus two synchronization signal lines, a total of 18 lines; the synchronization signal lines are VD (Vertical Drive, a signal for synchronizing the field rate of an industrial camera from an external source) and HD (Horizontal Drive, a signal used to synchronize the line scan rate of an industrial camera from an external source) synchronization signals, that is, the frame synchronization signal and the line synchronization signal respectively. When transmitting data through the parallel port, first rely on the VD signal and the HD signal to synchronize each frame and each line of data. After the signal synchronization, one pixel data is transmitted in one clock. After receiving it, the DSP can count the number of received lines and receive each frame of data in this way. After the DSP receives each frame of data, it parses the corresponding AFD value from the corresponding additional row position and superimposes it on the screen in the form of OSD (on-screen display) so that the user can focus based on the clarity value of the target image frame.

[0089] Moreover, through this method of transmitting the AFD value through the additional row of raw data by the FPGA, it can ensure that the AFD value is synchronized with each frame of image data, and the data can be transmitted to the DSP within one frame, thus ensuring that the AFD calculation and display can be completed within the same frame.

[0090] As Figure 1d shown, Figure 1d This is the third process schematic diagram of the auxiliary focusing method provided by the embodiments of this application. The above method includes:

[0091] After the FPGA receives the raw data, it first preprocesses the raw data to obtain the preprocessed raw data. The preprocessing methods include any one of the following methods: non-linear correction, dead pixel removal, flare removal, and vertical line removal;

[0092] The above AFD value calculation by the FPGA for the raw data includes:

[0093] The FPGA calculates the AFD value of the preprocessed raw data.

[0094] First, perform non-linear correction, bad pixel removal, dish removal, and vertical line removal on the raw data to obtain the preprocessed raw data. Then, calculate the AFD value based on the preprocessed raw data using the focus evaluation method to obtain the AFD value. This can make the calculated AFD value more accurate. Moreover, after the FPGA receives the raw data and preprocesses it, the AFD value is directly calculated inside the FPGA. The FPGA has a high main frequency and fast processing speed, which can ensure that the AFD value is processed within one frame.

[0095] In a possible embodiment, determining the active image format descriptor value of the target image frame for the currently captured target image frame includes:

[0096] For the currently captured target image frame, obtain the pre-determined focus area;

[0097] Calculate the active image format descriptor value of the focus area of the target image frame to obtain the active image format descriptor value of the target image frame.

[0098] For the currently captured target image frame, the focus area can be the full-screen area of the target image frame or a partial area. The focus area can be pre-determined. For the sake of clarity of the solution and layout, a detailed description will be given below in combination with another embodiment.

[0099] After obtaining the pre-determined focus area, the AFD value of the focus area of the target image frame can be calculated to obtain the active image format descriptor value of the target image frame.

[0100] The AFD value reflecting the clarity of the target image frame is calculated based on the focus area, which can focus on the key area and solve the problem that the full-screen evaluation value cannot effectively reflect the clarity of the foreground or background when there is a foreground and background phenomenon in the picture.

[0101] In a possible embodiment, the electronic device operates in the assisted focusing mode and the non-assisted focusing mode. In the case of the non-assisted focusing mode, the focus area is the full-screen area. In the case of the assisted focusing mode, the focus area is selected based on the user's operation.

[0102] By setting the assisted focusing mode, the selection of the focus area can be supported, so that the key area can be focused.

[0103] In a possible embodiment, the above method further includes:

[0104] Obtain the rectangular drawing area drawn by the user in the preview image of the shooting scene;

[0105] Based on the above rectangular drawing area, determine the above focus area.

[0106] The user can draw a rectangular drawing area in the preview image of the shooting scene, and then determine the focus area based on the rectangular drawing area. Determining the focus area based on the rectangular drawing area drawn by the user in the preview image of the shooting scene can effectively solve the problem that when there are multiple objects in the picture, the AFD value is not the AFD value corresponding to the focus target desired by the customer, and solve the phenomenon that the full-screen evaluation value cannot effectively reflect the clarity of the foreground or background when there is a foreground and background phenomenon in the picture.

[0107] Exemplarily, the preview image of the shooting scene is displayed on a web page, where the web page includes an auxiliary focus button, which is used to enable the AFD value auxiliary focus function. For example, in the case of the non-auxiliary focus mode, when the user clicks the auxiliary focus button, the AFD value auxiliary focus function is enabled. After enabling, the user can draw a rectangular drawing area in the preview image, as Figure 2a shown. Specifically, in the preview window, the user can draw a rectangular drawing area on the preview image with the mouse. Specifically, when the user draws with the mouse, the coordinate information of the position where the user clicks the mouse can be obtained. In addition, the user can also input the coordinate information of the rectangular drawing area at a preset interface, which can be set according to the actual situation and is not limited here.

[0108] After obtaining the coordinate information, the coordinate information can be transmitted to the main control platform. After the main control platform analyzes the coordinate information, it is then transmitted to the FPGA through UART (Universal Asynchronous Receiver / Transmitter) communication. The FPGA will then configure the coordinate information into the internal focus evaluation operator to calculate the AFD value of the focus area.

[0109] In a possible embodiment, after obtaining the coordinate information of the rectangular drawing area, a corresponding rectangular frame is drawn in the preview image of the shooting scene based on the above coordinate information and is kept in the picture all the time.

[0110] The main control platform can transmit the coordinate information to the DSP, and the DSP draws a corresponding rectangular frame in the picture according to the coordinate information, so that the user can judge whether the current focus area is the area of interest to himself through the rectangular frame, thereby facilitating the user's manual focus and improving the accuracy of manual focus.

[0111] In a possible embodiment, in the case of the auxiliary focus mode, if the user turns off the auxiliary focus mode, the rectangular frame is cancelled from display.

[0112] Draw a corresponding rectangular box on the screen according to the coordinate information, and keep the rectangular box in the case of the assisted focusing mode, so that the user can judge whether the current focusing area is the area of interest through the rectangular box, thereby facilitating the user to manually focus and improving the accuracy of manual focusing.

[0113] In a possible embodiment, for the currently captured target image frame, in the case of the assisted focusing mode, if the user does not draw a rectangular drawing area on the preview image screen of the shooting scene within a preset time period, the full-screen area of the target image frame is used as the focusing area.

[0114] If the electronic device is in the assisted focusing mode and the user does not draw a rectangular drawing area on the preview image screen of the shooting scene within a preset time period, the full-screen area of the target image frame is used as the focusing area to prevent the user from forgetting to turn off the assisted focusing mode or the current image frame does not require manual assisted focusing by the user, thereby improving the focusing efficiency.

[0115] In a possible embodiment, for the currently captured target image frame, in the case of the assisted focusing mode, if the user does not draw a rectangular drawing area on the preview image screen of the shooting scene within a preset time period, a reminder message for reminding the user to draw a rectangular drawing area is generated.

[0116] If the user does not draw a rectangular drawing area on the preview image screen of the shooting scene within a preset time period, a reminder message for reminding the user to draw a rectangular drawing area is generated to remind the user to draw a rectangular drawing area on the preview image screen of the shooting scene and improve the focusing efficiency.

[0117] In a possible embodiment, determining the focusing area based on the above-mentioned rectangular drawing area includes:

[0118] Obtain each window area of the preview image screen of the shooting scene, where the preview image screen is divided into multiple window areas;

[0119] According to the position of the above-mentioned rectangular drawing area, determine each window area covered by the above-mentioned rectangular drawing area to obtain each target window area, where each of the above-mentioned target window areas constitutes the focusing area.

[0120] The preview image screen can be divided into multiple window areas, such as Figure 2b As shown, the preview image screen is divided into 16 small windows based on the window vertical start position, window horizontal start position, window horizontal width, and window vertical height. Exemplarily, the numbers are used to represent the numbers of each small window, such as Figure 2bNumbers 0 to 15. After obtaining the rectangular drawing area drawn by the user in the preview image of the shooting scene, according to which small windows the rectangular drawing area covers, the corresponding small windows are extracted to form a rectangular area, thereby obtaining the focusing area.

[0121] In a possible embodiment, for each window area, the method for determining whether the above rectangular drawing area covers the window area is as follows:

[0122] Calculate the area of the overlapping area between the above rectangular drawing area and the window area to obtain the first area;

[0123] Calculate the ratio of the above first area to the area of the window area;

[0124] When the ratio is greater than the preset ratio, it is determined that the rectangular drawing area covers the window area.

[0125] The preset ratio can be set according to the actual situation. For example, as long as the preset ratio is 0, when the ratio is greater than 0, that is, as long as there is an overlapping area between the rectangular drawing area and the window area, it is determined that the rectangular drawing area covers the window area.

[0126] As Figure 2c shown, the areas selected by the user (the rectangular drawing area drawn by the user in the preview image of the shooting scene) cover window 5, window 6, window 9, and window 10, then window 5, window 6, window 9, and window 10 are combined to form the focusing area.

[0127] Based on the above embodiments, the present application provides a schematic diagram of coordinate information transmission, as Figure 2d shown:

[0128] The user can draw a rectangular drawing area in the preview image of the shooting scene displayed by the WEB control of the PC (Personal Computer) to select the area of interest to the user. Then the PC side transmits the coordinate information of the rectangular drawing area to the main control platform through the network port. The APP of the main control platform analyzes the coordinate information of the rectangular drawing area. After the APP analyzes, it will distinguish two transmission methods and transmit the coordinate information to the DSP and FPGA respectively:

[0129] Among them, when transmitting to the DSP, the APP of the main control platform directly transmits the coordinate information of the rectangular drawing area drawn by the user to the DSP after analyzing it. After receiving the coordinate information, the DSP directly draws the corresponding rectangular frame.

[0130] When transmitting to the FPGA, after the APP of the main control platform parses the coordinate information of the rectangle drawing area drawn by the user, it first maps the coordinate information to the corresponding 16 small areas, and then transmits the coordinates of the selected area after mapping to the FPGA in the form of serial communication.

[0131] In a possible embodiment, the above-mentioned displaying the target image frame and simultaneously superimposing and displaying the clarity value of the target image frame on the target image frame includes:

[0132] Obtain the clarity value of the on-screen menu adjustment method character displayed most recently to obtain a first clarity value;

[0133] In the case where the difference between the first clarity value and the clarity value of the target image frame is greater than a preset threshold, generate an on-screen menu adjustment method character for the clarity value of the target image frame; display the target image frame, and simultaneously superimpose and display the on-screen menu adjustment method character of the target image frame on the target image frame;

[0134] The above method further includes: in the case where the difference between the first clarity value and the clarity value of the target image frame is not greater than a preset threshold, display the target image frame, and simultaneously superimpose and display the on-screen menu adjustment method character displayed most recently on the target image frame.

[0135] After parsing the additional data row of the target image frame to obtain the clarity value of the target image frame, in order to ensure that the displayed AFD value can be updated in real time for each frame, it is necessary to receive the AFD value once for each frame, and then obtain the clarity value of the on-screen menu adjustment method character displayed most recently to obtain a first clarity value. In the case where the difference between the first clarity value and the clarity value of the target image frame is greater than a preset threshold, generate an on-screen menu adjustment method character for the clarity value of the target image frame, display the target image frame, and simultaneously superimpose and display the on-screen menu adjustment method character of the target image frame on the target image frame. For example, determine whether the difference between the first clarity value and the clarity value of the target image frame is greater than 5%. If it is greater than 5%, update the OSD display. If it is not greater than the preset threshold, display the target image frame, and simultaneously superimpose and display the on-screen menu adjustment method character displayed most recently on the target image frame.

[0136] This enables the calculation and display of the AFD evaluation value to be updated within the same frame, and the AFD value is synchronized with each frame of image data, thereby ensuring higher real-time updating of the evaluation value during the manual focusing process.

[0137] As Figure 2e shown, Figure 2eThis is the fourth process schematic diagram of the auxiliary focusing method provided by the embodiments of this application. The thermal imaging module outputs the raw data of each image frame to the FPGA in the form of FPC parallel signals. After receiving the raw data, the FPGA calculates the AFD value of the raw data to obtain the AFD value of each frame. Then, the FPGA superimposes the calculated AFD value at the specified position in the additional data row of the raw data. Then, the FPGA outputs the raw data with the additional row information added and transfers it to the DSP of the main control platform in parallel port mode. Among them, the parallel port can include 16 lines, plus two synchronous signal lines, a total of 18 lines; the synchronous signal lines are VD and HD synchronous signals. Specifically, the VD signal and HD signal are first relied on to synchronize each frame and each line of data. After the signal synchronization, one pixel data is transmitted in one clock. After receiving it, the DSP can count the number of received lines and receive each frame of data in this way. After receiving each frame of data, the DSP parses the corresponding AFD value from the corresponding additional row position and superimposes it on the screen in the form of OSD (on-screen display), so that the user can focus based on the clarity value of the target image frame.

[0138] In addition, the user can draw a rectangular drawing area in the preview image of the shooting scene displayed by the WEB control of the PC (Personal Computer), so as to select the area of interest to the user. Then, the PC will transfer the coordinate information of the rectangular drawing area to the main control platform based on the network protocol. After parsing, the APP of the main control platform will distinguish two transfer methods and transfer the coordinate information to the DSP and FPGA respectively through UART communication:

[0139] Among them, when transferring to the DSP, after parsing the coordinate information of the rectangular drawing area drawn by the user, the APP of the main control platform directly transfers it to the DSP. After receiving the coordinate information, the DSP directly draws the corresponding rectangular frame.

[0140] When transferring to the FPGA, after parsing the coordinate information of the rectangular drawing area drawn by the user, the APP of the main control platform first maps the coordinate information to the corresponding 16 small areas, and then transfers the coordinates of the selected area after mapping to the FPGA in serial port communication mode.

[0141] Through this method of transferring the AFD value by adding an additional row to the raw data, the FPGA can ensure that the AFD value is synchronized with each frame of image data, and the data transfer to the DSP can be completed within one frame, so as to ensure that the AFD calculation and display can be completed within the same frame. Moreover, it can support the selection of the focusing area, so that the AFD value reflecting the clarity of the target image frame is calculated based on the focusing area, so as to focus on the key area and solve the problem that the full-screen evaluation value cannot effectively reflect the clarity of the foreground or background when there is a foreground and background phenomenon in the picture.

[0142] As Figure 3 shown Figure 3 This is a schematic structural diagram of an auxiliary focusing device provided by an embodiment of the present application. The above device includes:

[0143] A determination module 310, configured to determine the active image format descriptor value of the target image frame for the currently acquired target image frame;

[0144] A filling module 320, configured to fill the active image format descriptor value into the additional data row of the target image frame;

[0145] An analysis module 330, configured to analyze the additional data row of the target image frame to obtain the clarity value of the target image frame;

[0146] A processing module 340, configured to display the target image frame and simultaneously superimpose and display the clarity value of the target image frame on the target image frame, so that the user can perform focusing based on the clarity value of the target image frame.

[0147] In a possible embodiment, the determination module 310 is specifically configured to:

[0148] For the currently acquired target image frame, obtain a pre-determined focusing area;

[0149] Calculate the active image format descriptor value of the focusing area of the target image frame to obtain the active image format descriptor value of the target image frame.

[0150] In a possible embodiment, the above device further includes:

[0151] An acquisition module, configured to acquire a rectangular drawing area drawn by the user in the preview image of the shooting scene;

[0152] A focusing area determination module, configured to determine the focusing area based on the rectangular drawing area.

[0153] In a possible embodiment, the focusing area determination module is specifically configured to:

[0154] Obtain each window area of the preview image of the shooting scene, where the preview image is divided into multiple window areas;

[0155] According to the position of the rectangular drawing area, determine each window area covered by the rectangular drawing area to obtain each target window area, where each of the above target window areas constitutes the focusing area.

[0156] In a possible embodiment, the processing module 340 is specifically configured to:

[0157] Obtain the clarity value of the on-screen menu adjustment method characters of the most recently displayed screen, and obtain the first clarity value;

[0158] When the gap between the first clarity value and the clarity value of the target image frame is greater than a preset threshold, generate on-screen menu adjustment method characters for the clarity value of the target image frame; display the target image frame, and at the same time superimpose and display the on-screen menu adjustment method characters of the target image frame on the target image frame;

[0159] The above device further includes: when the gap between the first clarity value and the clarity value of the target image frame is not greater than a preset threshold, display the target image frame, and at the same time superimpose and display the on-screen menu adjustment method characters of the most recently displayed screen on the target image frame.

[0160] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.

[0161] The embodiment of the present application also provides a device, as Figure 4 shown, including:

[0162] A main control chip, an FPGA;

[0163] The above FPGA is used to determine the active image format descriptor value of the target image frame for the currently captured target image frame, fill the active image format descriptor value into the additional data row of the target image frame; and send the additional data row of the target image frame to the main control chip;

[0164] The above main control chip parses the additional data row of the target image frame to obtain the clarity value of the target image frame, displays the target image frame, and at the same time superimposes and displays the clarity value of the target image frame on the target image frame, so that the user can perform focusing based on the clarity value of the target image frame.

[0165] In a possible embodiment, the above FPGA is specifically used for:

[0166] For the currently captured target image frame, obtain a pre-determined focus area;

[0167] Calculate the active image format descriptor value of the focus area of the target image frame to obtain the active image format descriptor value of the target image frame.

[0168] In a possible embodiment, the above main control chip is used to obtain the coordinate information of the rectangular drawing area drawn by the user in the preview image of the shooting scene, and send the coordinate information to the above FPGA;

[0169] The above FPGA is used to determine the above focus area based on the above coordinate information.

[0170] In a possible embodiment, the above FPGA is specifically used for:

[0171] Obtain each window area of the preview image frame of the above shooting scene, where the above preview image frame is divided into multiple window areas;

[0172] According to the position of the above rectangle drawing area, determine each window area covered by the above rectangle drawing area to obtain each target window area, where each of the above target window areas constitutes the above focus area.

[0173] In a possible embodiment, the above main control chip is specifically used for:

[0174] Obtain the clarity value of the on-screen menu adjustment method characters displayed most recently to obtain a first clarity value;

[0175] When the difference between the above first clarity value and the clarity value of the above target image frame is greater than a preset threshold, generate on-screen menu adjustment method characters for the clarity value of the above target image frame; display the above target image frame, and at the same time superimpose and display the on-screen menu adjustment method characters of the above target image frame on the above target image frame;

[0176] The above device further includes: when the difference between the above first clarity value and the clarity value of the above target image frame is not greater than the preset threshold, display the above target image frame, and at the same time superimpose and display the on-screen menu adjustment method characters displayed most recently on the above target image frame.

[0177] The communication bus mentioned in the above device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0178] The communication interface is used for communication between the above electronic device and other devices.

[0179] In another embodiment provided by the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above auxiliary focusing methods are implemented.

[0180] In another embodiment provided by the present application, a computer program product including instructions is further provided. When it runs on a computer, it causes the computer to execute any one of the auxiliary focusing methods in the above embodiments.

[0181] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

[0182] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article, or device including the element.

[0183] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, electronic device, computer-readable storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.

[0184] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.

Claims

1. An auxiliary focusing method, characterized in that, Applied to a device, the device includes an FPGA and a main control chip, and a DSP runs in the main control chip. The method includes: The main control chip obtains the coordinate information of the rectangular drawing area drawn by the user in the preview image of the shooting scene displayed by the WEB control, and sends the coordinate information to the FPGA and the DSP respectively through a two-way transmission method; The DSP draws a corresponding rectangular frame in the picture according to the coordinate information and retains it in the picture; The FPGA determines the focusing area based on the coordinate information; The FPGA calculates the active image format descriptor value of the focusing area of the target image frame for the currently acquired target image frame, and obtains the active image format descriptor value of the target image frame; The FPGA fills the active image format descriptor value into the additional data row of the target image frame, and sends the additional data row of the target image frame to the main control chip; The DSP parses the additional data row of the target image frame to obtain the clarity value of the target image frame; The DSP displays the target image frame in the picture, and at the same time superimposes and displays the clarity value of the target image frame on the target image frame, so that the user can perform focusing based on the clarity value of the target image frame.

2. The method according to claim 1, wherein The FPGA determines the focusing area based on the coordinate information, including: The FPGA obtains each window area of the preview image of the shooting scene, where the preview image is divided into multiple window areas; According to the position of the rectangular drawing area, determine each window area covered by the rectangular drawing area to obtain each target window area, where each target window area forms the focusing area.

3. The method according to claim 1, characterized in that The DSP displays the target image frame in the picture, and at the same time superimposes and displays the clarity value of the target image frame on the target image frame, including: The DSP obtains the clarity value of the on-screen menu adjustment method character displayed most recently to obtain a first clarity value; When the difference between the first clarity value and the clarity value of the target image frame is greater than a preset threshold, generate an on-screen menu adjustment method character for the clarity value of the target image frame; display the target image frame in the picture, and at the same time superimpose and display the on-screen menu adjustment method character of the target image frame on the target image frame; When the difference between the first clarity value and the clarity value of the target image frame is not greater than the preset threshold, display the target image frame in the picture, and at the same time superimpose and display the on-screen menu adjustment method character displayed most recently on the target image frame.

4. An auxiliary focusing device, characterized in that, Applied to a device, the device includes an FPGA and a main control chip, and a DSP runs in the main control chip. The device includes: An acquisition module, configured to enable the main control chip to obtain the coordinate information of the rectangular drawing area drawn by the user in the preview image of the shooting scene displayed by the WEB control, and send the coordinate information to the FPGA and the DSP respectively through a two-way transmission method; A drawing module, configured to enable the DSP to draw a corresponding rectangular frame in the picture according to the coordinate information and retain it in the picture; A first determination module, configured to enable the FPGA to determine a focus area based on the coordinate information; A second determination module, configured to enable the FPGA to calculate an active image format descriptor value of the focus area of the currently acquired target image frame to obtain the active image format descriptor value of the target image frame; A filling module, configured to enable the FPGA to fill the active image format descriptor value into an additional data row of the target image frame and send the additional data row of the target image frame to the main control chip; An analysis module, configured to enable the DSP to analyze the additional data row of the target image frame to obtain the clarity value of the target image frame; A processing module, configured to enable the DSP to display the target image frame in the picture and simultaneously superimpose and display the clarity value of the target image frame on the target image frame, so that the user can perform focusing based on the clarity value of the target image frame.

5. A device, characterized in that, The device includes: A main control chip, an FPGA, and a DSP runs in the main control chip; The main control chip is configured to obtain coordinate information of a rectangular drawing area drawn by the user in a preview image picture of a shooting scene displayed by a WEB control and send the coordinate information to the FPGA and the DSP respectively through a two-way transmission method; The DSP is configured to draw a corresponding rectangular frame in the picture according to the coordinate information and retain it in the picture; The FPGA is configured to determine a focus area based on the coordinate information; calculate an active image format descriptor value of the focus area of the currently acquired target image frame to obtain the active image format descriptor value of the target image frame, fill the active image format descriptor value into an additional data row of the target image frame, and send the additional data row of the target image frame to the main control chip; The DSP is configured to analyze the additional data row of the target image frame to obtain the clarity value of the target image frame, display the target image frame in the picture, and simultaneously superimpose and display the clarity value of the target image frame on the target image frame, so that the user can perform focusing based on the clarity value of the target image frame.

6. The device according to claim 5, characterized in that, Specifically, the FPGA is configured to: Obtain each window area of the preview image picture of the shooting scene, where the preview image picture is divided into multiple window areas; Determine each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, where each target window area forms the focus area.

7. The device according to claim 5, characterized in that, Specifically, the DSP is configured to: Obtain the clarity value of the on-screen menu adjustment method character displayed most recently to obtain a first clarity value; Generate an on-screen menu adjustment method character for the clarity value of the target image frame when the difference between the first clarity value and the clarity value of the target image frame is greater than a preset threshold; Display the target image frame in the said screen, and simultaneously superimpose and display the on-screen menu adjustment method characters of the target image frame on the target image frame; When the gap between the first clarity value and the clarity value of the target image frame is not greater than a preset threshold, display the target image frame in the said screen, and simultaneously superimpose and display the on-screen menu adjustment method characters displayed most recently on the target image frame.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which when executed by a processor implements the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Auxiliary focusing method and auxiliary focusing device

    CN103096124A

  • Camera auxiliary focusing method

    CN106341594A

  • Manual focus prompting method, control device, shooting equipment and controller

    CN109041590A