CN116095481A - Auxiliary focusing method and device, electronic equipment and storage medium - Google Patents

Auxiliary focusing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116095481A
CN116095481A CN202310063544.1A CN202310063544A CN116095481A CN 116095481 A CN116095481 A CN 116095481A CN 202310063544 A CN202310063544 A CN 202310063544A CN 116095481 A CN116095481 A CN 116095481A
Authority
CN
China
Prior art keywords
image frame
target image
value
area
definition value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310063544.1A
Other languages
Chinese (zh)
Inventor
杨敏鸣
施扬
叶成俊
范柯甫
杨立平
倪利明
陈相
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Micro Image Software Co ltd
Original Assignee
Hangzhou Micro Image Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Micro Image Software Co ltd filed Critical Hangzhou Micro Image Software Co ltd
Priority to CN202310063544.1A priority Critical patent/CN116095481A/en
Publication of CN116095481A publication Critical patent/CN116095481A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/36Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals
    • G06T5/73
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Abstract

The embodiment of the application provides an auxiliary focusing method, an auxiliary focusing device, an electronic device and a storage medium, wherein each image frame is provided with a corresponding additional data row, after a moving image format descriptor value of a target image frame is determined, the moving image format descriptor value is directly filled into the additional data row of the target image frame, so that after data of the target image frame are acquired, the additional data row of the target image frame can be analyzed to obtain a definition value of the target image frame, the definition value of the target image frame is displayed while the target image frame is displayed, and the user focuses on the basis of the definition value of the target image frame. Therefore, the synchronization of the AFD value and the image data of each frame can be ensured, the completion of the AFD calculation and the display in the same frame can be ensured, and the focusing efficiency is further improved.

Description

Auxiliary focusing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of auxiliary focusing technologies, and in particular, to an auxiliary focusing method, an auxiliary focusing device, an electronic device, and a storage medium.
Background
The existing thermal imaging hand-twisting focusing equipment generally confirms whether a picture reaches the clearest state in a mode of artificial subjective judgment in the focusing process, is subjective in artificial observation, and can display a definition evaluation value which is the definition evaluation value of the previous frames when the hand-twisting focusing equipment focuses rapidly, so that misjudgment is easily caused on the definition degree of the current picture in the focusing process; or the focusing process is judged after waiting for the displayed definition value to be the definition of the current picture in a modulation and mediation mode, so that the focusing efficiency is low.
Disclosure of Invention
An object of an embodiment of the present application is to provide an auxiliary focusing method, an auxiliary focusing device, an electronic device, and a storage medium, so as to improve focusing efficiency. The specific technical scheme is as follows:
the embodiment of the application provides an auxiliary focusing method, which comprises the following steps:
determining a moving image format descriptor value of a currently acquired target image frame for the target image frame;
filling the moving image format descriptor value into an additional data line of the target image frame;
analyzing the additional data row of the target image frame to obtain a definition value of the target image frame;
and displaying the target image frame, and simultaneously displaying the definition value of the target image frame in a superimposed mode on the target image frame so that a user focuses on the basis of the definition value of the target image frame.
In a possible embodiment, the determining, for a currently acquired target image frame, a moving image format descriptor value of the target image frame includes:
acquiring a predetermined focusing area for a currently acquired target image frame;
and calculating a moving image format descriptor value of a focusing area of the target image frame to obtain the moving image format descriptor value of the target image frame.
In a possible embodiment, the method further comprises:
acquiring a rectangular drawing area drawn by a user in a preview image picture of a shooting scene;
the focus area is determined based on the rectangular drawing area.
In a possible embodiment, the determining the focusing area based on the rectangular drawing area includes:
acquiring each window area of a preview image picture of the shooting scene, wherein the preview image picture is divided into a plurality of window areas;
and determining each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, wherein each target window area forms the focusing area.
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:
acquiring a definition value of a last displayed screen menu type adjustment mode character to obtain a first definition value;
generating a screen menu adjusting mode character of the definition value of the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value; displaying the target image frame, and simultaneously superposing and displaying screen menu type adjustment mode characters of the target image frame on the target image frame;
The method further comprises the steps of: and displaying the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is not larger than a preset threshold value, and simultaneously displaying the last displayed on-screen menu type adjustment mode character on the target image frame in a superimposed mode.
The embodiment of the application also provides an auxiliary focusing device, which comprises:
a determining module, configured to determine, for a currently acquired target image frame, a moving image format descriptor value of the target image frame;
a padding module for padding the moving image format descriptor value into an additional data line of the target image frame;
the analysis module is used for analyzing the additional data row of the target image frame to obtain a definition value of the target image frame;
and the processing module is used for displaying the target image frame and simultaneously displaying the definition value of the target image frame in a superimposed manner on the target image frame so as to enable a user to focus based on the definition value of the target image frame.
In a possible embodiment, the determining module is specifically configured to:
acquiring a predetermined focusing area for a currently acquired target image frame;
And calculating a moving image format descriptor value of a focusing area of the target image frame to obtain the moving image format descriptor value of the target image frame.
In a possible embodiment, the apparatus further comprises:
the acquisition module is used for acquiring a rectangular drawing area drawn by a user in a preview image picture of a shooting scene;
and the focusing area determining module is used for determining the focusing area based on the rectangular drawing area.
In a possible embodiment, the focusing area determining module is specifically configured to:
acquiring each window area of a preview image picture of the shooting scene, wherein the preview image picture is divided into a plurality of window areas;
and determining each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, wherein each target window area forms the focusing area.
In a possible embodiment, the processing module is specifically configured to:
acquiring a definition value of a last displayed screen menu type adjustment mode character to obtain a first definition value;
generating a screen menu adjusting mode character of the definition value of the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value; displaying the target image frame, and simultaneously superposing and displaying screen menu type adjustment mode characters of the target image frame on the target image frame;
The apparatus further comprises: and displaying the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is not larger than a preset threshold value, and simultaneously displaying the last displayed on-screen menu type adjustment mode character on the target image frame in a superimposed mode.
The embodiment of the application also provides equipment, which comprises:
the main control chip is FPGA;
the FPGA is used for determining a moving image format descriptor value of a target image frame aiming at the currently acquired target image frame, and filling the moving image format descriptor value into an additional data row of the target image frame; and transmitting the additional data line of the target image frame to the main control chip;
and the main control chip analyzes the additional data row of the target image frame to obtain a definition value of the target image frame, displays the target image frame, and simultaneously superimposes and displays the definition value of the target image frame on the target image frame so as to enable a user to focus based on the definition value of the target image frame.
In a possible embodiment, the FPGA is specifically configured to:
acquiring a predetermined focusing area for a currently acquired target image frame;
And calculating a moving image format descriptor value of a focusing area of the target image frame to obtain the moving image format descriptor value of the target image frame.
In a possible embodiment, the main control chip is configured to obtain coordinate information of a rectangular drawing area drawn by a user in a preview image frame of a shooting scene, and send the coordinate information to the FPGA;
the FPGA is configured to determine the focal region based on the coordinate information.
In a possible embodiment, the FPGA is specifically configured to:
acquiring each window area of a preview image picture of the shooting scene, wherein the preview image picture is divided into a plurality of window areas;
and determining each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, wherein each target window area forms the focusing area.
In a possible embodiment, the main control chip is specifically configured to:
acquiring a definition value of a last displayed screen menu type adjustment mode character to obtain a first definition value;
generating a screen menu adjusting mode character of the definition value of the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value; displaying the target image frame, and simultaneously superposing and displaying screen menu type adjustment mode characters of the target image frame on the target image frame;
The apparatus further comprises: and displaying the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is not larger than a preset threshold value, and simultaneously displaying the last displayed on-screen menu type adjustment mode character on the target image frame in a superimposed mode.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements any of the above-described auxiliary focusing methods.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the above-described auxiliary focusing methods.
The beneficial effects of the embodiment of the application are that:
according to the auxiliary focusing method, the auxiliary focusing device, the electronic equipment and the storage medium, as each image frame is provided with the corresponding additional data row, after the moving image format descriptor value of the target image frame is determined, the moving image format descriptor value is directly filled into the additional data row of the target image frame, after the data of the target image frame are acquired, the additional data row of the target image frame can be analyzed to obtain the definition value of the target image frame, the definition value of the target image frame is displayed while the target image frame is displayed, and the user focuses on the basis of the definition value of the target image frame. Therefore, the synchronization of the AFD value and the image data of each frame can be ensured, the completion of the AFD calculation and the display in the same frame can be ensured, and the focusing efficiency is further improved.
Of course, not all of the above-described advantages need be achieved simultaneously in practicing any one of the products or methods of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other embodiments may also be obtained according to these drawings to those skilled in the art.
Fig. 1a is a schematic flow chart of a first embodiment of an auxiliary focusing method according to the present disclosure;
FIG. 1b is a schematic diagram of an additional data line according to an embodiment of the present application;
fig. 1c is a schematic flow chart of a second auxiliary focusing method according to an embodiment of the present application;
fig. 1d is a third flowchart of an auxiliary focusing method according to an embodiment of the present application;
FIG. 2a is a schematic diagram of a user-selected focus area according to an embodiment of the present application;
FIG. 2b is a schematic diagram of 16 frame partitions according to an embodiment of the present disclosure;
FIG. 2c is a schematic diagram of a user-selected rectangular drawing area according to an embodiment of the present application;
FIG. 2d is a schematic diagram illustrating coordinate information transfer according to an embodiment of the present application;
fig. 2e is a fourth flowchart of an auxiliary focusing method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an auxiliary focusing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. Based on the embodiments herein, a person of ordinary skill in the art would be able to obtain all other embodiments based on the disclosure herein, which are within the scope of the disclosure herein.
In order to improve focusing efficiency, embodiments of the present application provide an auxiliary focusing method, an apparatus, an electronic device, a computer readable storage medium, and a computer program product containing instructions.
Next, an auxiliary focusing method provided in the embodiment of the present application will be described first. The method is applied to any electronic equipment which can provide auxiliary focusing service, such as a video camera, a mobile phone, a personal computer, a server and the like. The auxiliary focusing method provided by the embodiment of the application can be implemented by at least one of software, a hardware circuit and a logic circuit arranged in the electronic equipment.
As shown in fig. 1a, fig. 1a is a first flowchart of an auxiliary focusing method according to an embodiment of the present application, where the method includes:
s110, determining a moving image format descriptor value of a target image frame aiming at the currently acquired target image frame;
s120, filling the moving image format descriptor value into an additional data row of the target image frame;
s130, analyzing the additional data row of the target image frame to obtain a definition value of the target image frame;
and S140, displaying the target image frame, and simultaneously displaying the definition value of the target image frame in a superimposed mode on the target image frame so that a user can focus based on the definition value of the target image frame.
For a currently acquired target image frame, determining a moving image format descriptor value of the target image frame, i.e. determining an AFD (Active Format Description, moving image format descriptor) value of the target image frame; the AFD value is used as a quantitative evaluation value for characterizing the sharpness of a picture, the greater the AFD value the sharper the picture and the smaller the AFD value the more blurred the picture. After the currently acquired target image frame is acquired, the AFD value may be calculated based on a focus evaluation algorithm, where the focus evaluation algorithm may be a gradient edge-based evaluation algorithm, a frequency domain evaluation algorithm, an information entropy-based evaluation algorithm, and an image statistics-based evaluation algorithm, which may be specifically set based on actual conditions, and is not limited herein.
The target image frames have additional data lines, and the additional data lines refer to additional information that a preset number of lines of data are added at preset positions of the bare data of each target image frame for filling the electronic device, wherein the additional information of the electronic device can include a state of the electronic device, and the state of the electronic device can be an AFD value of the target image frame. The preset number of rows may be 2 rows, 4 rows, and 6 rows, and may be specifically set according to actual situations, which is not limited herein. For example, the additional data line may be newly added by a preset number of lines at the rearmost of the bare data of each target image frame, for example, 4 lines at the rearmost of the bare data of each target image frame, for filling additional information of the electronic device. The additional data lines may be added with a preset number of lines at the forefront of the bare data of each target image frame, or may be added with a preset number of lines at the middle of the bare data of each target image frame, and the positions of the additional data lines may be set according to actual situations, which is not limited herein.
If the resolution of the electronic device is 384×288, that is, the resolution of the bare data of the Image frame collected by the electronic device is 384×288, the Image frame has additional data lines, as shown in fig. 1b, the bare data of the Image frame collected by the electronic device is 14bit bare data, that is, the resolution of RAW (RAW Image Format) data is 384×288, and the additional data lines have 4 lines, that is, RAW additional line 1, RAW additional line 2, RAW additional line 3, and RAW additional line 4, each line of additional line includes 384 pixels, each pixel corresponds to a preset byte, for example, each pixel corresponds to 2 bytes, each pixel corresponds to a preset byte related to the electronic device, which may be specifically set based on the electronic device. After determining the AFD value of the target data frame, the AFD value may be filled into the additional data line, and then the resolution of the output bare data image format becomes 384×292, where the 289-292 rows correspond to the additional data line.
In addition, the position filled with the AFD information may be a designated position of the additional data line, and the designated position may be set based on practical situations, for example, the position filled with the AFD information is the 81 st and 82 nd pixel positions of the 1 st additional line, and occupies two pixels.
And then analyzing the additional data row of the target image frame to obtain a definition value of the target image frame, displaying the target image frame, and simultaneously, superposing and displaying the definition value of the target image frame on the target image frame so as to enable a user to focus based on the definition value of the target image frame.
Because each image frame has a corresponding additional data line, after the moving image format descriptor value of the target image frame is determined, the moving image format descriptor value is directly filled into the additional data line of the target image frame, so that after the data of the target image frame is acquired, the additional data line of the target image frame can be analyzed to obtain the definition value of the target image frame, the definition value of the target image frame is displayed while the target image frame is superimposed on the target image frame, and the user can focus based on the definition value of the target image frame. Therefore, the synchronization of the AFD value and the image data of each frame can be ensured, the completion of the AFD calculation and the display in the same frame can be ensured, and the focusing efficiency is further improved.
The electronic device includes a thermal imaging core, an FPGA (Field-Programmable Gate Array, field programmable gate array) and a DSP (Digital Signal Processing ), the thermal imaging core outputs the bare data of each image frame, the FPGA calculates the AFD value of each image frame through an integrated internal focus evaluation algorithm after receiving the bare data of each image frame, meanwhile, 4 rows of additional data rows are added at the rearmost of the bare data of each image frame, the AFD value is superimposed on the designated position of the additional data rows, the superimposed bare data is transferred to a master control platform in a parallel port manner, the master control platform may be a master control chip, the DSP and APP (Application program) are running in the master control chip, the APP is used for executing operations such as coordinate analysis and coordinate mapping, in addition, BSP (Board Support Package, board-level support packet) is stored in a storage medium of the master control platform for constructing an embedded operation system, and after receiving the bare data, the additional row of the bare data is analyzed by the DSP at the designated position, and then superimposed on an OSD frame in a manner.
As shown in fig. 1c, fig. 1c is a schematic diagram of a second flow chart of the auxiliary focusing method provided in the embodiment of the present application, where the thermal imaging core outputs the bare data of each image frame to the FPGA in the form of FPC parallel signals, and after the FPGA receives the bare data, the FPGA performs AFD value calculation on the bare data to obtain the AFD value of each frame. The FPGA is used for superposing the calculated AFD value in a designated position of an additional data row of the bare data, outputting the bare data added with additional row information, and transmitting the bare data to a DSP of a main control platform in a parallel port mode, wherein the parallel port can comprise 16 wires, two synchronous signal wires are added, and 18 wires are added; the synchronization signal lines are VD (Vertical Drive, signal for synchronizing the field rate of the industrial camera via an external source) and HD (Horizontal Drive, signal for synchronizing the line scan rate of the industrial camera via an external source), that is, frame synchronization signal and line synchronization signal, respectively. When data is transmitted through the parallel port, each frame and each row of data are synchronized by means of VD signals and HD signals, one clock is transmitted after the signals are synchronized, the DSP can count the number of received lines after receiving the data, and each frame of data is received in the mode. After receiving each frame of data, the DSP analyzes the corresponding AFD value from the corresponding additional line position, and superimposes the analyzed AFD value into a picture in an OSD (on-screen display) mode so as to enable a user to focus based on the definition value of the target image frame.
And the FPGA can ensure that the AFD value is synchronous with each frame of image data by the mode of transmitting the AFD value through the additional line of the bare data, and can finish data transmission to the DSP in one frame, thereby ensuring that the AFD calculation and display can be finished in the same frame.
As shown in fig. 1d, fig. 1d is a schematic flow chart of a third method for auxiliary focusing according to an embodiment of the present application, where the method includes:
after receiving the bare data, the FPGA performs preprocessing on the bare data to obtain preprocessed bare data, wherein the preprocessing mode comprises any one of the following modes: nonlinear correction, dead spot removal, pot cover removal and vertical line removal;
the FPGA performs AFD value calculation on the bare data, and the method comprises the following steps:
and the FPGA calculates the AFD value of the preprocessed bare data.
The method comprises the steps of carrying out nonlinear correction, dead point removal, pot cover removal and vertical line removal on bare data to obtain preprocessed bare data, then carrying out AFD value calculation on the preprocessed bare data based on a focusing evaluation method to obtain an AFD value, so that the calculated AFD value is more accurate, and after the FPGA receives the bare data and carries out preprocessing on the bare data, the AFD value calculation is directly carried out in the FPGA, so that the FPGA has high main frequency and high processing speed, and the AFD value can be ensured to be processed in one frame.
In a possible embodiment, the determining, for the currently acquired target image frame, a moving image format descriptor value of the target image frame includes:
acquiring a predetermined focusing area for a currently acquired target image frame;
and calculating a moving image format descriptor value of a focusing area of the target image frame to obtain the moving image format descriptor value of the target image frame.
For the currently acquired target image frame, the focusing area may be a full-screen area or a partial area of the target image frame, and the focusing area may be predetermined, which is described in detail below in connection with another embodiment for the sake of clarity of solution and clarity of layout.
After the predetermined focal region is acquired, AFD values of the focal region of the target image frame may be calculated to obtain a moving image format descriptor value of the target image frame.
The AFD value reflecting the definition of the target image frame is calculated based on the focusing area, so that the focusing can be performed on the focusing area, and the problem that the full-screen evaluation value cannot effectively reflect the foreground or the background definition when the foreground or the background phenomenon exists in the picture is solved.
In a possible embodiment, the electronic device is operated in an auxiliary focus mode, in which the focus area is a full-screen area, and in a non-auxiliary focus mode, in which the focus area is selected based on a user operation.
By setting the auxiliary focusing mode, the focusing area selection can be supported, so that focusing can be performed on the heavy spot area.
In a possible embodiment, the method further includes:
acquiring a rectangular drawing area drawn by a user in a preview image picture of a shooting scene;
the focus area is determined based on the rectangular drawing area.
The user can draw a rectangular drawing area in a preview image picture of the photographed scene and then determine a focus area based on the rectangular drawing area. The focusing area is determined based on the rectangular drawing area drawn by the user in the preview image picture of the shot scene, so that the problem that when a plurality of objects exist in the picture, the AFD value is not the AFD value corresponding to the focusing target wanted by the user is effectively solved, and the phenomenon that when the foreground and the background phenomena exist in the picture, the full-screen evaluation value cannot effectively reflect the foreground or the background definition is solved.
The preview image picture of the shooting scene is shown in a web page, wherein the web page includes an auxiliary focusing button, and the button is used for starting an AFD value auxiliary focusing function, for example, in the case of a non-auxiliary focusing mode, when a user clicks the auxiliary focusing button, the AFD value auxiliary focusing function is started, after the auxiliary focusing function is started, the user can draw a rectangular drawing area on the preview image picture, as shown in fig. 2a, specifically, in the preview window, the user can draw the rectangular drawing area on the preview image picture through a mouse, specifically, when the user draws the preview image picture through the mouse, coordinate information of a clicking position of the mouse of the user can be obtained, in addition, the auxiliary focusing button is used for inputting the coordinate information of the rectangular drawing area at a preset interface, specifically, the auxiliary focusing function can be set according to practical situations, and the setting is not limited herein.
After the coordinate information is obtained, the coordinate information can be transmitted to a main control platform, the main control platform analyzes the coordinate information and then communicates and transmits the coordinate information to the FPGA through a UART (Universal Asynchronous Receiver/Transmitter, universal asynchronous receiver Transmitter), and the FPGA can reconfigure the coordinate information to an internal focusing evaluation operator to realize the AFD value calculation of a focusing area.
In a possible embodiment, after the coordinate information of the rectangular drawing area is acquired, a corresponding rectangular frame is drawn in the preview image frame of the photographed scene based on the above coordinate information and remains in the frame at all times.
The coordinate information can be transmitted to the DSP in the main control platform, and the DSP draws a corresponding rectangular frame in the picture according to the coordinate information, so that a user can judge whether the current focusing area is an area of interest of the user or not through the rectangular frame, manual focusing of the user is facilitated, and manual focusing accuracy is improved.
In a possible embodiment, in the case of the auxiliary focus mode, if the user turns off the auxiliary focus mode, the rectangular box is canceled from being displayed.
And drawing a corresponding rectangular frame in the picture according to the coordinate information, and reserving the rectangular frame under the condition of an auxiliary focusing mode, so that a user can judge whether the current focusing area is an area of interest per se through the rectangular frame, thereby facilitating manual focusing of the user and improving manual focusing accuracy.
In a possible embodiment, for the currently acquired target image frame, in the case of the auxiliary focusing mode, if the user does not draw a rectangular drawing area in the preview image frame of the shooting scene within a preset time period, the full-screen area of the target image frame is taken as the focusing area.
If the electronic device is in the auxiliary focusing mode and the user does not draw a rectangular drawing area in a preview image picture of the shooting scene within a preset time period, the full-screen area of the target image frame is used as the focusing area, so that the situation that the user forgets to close the auxiliary focusing mode is prevented, or the current image frame does not need manual auxiliary focusing by the user, and therefore focusing efficiency is improved.
In a possible embodiment, for the currently acquired target image frame, in the case of the auxiliary focusing mode, if the user does not draw the rectangular drawing area in the preview image frame of the shooting scene within the preset time period, a reminding message for reminding the user to draw the rectangular drawing area is generated.
If the user does not draw the rectangular drawing area in the preview image picture of the shooting scene within the preset time period, generating a reminding message for reminding the user of drawing the rectangular drawing area so as to remind the user of drawing the rectangular drawing area in the preview image picture of the shooting scene, and improving focusing efficiency.
In a possible embodiment, the determining the focusing area based on the rectangular drawing area includes:
acquiring each window area of a preview image picture of the shooting scene, wherein the preview image picture is divided into a plurality of window areas;
and determining each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, wherein each target window area forms the focusing area.
The preview image screen can be divided into a plurality of window areas, as shown in fig. 2b, and divided into 16 portlets based on a window vertical start position, a window horizontal width, and a window vertical height, and illustratively, the numbers of the respective portlets are represented by numerical references, as numbered 0-15 in fig. 2 b. After a rectangular drawing area drawn by a user in a preview image picture of a shooting scene is obtained, the corresponding small window is extracted to form a rectangular area according to which small window the rectangular drawing area covers, so that a focusing area is obtained.
In a possible embodiment, for each window area, the manner of determining whether the rectangular drawing area covers the window area is as follows:
Calculating the area of the overlapping area of the rectangular drawing area and the window area to obtain a first area;
calculating the ratio of the first area to the area of the window area;
and when the ratio is larger than a preset ratio, determining the window area covered by the rectangular drawing area.
The preset ratio may be set according to the actual situation, for example, if the preset ratio is 0, and if the ratio is greater than 0, that is, if there is an overlapping area between the rectangular drawing area and the window area, the window area covered by the rectangular drawing area is determined.
As shown in fig. 2c, the window 5, the window 6, the window 9 and the window 10 are covered by the user selected area (the rectangular drawing area drawn by the user in the preview image picture of the photographed scene), and the window 5, the window 6, the window 9 and the window 10 form a focusing area.
Based on the above embodiments, the present application provides a schematic diagram of coordinate information transfer, as shown in fig. 2 d:
the user can draw a rectangular drawing area in a preview image picture of a shooting scene displayed by a WEB control of a PC (Personal Computer ) so as to select an area of interest of the user, then the PC end transmits coordinate information of the rectangular drawing area to a main control platform through a network port, an APP of the main control platform analyzes the coordinate information of the rectangular drawing area, two paths of transmission modes are distinguished after the APP is analyzed, and the coordinate information is respectively transmitted to a DSP and an FPGA:
When the coordinate information is transmitted to the DSP, the APP of the main control platform analyzes the coordinate information of the rectangular drawing area drawn by the user and then directly transmits the coordinate information to the DSP, and the DSP directly draws a corresponding rectangular frame after receiving the coordinate information.
When the coordinate information is transmitted to the FPGA, after the coordinate information of the rectangular drawing area drawn by the user is analyzed by the APP of the main control platform, the coordinate information is mapped to the corresponding 16 small areas, and then the mapped coordinates of the selected areas are transmitted to the FPGA in a serial port communication mode.
In one possible embodiment, the displaying the target image frame and simultaneously displaying the sharpness value of the target image frame superimposed on the target image frame includes:
acquiring a definition value of a last displayed screen menu type adjustment mode character to obtain a first definition value;
generating a screen menu type adjustment mode character of the definition value of the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value; displaying the target image frame, and simultaneously, superposing and displaying screen menu type adjustment mode characters of the target image frame on the target image frame;
the method further comprises the following steps: and displaying the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is not larger than a preset threshold value, and simultaneously displaying the last displayed on-screen menu type adjustment mode character on the target image frame in a superimposed mode.
After the additional data line of the target image frame is analyzed to obtain the definition value of the target image frame, in order to ensure that the AFD value displayed once per frame can be updated in real time, the AFD value is required to be received once per frame, then the definition value of the last displayed screen menu type adjustment mode character is acquired to obtain a first definition value, the screen menu type adjustment mode character of the definition value of the target image frame is generated under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value, the target image frame is displayed, and meanwhile, the screen menu type adjustment mode character of the target image frame is displayed in a superposition mode on the target image frame. For example, it is determined whether the difference between the first sharpness value and the sharpness value of the target image frame is greater than 5%, if so, the OSD display is updated, and if not greater than the preset threshold, the target image frame is displayed while the last displayed on-screen menu type adjustment mode character is superimposed on the target image frame.
Therefore, the AFD evaluation value calculation and display can be completed in the same frame, and the AFD value and the image data of each frame are synchronous, so that the real-time updating of the evaluation value in the manual focusing process is ensured to be higher.
As shown in fig. 2e, fig. 2e is a fourth flow chart of the auxiliary focusing method provided in the embodiment of the present application, where the thermal imaging core outputs the bare data of each image frame to the FPGA in the form of FPC parallel signals, and after the FPGA receives the bare data, the FPGA performs AFD value calculation on the bare data to obtain the AFD value of each frame. The FPGA is used for superposing the calculated AFD value in a designated position of an additional data row of the bare data, outputting the bare data added with additional row information, and transmitting the bare data to a DSP of a main control platform in a parallel port mode, wherein the parallel port can comprise 16 wires, two synchronous signal wires are added, and 18 wires are added; the synchronous signal line is VD and HD synchronous signals, each frame and each row of data are synchronous by means of VD signals and HD signals, one clock transmits one pixel data after the signals are synchronous, and the DSP can count the number of received lines after receiving the signals and receive each frame of data in the mode. After receiving each frame of data, the DSP analyzes the corresponding AFD value from the corresponding additional line position, and superimposes the analyzed AFD value into a picture in an OSD (on-screen display) mode so as to enable a user to focus based on the definition value of the target image frame.
In addition, a user can draw a rectangular drawing area in a preview image picture of a shooting scene displayed by a WEB control of a PC (Personal Computer ) so as to select an area of interest to the user, then the PC end can transmit coordinate information of the rectangular drawing area to a main control platform based on a network protocol, after the APP of the main control platform is analyzed, two paths of transmission modes can be distinguished, and the coordinate information is respectively transmitted to a DSP and an FPGA through UART communication:
when the coordinate information is transmitted to the DSP, the APP of the main control platform analyzes the coordinate information of the rectangular drawing area drawn by the user and then directly transmits the coordinate information to the DSP, and the DSP directly draws a corresponding rectangular frame after receiving the coordinate information.
When the coordinate information is transmitted to the FPGA, after the coordinate information of the rectangular drawing area drawn by the user is analyzed by the APP of the main control platform, the coordinate information is mapped to the corresponding 16 small areas, and then the mapped coordinates of the selected areas are transmitted to the FPGA in a serial port communication mode.
The FPGA can ensure that the AFD value is synchronous with each frame of image data by the mode of transmitting the AFD value through the additional line of the bare data, and can finish data transmission to the DSP in one frame, thereby ensuring that the AFD calculation and display can be finished in the same frame. And the focusing area selection can be supported, so that the AFD value reflecting the definition of the target image frame is calculated based on the focusing area, thereby focusing the focusing area, and solving the problem that the full-screen evaluation value can not effectively reflect the foreground or background definition when the foreground or background phenomenon exists in the picture.
As shown in fig. 3, fig. 3 is a schematic structural diagram of an auxiliary focusing apparatus according to an embodiment of the present application, where the apparatus includes:
a determining module 310, configured to determine, for a currently acquired target image frame, a moving image format descriptor value of the target image frame;
a filling module 320, configured to fill the moving image format descriptor value into an additional data line of the target image frame;
the parsing module 330 is configured to parse the additional data line of the target image frame to obtain a sharpness value of the target image frame;
and the processing module 340 is configured to display the target image frame and simultaneously superimpose and display a sharpness value of the target image frame on the target image frame, so that a user focuses on the basis of the sharpness value of the target image frame.
In a possible embodiment, the determining module 310 is specifically configured to:
acquiring a predetermined focusing area for a currently acquired target image frame;
and calculating a moving image format descriptor value of a focusing area of the target image frame to obtain the moving image format descriptor value of the target image frame.
In a possible embodiment, the apparatus further comprises:
The acquisition module is used for acquiring a rectangular drawing area drawn by a user in a preview image picture of a shooting scene;
and the focusing area determining module is used for determining the focusing area based on the rectangular drawing area.
In a possible embodiment, the focal region determining module is specifically configured to:
acquiring each window area of a preview image picture of the shooting scene, wherein the preview image picture is divided into a plurality of window areas;
and determining each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, wherein each target window area forms the focusing area.
In one possible embodiment, the processing module 340 is specifically configured to:
acquiring a definition value of a last displayed screen menu type adjustment mode character to obtain a first definition value;
generating a screen menu type adjustment mode character of the definition value of the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value; displaying the target image frame, and simultaneously, superposing and displaying screen menu type adjustment mode characters of the target image frame on the target image frame;
The device further comprises: and displaying the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is not larger than a preset threshold value, and simultaneously displaying the last displayed on-screen menu type adjustment mode character on the target image frame in a superimposed mode.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The embodiment of the application also provides a device, as shown in fig. 4, including:
the main control chip is FPGA;
the FPGA is used for determining a moving image format descriptor value of the target image frame aiming at the currently acquired target image frame, and filling the moving image format descriptor value into an additional data row of the target image frame; and transmitting the additional data line of the target image frame to the main control chip;
the main control chip analyzes the additional data row of the target image frame to obtain the definition value of the target image frame, displays the target image frame, and simultaneously superimposes and displays the definition value of the target image frame on the target image frame so as to enable a user to focus based on the definition value of the target image frame.
In a possible embodiment, the FPGA is specifically configured to:
acquiring a predetermined focusing area for a currently acquired target image frame;
and calculating a moving image format descriptor value of a focusing area of the target image frame to obtain the moving image format descriptor value of the target image frame.
In a possible embodiment, the main control chip is configured to obtain coordinate information of a rectangular drawing area drawn by a user in a preview image frame of a shooting scene, and send the coordinate information to the FPGA;
the FPGA is configured to determine the focal region based on the coordinate information.
In a possible embodiment, the FPGA is specifically configured to:
acquiring each window area of a preview image picture of the shooting scene, wherein the preview image picture is divided into a plurality of window areas;
and determining each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, wherein each target window area forms the focusing area.
In a possible embodiment, the main control chip is specifically configured to:
acquiring a definition value of a last displayed screen menu type adjustment mode character to obtain a first definition value;
Generating a screen menu type adjustment mode character of the definition value of the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value; displaying the target image frame, and simultaneously, superposing and displaying screen menu type adjustment mode characters of the target image frame on the target image frame;
the apparatus further comprises: and displaying the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is not larger than a preset threshold value, and simultaneously displaying the last displayed on-screen menu type adjustment mode character on the target image frame in a superimposed mode.
The communication bus mentioned by the above devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
In yet another embodiment provided herein, a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the steps of any of the above-described auxiliary focusing methods.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the auxiliary focusing methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, electronic devices, computer readable storage media and computer program product embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant points are found in the partial description of method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (12)

1. An auxiliary focusing method, the method comprising:
determining a moving image format descriptor value of a currently acquired target image frame for the target image frame;
filling the moving image format descriptor value into an additional data line of the target image frame;
analyzing the additional data row of the target image frame to obtain a definition value of the target image frame;
and displaying the target image frame, and simultaneously displaying the definition value of the target image frame in a superimposed mode on the target image frame so that a user focuses on the basis of the definition value of the target image frame.
2. The method of claim 1, wherein the determining the moving image format descriptor value of the target image frame for the currently acquired target image frame comprises:
acquiring a predetermined focusing area for a currently acquired target image frame;
And calculating a moving image format descriptor value of a focusing area of the target image frame to obtain the moving image format descriptor value of the target image frame.
3. The method according to claim 2, wherein the method further comprises:
acquiring a rectangular drawing area drawn by a user in a preview image picture of a shooting scene;
the focus area is determined based on the rectangular drawing area.
4. The method of claim 3, wherein the determining the focal region based on the rectangular rendering region comprises:
acquiring each window area of a preview image picture of the shooting scene, wherein the preview image picture is divided into a plurality of window areas;
and determining each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, wherein each target window area forms the focusing area.
5. The method of claim 1, wherein the displaying the target image frame while superimposing a sharpness value of the target image frame on the target image frame comprises:
acquiring a definition value of a last displayed screen menu type adjustment mode character to obtain a first definition value;
Generating a screen menu adjusting mode character of the definition value of the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value; displaying the target image frame, and simultaneously superposing and displaying screen menu type adjustment mode characters of the target image frame on the target image frame;
the method further comprises the steps of: and displaying the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is not larger than a preset threshold value, and simultaneously displaying the last displayed on-screen menu type adjustment mode character on the target image frame in a superimposed mode.
6. An auxiliary focusing apparatus, the apparatus comprising:
a determining module, configured to determine, for a currently acquired target image frame, a moving image format descriptor value of the target image frame;
a padding module for padding the moving image format descriptor value into an additional data line of the target image frame;
the analysis module is used for analyzing the additional data row of the target image frame to obtain a definition value of the target image frame;
And the processing module is used for displaying the target image frame and simultaneously displaying the definition value of the target image frame in a superimposed manner on the target image frame so as to enable a user to focus based on the definition value of the target image frame.
7. An apparatus, the apparatus comprising:
the main control chip is FPGA;
the FPGA is used for determining a moving image format descriptor value of a target image frame aiming at the currently acquired target image frame, and filling the moving image format descriptor value into an additional data row of the target image frame; and transmitting the additional data line of the target image frame to the main control chip;
and the main control chip analyzes the additional data row of the target image frame to obtain a definition value of the target image frame, displays the target image frame, and simultaneously superimposes and displays the definition value of the target image frame on the target image frame so as to enable a user to focus based on the definition value of the target image frame.
8. The device according to claim 7, wherein the FPGA is specifically configured to:
acquiring a predetermined focusing area for a currently acquired target image frame;
And calculating a moving image format descriptor value of a focusing area of the target image frame to obtain the moving image format descriptor value of the target image frame.
9. The apparatus according to claim 8, wherein:
the main control chip is used for acquiring coordinate information of a rectangular drawing area drawn by a user in a preview image picture of a shooting scene and sending the coordinate information to the FPGA;
the FPGA is configured to determine the focal region based on the coordinate information.
10. The device according to claim 9, wherein the FPGA is specifically configured to:
acquiring each window area of a preview image picture of the shooting scene, wherein the preview image picture is divided into a plurality of window areas;
and determining each window area covered by the rectangular drawing area according to the position of the rectangular drawing area to obtain each target window area, wherein each target window area forms the focusing area.
11. The apparatus of claim 7, wherein the master control chip is specifically configured to:
acquiring a definition value of a last displayed screen menu type adjustment mode character to obtain a first definition value;
Generating a screen menu adjusting mode character of the definition value of the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is larger than a preset threshold value; displaying the target image frame, and simultaneously superposing and displaying screen menu type adjustment mode characters of the target image frame on the target image frame;
the apparatus further comprises: and displaying the target image frame under the condition that the difference between the first definition value and the definition value of the target image frame is not larger than a preset threshold value, and simultaneously displaying the last displayed on-screen menu type adjustment mode character on the target image frame in a superimposed mode.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-5.
CN202310063544.1A 2023-01-13 2023-01-13 Auxiliary focusing method and device, electronic equipment and storage medium Pending CN116095481A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310063544.1A CN116095481A (en) 2023-01-13 2023-01-13 Auxiliary focusing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310063544.1A CN116095481A (en) 2023-01-13 2023-01-13 Auxiliary focusing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116095481A true CN116095481A (en) 2023-05-09

Family

ID=86209940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310063544.1A Pending CN116095481A (en) 2023-01-13 2023-01-13 Auxiliary focusing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116095481A (en)

Similar Documents

Publication Publication Date Title
KR101813196B1 (en) Method, device, program, and recording medium for video communication
CN108833785B (en) Fusion method and device of multi-view images, computer equipment and storage medium
CN107621932B (en) Local amplification method and device for display image
JP5532026B2 (en) Display device, display method, and program
US20180025470A1 (en) System and apparatus for editing preview images
CN102461162A (en) Drawn image sharing apparatus
JP2013031154A (en) Image processing device, image processing method, image capturing device, and program
WO2014030405A1 (en) Display device, display method, television receiver, and display control device
CN113989173A (en) Video fusion method and device, electronic equipment and storage medium
CN110928509B (en) Display control method, display control device, storage medium, and communication terminal
CN202444580U (en) System, terminal and server capable of acquiring television program screenshot
KR20120054746A (en) Method and apparatus for generating three dimensional image in portable communication system
CN110248147A (en) A kind of image display method and apparatus
CN116095481A (en) Auxiliary focusing method and device, electronic equipment and storage medium
CN110865911B (en) Image testing method, device, storage medium, image acquisition card and upper computer
CN111064864A (en) Method and device for setting distortion correction parameters and endoscope system
CN113284199A (en) Image gray area determination method, electronic device and server
CN113840080A (en) Image capturing apparatus, control method of image capturing apparatus, and computer readable medium
CN103674269A (en) Thermal image measuring device and thermal image measuring method
CN113055749A (en) Resolution automatic switching system based on 5G transmission video
CN112738399A (en) Image processing method and device and electronic equipment
US20050138561A1 (en) Information display apparatus and information display method
CN112446848A (en) Image processing method and device and electronic equipment
CN114466145B (en) Video processing method, device, equipment and storage medium
CN113395434A (en) Preview image blurring method, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination