CN112911128A - Focus control method, system, device and equipment, and storage medium - Google Patents

Focus control method, system, device and equipment, and storage medium Download PDF

Info

Publication number
CN112911128A
CN112911128A CN201911133770.2A CN201911133770A CN112911128A CN 112911128 A CN112911128 A CN 112911128A CN 201911133770 A CN201911133770 A CN 201911133770A CN 112911128 A CN112911128 A CN 112911128A
Authority
CN
China
Prior art keywords
focusing parameter
electronic device
focusing
parameter
preset point
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
CN201911133770.2A
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 Hikmicro Sensing Technology Co Ltd
Original Assignee
Hangzhou Hikmicro Sensing Technology 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 Hikmicro Sensing Technology Co Ltd filed Critical Hangzhou Hikmicro Sensing Technology Co Ltd
Priority to CN201911133770.2A priority Critical patent/CN112911128A/en
Publication of CN112911128A publication Critical patent/CN112911128A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Lens Barrels (AREA)

Abstract

The invention provides a focusing control method, a system, a device, equipment and a storage medium, which can realize the quick focusing of second electronic equipment. A focus control method is applied to an electronic system, which comprises the following steps: a first electronic device and a second electronic device, the method comprising: when the first electronic equipment patrols and examines a target preset point, acquiring target preset point information corresponding to the target preset point; the target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to the second electronic equipment; and the first electronic equipment sends the first focusing parameter to the second electronic equipment, so that the second electronic equipment adjusts the current focusing parameter to be matched with the first focusing parameter.

Description

Focus control method, system, device and equipment, and storage medium
Technical Field
The present invention relates to the field of control technologies, and in particular, to a focus control method, system, device, and apparatus, and storage medium.
Background
In some scenarios, the device needs to focus on a plurality of objects distributed at different positions for further image acquisition, temperature measurement, and other processing. For example, in an application scene of a transformer substation, a robot needs to perform routing inspection in an inspection area according to an inspection path for multiple times, a plurality of preset points are set in the inspection area, when one preset point is reached during the routing inspection, temperature measurement equipment is controlled to perform focusing, and after the focusing is completed, a temperature measurement value of a target object at the preset point is obtained from a picture.
In a related focusing control mode, a climbing algorithm is generally adopted for focusing, that is, the device controls a motor in a lens to pull a focusing assembly back and forth, and in the process of pulling the motor back and forth, a definition evaluation function is used for calculating a picture definition evaluation value of the motor at each position, an optimal position corresponding to the maximum definition evaluation value is found out, and finally the motor is controlled to move to the optimal position to complete focusing. In this way, the device needs to control the motor to pull the focusing assembly back and forth during each focusing process to find the optimal focusing position, and the focusing time is too long.
Disclosure of Invention
In view of this, the present invention provides a method, a system, an apparatus, a device, and a storage medium for focus control, which can achieve fast focus of a second electronic device.
A first aspect of the present invention provides a focus control method applied to an electronic system including: a first electronic device and a second electronic device, the method comprising:
when the first electronic equipment patrols and examines a target preset point, acquiring target preset point information corresponding to the target preset point; the target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to the second electronic equipment;
and the first electronic equipment sends the first focusing parameter to the second electronic equipment, so that the second electronic equipment adjusts the current focusing parameter to be matched with the first focusing parameter.
In accordance with one embodiment of the present invention,
the first electronic equipment sets all the preset point information in the following mode:
and when the target object is inspected to each preset point needing to be set in the inspection area, acquiring a second focusing parameter of the second electronic equipment when the target object is focused, and acquiring preset point information corresponding to the preset point according to the second focusing parameter.
According to an embodiment of the present invention, the target preset point information further includes: a first temperature; the first temperature is a temperature at which the first focusing parameter is set;
the first electronic device sends the first focusing parameter to a second electronic device, and the method comprises the following steps:
the first electronic device sends the first focusing parameter and the first temperature to the second electronic device.
In accordance with one embodiment of the present invention,
the first electronic device and the second electronic device are respectively inspection equipment and temperature measuring equipment applied to a transformer substation scene.
A second aspect of the present invention provides a focus control method applied to an electronic system including: a first electronic device and a second electronic device, the method comprising:
the method comprises the steps that a second electronic device receives a first focusing parameter sent by a first electronic device, wherein when the first electronic device patrols and examines a target preset point, the first electronic device obtains target preset point information of the target preset point; the target preset point information at least comprises a first focusing parameter;
the second electronic device adjusts the current focusing parameters to match the first focusing parameters to focus on the target object.
In accordance with one embodiment of the present invention,
the first focusing parameter is a normalized focusing parameter;
the second electronic device adjusts the current focusing parameter to match the first focusing parameter, including:
inputting the first focusing parameter into a preset inverse normalization mapping formula to obtain a third focusing parameter having a mapping relation with the first focusing parameter;
and adjusting the current focusing parameters of the equipment according to the third focusing parameters.
According to an embodiment of the present invention, before the second electronic device receives the first focusing parameter transmitted from the first electronic device, the method further includes:
when the second electronic equipment determines that the equipment focuses on the target object, reading a fourth focusing parameter from the equipment;
the second electronic device inputs the fourth focusing parameter into a preset normalization mapping formula to obtain a second focusing parameter having a mapping relation with the fourth focusing parameter, wherein the second focusing parameter is a normalization focusing parameter;
sending the second focus parameter to the first electronic device.
According to an embodiment of the present invention, before the second electronic device adjusts the current focusing parameter of the present device according to the third focusing parameter, the method further includes:
the second electronic equipment receives a first temperature sent by the first electronic equipment, wherein the first temperature is the temperature when the first focusing parameter is set;
the second electronic device adjusts the current focusing parameters of the device according to the third focusing parameters, and the method comprises the following steps:
and acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the equipment to the fifth focusing parameter.
A third aspect of the invention provides an electronic system comprising a first electronic device and a second electronic device;
the first electronic device is to: when a target preset point is patrolled, acquiring target preset point information corresponding to the target preset point, wherein the target preset point information at least comprises a first focusing parameter, the first focusing parameter is applied to second electronic equipment, and the first focusing parameter is sent to the second electronic equipment;
the second electronic device is to: the method comprises the steps of receiving first focusing parameters sent by first electronic equipment, and adjusting current focusing parameters to be matched with the first focusing parameters so as to focus on a target object.
In accordance with one embodiment of the present invention,
the first focusing parameter is a normalized focusing parameter;
when the second electronic device adjusts the current focusing parameter to match the first focusing parameter, the second electronic device is specifically configured to:
inputting the first focusing parameter into a preset inverse normalization mapping formula to obtain a third focusing parameter having a mapping relation with the first focusing parameter;
and adjusting the current focusing parameters of the equipment according to the third focusing parameters.
According to an embodiment of the present invention, before the second electronic device adjusts the current focusing parameter of the device according to the third focusing parameter, the second electronic device is further configured to:
receiving a first temperature sent by first electronic equipment, wherein the first temperature is the temperature when the first focusing parameter is set;
adjusting the current focusing parameters of the device according to the third focusing parameters, including:
and acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the equipment to the fifth focusing parameter.
In accordance with one embodiment of the present invention,
the first electronic device is further configured to: when the target object is inspected to each preset point needing to be set in the inspection area, acquiring a second focusing parameter of the second electronic equipment when the second electronic equipment is focused on the target object, and acquiring preset point information corresponding to the preset point according to the second focusing parameter;
the second electronic device is further to: when the device is determined to be focused on the target object, reading a fourth focusing parameter from the device, inputting the fourth focusing parameter into a preset normalization mapping formula by the second electronic device, obtaining a second focusing parameter having a mapping relation with the fourth focusing parameter, wherein the second focusing parameter is a normalization focusing parameter, and sending the second focusing parameter to the first electronic device.
A fourth aspect of the present invention provides a focus control apparatus applied to an electronic system including: a first electronic device and a second electronic device, the apparatus comprising:
the target preset point information acquisition module is used for acquiring target preset point information corresponding to a target preset point when the first electronic equipment patrols the target preset point; the target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to the second electronic equipment;
and the first focusing parameter sending module is used for sending the first focusing parameter to the second electronic equipment by the first electronic equipment so as to adjust the current focusing parameter to be matched with the first focusing parameter by the second electronic equipment.
In accordance with one embodiment of the present invention,
the first electronic equipment sets all the preset point information through the following preset point information setting modules:
and the preset point information setting module is used for acquiring a second focusing parameter of the second electronic equipment when the second electronic equipment focuses on the target object when the second electronic equipment patrols and examines each preset point required to be set in the patrol and examine area, and acquiring the preset point information corresponding to the preset point according to the second focusing parameter.
According to an embodiment of the present invention, the target preset point information further includes: a first temperature; the first temperature is a temperature at which the first focusing parameter is set;
when the first focusing parameter sending module sends the first focusing parameter to the second electronic device, the first focusing parameter sending module is specifically configured to:
and sending the first focusing parameter and the first temperature to the second electronic device.
In accordance with one embodiment of the present invention,
the first electronic device and the second electronic device are respectively inspection equipment and temperature measuring equipment applied to a transformer substation scene.
A fifth aspect of the present invention provides a focus control apparatus applied to an electronic system including: a first electronic device and a second electronic device, the apparatus comprising:
the first focusing parameter receiving module is used for receiving a first focusing parameter sent by first electronic equipment by second electronic equipment, wherein when the first electronic equipment patrols and examines a target preset point, the first electronic equipment acquires target preset point information of the target preset point; the target preset point information at least comprises a first focusing parameter;
and the current focusing parameter adjusting module is used for adjusting the current focusing parameter to be matched with the first focusing parameter by the second electronic equipment so as to focus on the target object.
In accordance with one embodiment of the present invention,
the first focusing parameter is a normalized focusing parameter;
when the current focusing parameter adjusting module adjusts the current focusing parameter to match the first focusing parameter, the current focusing parameter adjusting module is specifically configured to:
inputting the first focusing parameter into a preset inverse normalization mapping formula to obtain a third focusing parameter having a mapping relation with the first focusing parameter;
and adjusting the current focusing parameters of the equipment according to the third focusing parameters.
According to an embodiment of the invention, the apparatus further comprises:
the fourth focusing parameter reading module is used for reading a fourth focusing parameter from the second electronic device when the second electronic device determines that the second electronic device focuses on the target object;
the normalization mapping module is used for the second electronic equipment to input the fourth focusing parameter into a preset normalization mapping formula to obtain a second focusing parameter which has a mapping relation with the fourth focusing parameter, wherein the second focusing parameter is a normalization focusing parameter;
and the second focusing parameter sending module is used for sending the second focusing parameter to the first electronic equipment by the second electronic equipment.
According to an embodiment of the present invention, before the current focusing parameter adjusting module adjusts the current focusing parameter of the present device according to the third focusing parameter, the current focusing parameter adjusting module is further configured to:
receiving a first temperature sent by first electronic equipment, wherein the first temperature is the temperature when the first focusing parameter is set;
the current focusing parameter adjusting module adjusts the current focusing parameter of the device according to the third focusing parameter, and is specifically configured to:
and acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the equipment to the fifth focusing parameter.
A sixth aspect of the present invention provides an electronic device, including a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the focus control method as described in the foregoing embodiments.
A seventh aspect of the present invention provides a machine-readable storage medium on which a program is stored, the program, when executed by a processor, implementing the focus control method as described in the foregoing embodiments.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the preset point information corresponding to each preset point can be preset, and when the first electronic device patrols and examines the target preset point, the target preset point information corresponding to the target preset point can be acquired, wherein the target preset point information comprises the first focusing parameter, the first focusing parameter is applied to the second electronic device, and the first focusing parameter is sent to the second electronic device, so that the second electronic device adjusts the current focusing parameter to be matched with the first focusing parameter, the motor in the lens on the second electronic device can be controlled to directly move to the target position when the lens focuses on the target object, the rapid focusing of the second electronic device is realized, the motor does not need to be controlled to pull the focusing assembly back and forth to find out the target position, and the focusing time is shortened. When using in the transformer substation scene, can shorten the time of patrolling and examining greatly, promote and patrol and examine efficiency.
Drawings
FIG. 1 is a flow chart illustrating a focus control method according to an embodiment of the present invention;
FIG. 2 is a block diagram of an electronic system according to an embodiment of the invention;
FIG. 3 is a block diagram of a focus control apparatus according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating a focus control method according to another embodiment of the present invention;
FIG. 5 is a block diagram showing a focus control apparatus according to another embodiment of the present invention;
fig. 6 is a block diagram of a first electronic device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one type of device from another. For example, a first device may also be referred to as a second device, and similarly, a second device may also be referred to as a first device, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make the description of the present invention clearer and more concise, some technical terms in the present invention are explained below:
soft core: or soft IP core, is a virtual component applied to a processor to implement the functions of the processor, such as an NIOS II soft core applied to an FPGA.
Focusing parameters: the motor is used for indicating the position of the motor in the lens, and the position of the motor refers to the position of a movable part on the motor relative to a non-movable part on the motor.
The focus control method according to the embodiment of the present invention will be described in more detail below, but should not be limited thereto.
The focus control method provided by the embodiment of the invention can be applied to any scene needing focus control, such as a transformer substation scene, the first electronic device is an inspection device applied to the transformer substation scene, such as an inspection robot, and the second electronic device is a temperature measuring device applied to the transformer substation scene. When the first electronic equipment patrols and examines each preset point needing to be set in the patrol area, the preset point information is sent to the second electronic equipment, so that the second electronic equipment can quickly focus according to the preset point information, and the second electronic equipment can focus on the target object. Furthermore, the second electronic device can perform infrared analysis on the picture focused on the target object to realize temperature measurement of the target object in the picture.
Of course, the application scenario of the focus control method according to the embodiment of the present invention is not limited thereto. For convenience of description, the following description is given by taking the application in a substation scene as an example, that is, the first electronic device is an inspection device applied in the substation scene, and the second electronic device is a temperature measurement device applied in the substation scene, but the description is not limited thereto.
A first aspect of an embodiment of the present invention provides a focus control method, which is applied to an electronic system, where the electronic system includes: a first electronic device and a second electronic device. Referring to fig. 1, in one embodiment, a focus control method includes the steps of:
s100: when the first electronic equipment patrols and examines a target preset point, acquiring target preset point information corresponding to the target preset point; the target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to the second electronic equipment;
s200: and the first electronic equipment sends the first focusing parameter to the second electronic equipment, so that the second electronic equipment adjusts the current focusing parameter to be matched with the first focusing parameter.
An execution subject of the focus control method of the first aspect of the embodiment of the present invention is the first electronic device. The second electronic device may be mounted on the first electronic device so as to be movable with the first electronic device. For example, the second electronic device may be assembled to the first electronic device through the cradle head, and the first electronic device may drive the cradle head to drive the second electronic device to rotate, so that the second electronic device may face the target direction. Of course, the second electronic device may be assembled to the first electronic device in other manners. The second electronic device and the first electronic device can be connected through a network interface to realize data communication.
First electronic equipment can be ground robot, or unmanned aerial vehicle etc. and first electronic equipment can take second electronic equipment to patrol and examine in patrolling and examining the region to investigate out the electrical equipment of temperature anomaly.
The second electronic device may be a thermal imager, and may include a thermal imaging lens, a thermal imaging engine, and the like. The thermal imaging engine may have an image sensor or the like that is sensitive to thermal infrared. The infrared light passes through the thermal imaging lens and is imaged on the image sensor, and an imaging picture can reflect the temperature field on the surface of the object.
Specifically, referring to fig. 2, the first electronic device 500 is connected to the second electronic device 400, preferably, through a communication interface such as UART (asynchronous receiver transmitter). Second electronic device 400 may include a thermal imager core 401 and a lens 402.
The lens may contain a motor 4021, a focusing assembly 4022, and the like, and the focusing assembly 4022 may include a lens, a potentiometer, and the like. The motor 4021 can drive the focusing assembly 4022 to realize focusing of the focusing assembly 4022, and meanwhile, the motor 4021 can drive the potentiometer, and the resistance value of the potentiometer can reflect the position of the motor.
Thermal imager core 401 may include processor 4011, motor driver chip 4012, and the like. The processor 4011 can acquire signals on the potentiometer in the focusing assembly 4022 through the voltage division circuit and the sampling circuit to obtain focusing parameters. The processor 4011 may further receive an instruction of the first electronic device 500, and when receiving a control instruction, may output a PWM signal to the motor driver chip 4012. The motor driver chip 4012 can drive the motor 4021 in the lens 402 to move under the driving of the PWM signal of the processor 4011. The processor 4011 in the thermal imaging engine core 401 may be an FPGA, and the FPGA may be an FPGA with an NIOS II soft core, which is not limited specifically.
Of course, the illustration in FIG. 2 is for example only and not intended to be limiting.
In the step S100, when a first electronic device patrols and examines a target preset point, acquiring target preset point information corresponding to the target preset point; the target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to the second electronic device.
The target preset point is any preset point needing to be set in the inspection area. The preset points can be set by manually picking points in the scene, and each preset point corresponds to one region position in the inspection region. In a substation inspection scene, a preset point can be set according to the position of a target object needing temperature measurement of a substation facility (including substation equipment, lines and the like); in other scenes, a preset point can be set for the position of the target object. The number of preset points in a scene is not limited, and may be, for example, 3, 20, 100, 3000 preset points.
After the preset point setting is completed, corresponding preset point information can be set in the first electronic device or other devices. The first electronic equipment can patrol and examine according to the route of patrolling and examining that predetermines, patrol and examine in proper order to each preset point that needs set up in patrolling and examining the region. Of course, the routing inspection path is not limited.
When the first electronic equipment patrols and examines the target preset point, the first electronic equipment can acquire target preset point information corresponding to the target preset point from the equipment or other equipment. The target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to the second electronic equipment, so that the focusing of the second electronic equipment can be realized. Of course, the target preset point information may also include other information, such as a preset point, a location of an area corresponding to the preset point, and the like, which is not limited in detail.
In step S200, the first electronic device sends the first focusing parameter to the second electronic device, so that the second electronic device adjusts the current focusing parameter to match the first focusing parameter.
The first electronic device may send the first focus parameters to the second electronic device through a network interface of the first electronic device with the second electronic device. The second electronic device receives the first focus parameter transmitted from the first electronic device. Of course, there may be other information sent with the first focusing parameter, such as the temperature when the target preset point information is set, and the details are not limited.
The first focusing parameter may be carried by the first electronic device in a control instruction to the second electronic device. When the second electronic device receives the control instruction, the first focusing parameter can be analyzed from the control instruction, and the current focusing parameter of the device is adjusted according to the first focusing parameter according to the instruction of the control instruction.
Since the first focus parameter is set when the preset point is set, it is a focus parameter of the second electronic device when focusing on the target object. The first focusing parameter can indicate a target position where the motor is located when the lens on the second electronic device focuses on the target object, and the second electronic device is controlled to focus according to the first focusing parameter, so that the motor in the lens on the second electronic device can be rapidly moved to the target position when the lens focuses on the target object, and rapid focusing is achieved.
For example, when a target preset point at which the first electronic device is currently located is set, and the second electronic device is focused on a certain target object, the second electronic device adjusts the current focusing parameter to match the first focusing parameter, so that the second electronic device can be quickly restored to a state of focusing on the target object.
How the second electronic device adjusts the current focusing parameter to match the first focusing parameter, for example, when the first focusing parameter is an unnormalized focusing parameter (a focusing parameter directly read from the second electronic device when a preset point is set), the second electronic device may adjust the current focusing parameter of the second electronic device to the first focusing parameter; or, when the first focusing parameter is a normalized focusing parameter (when a preset point is set, the focusing parameter after normalization processing of the focusing parameter read from the second electronic device), the second electronic device may perform inverse normalization processing on the first focusing parameter, and then adjust the current focusing parameter of the device to the focusing parameter after inverse normalization processing. The above-described modes are only examples and are not intended to be limiting.
In the embodiment of the invention, the preset point information corresponding to each preset point can be preset, and when the first electronic device patrols and examines the target preset point, the target preset point information corresponding to the target preset point can be acquired, wherein the target preset point information comprises the first focusing parameter, the first focusing parameter is applied to the second electronic device, and the first focusing parameter is sent to the second electronic device, so that the second electronic device adjusts the current focusing parameter to be matched with the first focusing parameter, the motor in the lens on the second electronic device can be controlled to directly move to the target position when the lens focuses on the target object, the rapid focusing of the second electronic device is realized, the motor does not need to be controlled to pull the focusing assembly back and forth to find out the target position, and the focusing time is shortened. When using in the transformer substation scene, can shorten the time of patrolling and examining greatly, promote and patrol and examine efficiency.
In addition, a foreground and background phenomenon exists in a common scene, the automatic focusing by adopting a climbing algorithm in a related focusing mode may focus on the foreground or the background, and if a target object is the foreground and actually focuses on the background, the foreground is blurred, and a focusing error occurs; in addition, in low temperature difference weather, the sharpness evaluation value cannot reflect the sharpness of the picture accurately, for example, the evaluation value of the cleanness of a blurred picture is the highest, which results in failure of focusing.
In the embodiment of the invention, the second electronic device can be directly adjusted to be in a state of focusing on the target object according to the first focusing parameter, so that the problems of wrong focusing on the target object due to the foreground and background phenomena and failure in focusing due to low-temperature difference weather are avoided.
In one embodiment, the above method flow can be executed by a focus control apparatus, as shown in fig. 3, the focus control apparatus 100 can include 2 modules: a target preset point information acquisition module 101 and a first focusing parameter sending module 102. The target preset point information obtaining module 101 is configured to perform the step S100, and the first focusing parameter sending module 102 is configured to perform the step S200.
In one embodiment, in step S100, the acquiring, by the first electronic device, target preset point information corresponding to the target preset point includes:
s101: searching preset point information containing a target preset point identifier in all the set preset point information;
s102: and determining the searched preset point information as the target preset point information.
The preset points or preset positions can play a role in connecting the positions of the plurality of areas in the routing inspection area with the operation condition of the first electronic equipment. For example, a command for setting a preset point is sent to the first electronic device for each area position in the inspection area, and the first electronic device can record the current state, such as the position, the posture, the state of the pan/tilt head, and the like, and associate the current state with the preset point identifier; the subsequent first electronic equipment can run to the memory state of the preset point at the fastest speed so as to quickly patrol to each region position.
The first electronic device is provided with preset point information corresponding to all preset points, wherein each preset point information comprises a corresponding preset point identifier, a focusing parameter and the like. Of course, the preset point information may also include state information of the first electronic device when the corresponding preset point is set, and the like.
The focus parameters in the preset point information are: and when the corresponding preset point is set, the focusing parameters of the lens on the second electronic equipment are focused on the target object. The second electronic device can quickly recover to the state when the corresponding preset point is set according to the focusing parameter in the preset point information, namely, the state of focusing on the target object.
The preset point identification may uniquely represent the corresponding preset point. When the first electronic equipment patrols and examines the target preset point, the target preset point identification can be determined, and the target preset point information can be searched according to the target preset point identification. Searching preset point information containing target preset point identification in all the set preset point information, and determining the searched preset point information as target preset point information. The focusing parameter in the target preset point information is the first focusing parameter.
In one embodiment, the first electronic device sets all the preset point information by:
and when the target object is inspected to each preset point needing to be set in the inspection area, acquiring a second focusing parameter of the second electronic equipment when the target object is focused, and acquiring preset point information corresponding to the preset point according to the second focusing parameter.
The first electronic equipment can set a plurality of preset points for the inspection area of the equipment, and the preset points correspond to different positions in the inspection area.
In the preset point setting process, when the first electronic device is located at each preset point to be set in the inspection area, under the condition that the second electronic device is determined to be focused on the target object, the second focusing parameter of the second electronic device can be obtained, and the preset point information corresponding to the preset point is obtained according to the obtained second focusing parameter.
The image definition of the second electronic device can be manually adjusted, or the image definition of the second electronic device can be automatically adjusted under the condition of good weather (non-low temperature difference weather such as non-rain and fog weather), so that the second electronic device can be ensured to focus on the target object.
When the target object is focused on the second electronic equipment, the definition of the target object in the picture imaged by the second electronic equipment reaches the preset definition. The preset point information when the first electronic equipment is at a certain preset point comprises a second focusing parameter when the second electronic equipment focuses on the target object; subsequently, when the first electronic device is at the preset point, the second electronic device can control the device to focus on the target object according to the second focusing parameter in the information of the preset point corresponding to the preset point.
When the preset point is set, the second electronic device can calculate the definition evaluation value of the picture according to a preset definition evaluation algorithm, and the FPGA soft core can determine whether the target object is focused according to the definition evaluation value so that the second electronic device can complete focusing.
The first electronic device may acquire the second focusing parameter from the second electronic device by an active acquisition mode: the method comprises the steps that a first electronic device actively sends a control instruction; and the second electronic equipment determines the second focusing parameter of the equipment after receiving the control instruction and sends the second focusing parameter to the second electronic equipment. Alternatively, the determined second focusing parameter may be actively uploaded to the first electronic device by the second electronic device. Or, the second electronic device may also prompt the second focusing parameter, and the second focusing parameter is manually set to the first electronic device, which is not limited in specific manner.
The second electronic device may determine the second focusing parameter in the following ways:
the first method is that the second electronic device reads focusing parameters from a lens of the device and directly determines the read focusing parameters as second focusing parameters;
and secondly, the second electronic device reads out the focusing parameters from the lens of the device and inputs the read focusing parameters into a preset normalization mapping formula to obtain second focusing parameters.
For the first mode, since the preset point information includes the directly read focusing parameter, in step S200, after the first electronic device sends the first focusing parameter to the second electronic device, the second electronic device may directly adjust the current focusing parameter of the lens on the device to the first focusing parameter.
For the second mode, since the preset point information includes the normalized focusing parameter, in step S200, after the first electronic device sends the first focusing parameter to the second electronic device, the second electronic device needs to perform inverse normalization on the first focusing parameter, that is, the first focusing parameter is input into a preset inverse normalization mapping formula, and the current focusing parameter of the lens on the device is adjusted to the focusing parameter after the inverse normalization.
In order to avoid resetting the preset point information in the first electronic device when the first electronic device is replaced with a second electronic device of a different type, the embodiment of the present invention preferably adopts a second manner, which is described below.
Second electronic device in addition to the components shown in fig. 2, the thermal imaging cartridge may also include components (not shown in the figure) such as a voltage divider circuit, an AD sampling chip, and the like. With reference to fig. 2, when the motor 4021 in the lens 402 moves, the slide plate of the potentiometer is driven to move to change the resistance value of the potentiometer (the difference in resistance value indicates the position of the motor is different), the resistance value is converted into a voltage signal through the voltage dividing circuit, and the AD sampling chip performs AD sampling on the voltage signal obtained by the voltage dividing circuit to obtain an AD value. The processor 4011 can obtain the AD value obtained by sampling from the AD sampling chip through the I2C interface, and the AD value is used as the focusing parameter read by the second electronic device from the lens of the device.
When a certain preset point is set, if the second electronic device finishes focusing, the motor is located at a certain position A1, the FPGA soft core can collect the focusing parameters from the AD sampling chip at the moment, and the motor can directly move to the position A when the motor is controlled to move according to the focusing parameters subsequently, so that focusing is finished quickly.
The preset normalization mapping formula and the preset inverse normalization mapping formula may be determined according to an actual adjustable focusing parameter range (determined by an actual movable stroke of the motor) of the lens on the second electronic device and a set normalization focusing parameter range.
The minimum actual focusing parameter and the maximum actual focusing parameter in the actual adjustable actual focusing parameter range of the lens on the second electronic device may be calibrated at the time of factory shipment. During calibration, the second electronic device records the actual focus parameters at the closest object distance (e.g., 2M) and the farthest object distance (e.g., 20M). The focus parameter read from the lens at the closest object distance is taken as the maximum actual focus parameter, and the focus parameter read from the lens at the farthest object distance is taken as the minimum actual focus parameter. The specific value of the object distance is only an example for convenience of description, and the specific value is determined according to the lens.
A calibration tool may be used to calibrate the actual focus parameter range. The calibration tool is PC-side client tool software which is adopted when the calibration tool is used for calibrating the second electronic equipment at the nearest object distance and the farthest object distance by combining a focusing calibration process during production. The calibration tool is used for sending a calibration command to the second electronic device, when the second electronic device receives the calibration command, the calibration command is issued to the FPGA soft core, and the FPGA soft core reads the focusing parameters from the lens, so that the minimum actual focusing parameter and the maximum actual focusing parameter are obtained.
Optionally, if the environmental temperature is T0 during the calibration process, if the environmental temperature changes during the use of the device, the calibrated focusing parameters may be expanded as needed to make the calibrated focusing stroke meet the requirement of the working temperature of the device, and the actual focusing parameter range is determined according to the expanded focusing parameters.
And setting the minimum normalized focusing parameter in the normalized focusing parameter range to correspond to the nearest object distance, and setting the maximum normalized focusing parameter to correspond to the farthest object distance. The minimum normalized focus parameter and the maximum normalized focus parameter may be customized.
The minimum actual focusing parameter, the maximum actual focusing parameter, the minimum normalized focusing parameter and the maximum normalized focusing parameter can be written into a flash of the FPGA soft core, and the values can be read from the flash after the second electronic device is powered on again, so that the actual focusing parameter range is determined and the normalized focusing parameter range is set.
The normalized mapping formula may be used to map any one of the actual focusing parameters F1 in the actual focusing parameter range to one of the normalized focusing parameters F2 in the set normalized focusing parameter range, where the actual focusing parameter F1 and the normalized focusing parameter F2 have a certain mapping relationship M1.
The inverse normalized mapping formula may be used to map any one normalized focus parameter F3 in the set normalized focus parameter range to one actual focus parameter F4 in the actual focus parameter range, there is a certain mapping relationship M2 between the normalized focus parameter F3 and the actual focus parameter F4, and the mapping relationship M2 is reciprocal to the mapping relationship M1.
Specifically, the normalized mapping formula may be the following formula (1):
standard_pos=S1*(ad_pos-min)/(max-min)+S2 (1)。
the denormalized mapping formula may be as follows (2):
ad_pos=(max-min)*standard_pos/4000+min (2)。
wherein min is a minimum actual focusing parameter, max is a maximum actual focusing parameter, S1 is a maximum normalized focusing parameter, S2 is a minimum normalized focusing parameter, ad _ pos is an actual focusing parameter of the lens, and standard _ pos is a normalized focusing parameter. The range of the normalized focusing parameters may be, for example, 0 to 4000, i.e., 4000 for S1 and 0 for S2, which is only exemplary and not limiting.
It is understood that the minimum actual focus parameter and the maximum actual focus parameter of different second electronic devices may be different, so the values of the parameters max and min in the two formulas (1) and (2) may be different according to the second electronic devices.
The process of the first electronic device setting the preset point information is described below with reference to the above formula (1).
When the first electronic device is located at each preset point to be set in the inspection area, a control instruction can be sent to the second electronic device according to a prompt about focusing on a target object on the second electronic device, which is input from the outside.
After receiving the control instruction, the second electronic device confirms that the target object is focused on the device, reads a fourth focusing parameter from a lens on the device, inputs the fourth focusing parameter into formula (1) as a value of ad _ pos, calculates a value of standard _ pos as a second focusing parameter, and sends the second focusing parameter to the first electronic device, namely the second focusing parameter is the normalized focusing parameter.
And after receiving the second focusing parameter, the first electronic equipment obtains the preset point information corresponding to the preset point according to the second focusing parameter.
In the above process, the second electronic device may map all the read actual focus parameters to normalized focus parameters in the set normalized focus parameter range in a unified manner. The preset point information set by the first electronic equipment is normalized focusing parameters.
Therefore, multiplexing of each preset point information can be realized for different second electronic devices, and even if the second electronic device is replaced on the first electronic device or a lens is replaced on the second electronic device, the preset point information corresponding to all the preset points does not need to be collected again and recorded again.
The process of the second electronic device adjusting the current focusing parameter to match the first focusing parameter is described below with reference to the above formula (2).
The second electronic equipment receives a first focusing parameter sent by the first electronic equipment, wherein the first focusing parameter is a normalized focusing parameter, the first focusing parameter is used as a value of standard _ pos and is input into a formula (2), the value of ad _ pos is calculated to be used as a third focusing parameter, and the current focusing parameter of a lens on the equipment is adjusted to the third focusing parameter.
After the current focusing parameter of the lens on the second electronic device is adjusted to the third focusing parameter, the motor in the lens moves to the position represented by the third focusing parameter, and the position is the position of the motor when the lens on the second electronic device focuses on the target object when the preset point information where the first focusing parameter is located is set, so that focusing is realized.
Therefore, the motor can be controlled to directly move to the target position when the lens focuses on the target object, the motor does not need to be controlled to pull the focusing assembly back and forth to find out the target position, and the time required by the whole focusing process is shortened.
The benefits of setting the normalized focus parameters in the first electronic device are described below in a more specific example.
Assume that the maximum normalized focus parameter S1 is 4000 and the minimum normalized focus parameter S2 is 0.
When the first electronic device sets all the preset point information, the first electronic device is equipped with the second electronic device E1, and the setting of the preset point information is completed by the second electronic device E1. Suppose that:
the minimum actual focusing parameter min of the second electronic device E1 is 100;
the maximum actual focusing parameter max of the second electronic device E1 is 1000;
when the first electronic device is at the first preset point, the actual focusing parameter when the lens on the second electronic device E1 focuses on the target object is 300, and the object distance of the lens in the second electronic device E1 is assumed to be O1.
These parameter values are substituted into the above equation (1) to calculate the normalized focus parameter:
standard_pos=S1*(ad_pos-min)/(max-min)+S2
=4000*(300-100)/(1000-100)+0=888。
the second electronic device E1 sends the normalized focusing parameter 888 as the second focusing parameter to the first electronic device, and the first electronic device sets 888 as the focusing parameter in the preset point information corresponding to the first preset point.
Subsequently, the second electronic device E1 on the first electronic device is replaced with a second electronic device E2 (in this embodiment, E1 and E2 are used to distinguish different second electronic devices), assuming that:
the minimum actual focusing parameter min of the second electronic device E2 is 200;
the maximum actual focus parameter max of the second electronic device E2 is 1200.
When the first electronic device patrols and examines to the first preset point, the focusing parameter standard _ pos in the preset point information corresponding to the first preset point, which is locally acquired by the first electronic device, is 888.
Substituting these parameter values into equation (2), the actual focus parameters required for the second electronic device E2 motor motion are calculated:
ad_pos=(max-min)*standard_pos/4000+min
=(1200-200)*888/4000+200=422;
the second electronic device E2 motor moves to the position indicated by the actual focus parameter 422 to achieve focus and no longer to the position indicated by 300. At this time, the object distance of the lens in the second electronic device E2 is still O1, and the object distances of the second electronic device E1 and the second electronic device E2 are the same even though the actual focus parameters are different (300 and 422, respectively).
Of course, if the multiplexing of the preset point information among different devices is not considered, when the preset point of the first electronic device is set, the actual focusing parameter when the second electronic device focuses on the target object may also be directly set as the focusing parameter in the preset point information. Accordingly, the second electronic device does not need to perform normalization processing or inverse normalization processing.
Optionally, the model of the second electronic device is a target model, differences between actual focusing parameters of lenses of all second electronic devices in the target model at the same object distance are within a set error range, and the set error range is determined according to the actual focusing parameter range of the second electronic device in the designated model.
The manner of determining the target model may include:
providing a plurality of second electronic devices of a certain model, for example, 5, and respectively acquiring focusing parameters of lenses on different second electronic devices when the lenses are focused on a target object at an object distance of 1-12 m (the acquisition interval is 0.5 m); and the collected focusing parameters are analyzed and judged as follows:
and under the same object distance, whether the difference between the maximum value and the minimum value in all focusing parameters of the lens on different second electronic equipment is within a set error range or not, if so, determining that the lens meets the consistency requirement, and taking the model as a target model.
The set error range may be, for example, less than or equal to 3% of the total range, where 3% is only an example, and the actual visual field may be determined according to the actual lens adjustment, and is not limited.
In one embodiment, the target preset point information further includes: a first temperature; the first temperature is a temperature at which the first focusing parameter is set;
the first electronic device sends the first focusing parameter to a second electronic device, and the method comprises the following steps:
the first electronic device sends the first focusing parameter and the first temperature to the second electronic device.
Because the lens in the lens on the second electronic device is made of germanium material, the lens is easy to deform along with the change of the ambient temperature, even if the lens is clearly focused at the first temperature, when the ambient temperature is changed to a preset temperature threshold value, the temperature threshold value is determined according to the actual lens, the virtual focus phenomenon is easy to occur, and the original focusing parameters can not enable the picture to be clearly focused under the condition.
In order to solve the above problem, when the first electronic device sends the first focusing parameter to the second electronic device, the first electronic device also sends the first temperature when the first focusing parameter is set to the second electronic device. The second electronic device can compensate the received first focusing parameter according to the first temperature, and adjust the current focusing parameter on the lens according to the compensated focusing parameter, so that the problem of virtual focus caused by focus offset due to temperature change can be solved.
The first temperature may be an ambient temperature at which the first focusing parameter is set. Of course, if it is not convenient to obtain the ambient temperature when setting, the cavity temperature of the second electronic device, the temperature of the lens on the second electronic device, or the like may be used instead.
Optionally, the first temperature and the first focusing parameter may be carried in a control command and sent by the first electronic device to the second electronic device. After receiving the control command, the second electronic device may analyze the first temperature and the first focusing parameter from the control command.
The control instructions may include a focus parameter field, a temperature flag bit, a temperature field, a sign flag bit, and the like. The focusing parameter field is used for recording a first focusing parameter, the temperature mark bit is used for identifying whether the control instruction carries a first temperature, the temperature field is used for recording an absolute value of the first temperature, and the sign mark bit is used for recording a sign of the first temperature.
Specifically, the control instruction may be 32 bits. Wherein, the 1 st to 15 th bits can be used as a focusing parameter field; the 16 th bit can be used as a temperature flag bit, for example, if the data on the 16 th bit is 0, it indicates that the first temperature is not carried, and if the data on the 16 th bit is 1, it indicates that the first temperature is carried; bits 17-30 can be used as a temperature field; the 31 st bit can be used as a sign flag bit, for example, if the data on the 31 st bit is 0, it indicates that the first temperature is a positive value, and if the data on the 31 st bit is 1, it indicates that the first temperature is a negative value; the 32 th bit may be set to 0, and in order to avoid the situation that the data in the control instruction is considered to be a negative number when the highest bit is 1 during the data transfer, the highest bit is discarded, that is, the 32 th bit is set to 0.
After the second electronic device parses the first temperature and the first focusing parameter from the control command, the following steps may be performed:
inputting the first focusing parameter into a preset inverse normalization formula, such as the formula (2), to obtain a third focusing parameter;
and acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the equipment to the fifth focusing parameter.
The fifth focusing parameter is a focusing parameter at the current temperature, and is a focusing parameter obtained by compensating the third focusing parameter according to the temperature difference between the first temperature and the current temperature, so that the current focusing parameter of the device is adjusted to the fifth focusing parameter, and the problem of virtual focus caused by focus offset due to temperature change can be solved.
Generally, when the object distance of the lens is constant and the ambient temperature is changed, the temperature change and the change of a focusing component such as a potentiometer are in a linear relation. Assuming that the temperature variation between the current temperature and the first temperature is Δ T ℃, the variation of the potentiometer resistance value is k × Δ T, where (k ═ k1+ k2) ohms, i.e., Δ R ═ k1+ k2 × Δ T (3), k1 is the temperature drift coefficient of the lens, and k2 is the temperature drift coefficient of the potentiometer.
Accordingly, a compensation method based on the focus compensation algorithm will be described below by taking the second electronic device as an example of a gun camera with a focal length of 25 mm.
Before compensation, the conversion relation between the resistance value of the potentiometer and the AD value on the AD sampling chip is determined in advance.
When the temperature changes, the resistance value after the temperature changes can be calculated, and then the resistance value is converted into the AD value of the AD sampling chip to be output (of course, the temperature change amount and the AD value are not in a linear relationship, and the resistance change amount of the potentiometer is in a linear relationship). The conversion relation between the resistance value of the potentiometer and the AD value on the AD sampling chip is as follows:
suppose that: the total resistance value of a potentiometer in the lens is 10k omega, and 3.3V is used for supplying power; the full range of the 16-bit AD sampling chip is 2.048V;
the formula for converting the resistance R1 of the potentiometer to an AD value is as follows:
Figure BDA0002279030380000211
conversely, the formula for converting the AD value to the potentiometer resistance R1 is as follows:
Figure BDA0002279030380000212
the AD is an AD value sampled by an AD sampling chip; r1 is the resistance of the lens potentiometer.
On the basis of the conversion relationship, the focus parameter is compensated.
Suppose that: the first temperature T1 was 25 °, the current temperature T2 was 20 ℃ and the AD value at 25 ℃, i.e. the third focusing parameter AD5, was 7653.
Substituting the third focusing parameter AD5 into the formula (5) to obtain
Figure BDA0002279030380000213
Combining equation (3), the resistance R2 of the potentiometer at 20 ℃ is obtained:
R2=R1+k*(T2-T1)=1.6951+(-0.008)*(20-25)=1.7351;
wherein, the temperature drift coefficient k1 of the lens with the focal length of 25mm takes the value of-0.008 kilo ohm/DEG C; although the temperature drift coefficient of a potentiometer in a lens of an industrial temperature measuring device is 20 ppm/DEG C, the value is small relative to k1 and can be basically equivalent to no temperature drift, so that the value of k2 is 0.
Substituting R2 into equation (4) yields AD values at 20 ℃:
Figure BDA0002279030380000221
the AD6 is the compensated, i.e., fifth, focus parameter (non-normalized focus parameter).
The above is a detailed description of the focus control method according to the first aspect of the present invention, but the present invention should not be limited thereto.
The focus control method of the second aspect of the present invention is applied to an electronic system including: first and second electronic devices, referring to fig. 4, the method includes the steps of:
t100: the method comprises the steps that a second electronic device receives a first focusing parameter sent by a first electronic device, wherein when the first electronic device patrols and examines a target preset point, the first electronic device obtains target preset point information of the target preset point; the target preset point information at least comprises a first focusing parameter;
t200: the second electronic device adjusts the current focusing parameters to match the first focusing parameters to focus on the target object.
When the first electronic device patrols and examines a target preset point, the first electronic device can search preset point information containing a target preset point identifier from all preset point information which is set, the searched preset point information is determined to be the target preset point information, the target preset point information at least comprises a first focusing parameter, the first focusing parameter is applied to the second electronic device, and the first focusing parameter is sent to the second electronic device. The manner of setting all the preset point information by the first electronic device can refer to the contents in the foregoing embodiments, and details are not described herein.
Of course, the target preset point information may also include other information, such as a preset point, a location of an area corresponding to the preset point, and the like, which is not limited in detail.
Since the first focus parameter is a focus parameter of the second electronic device when focusing on the target object at the time of setting the preset point, it is possible to indicate a target position where the motor is located when the lens is focused on the target object. The second electronic device adjusts the current focusing parameters to be matched with the first focusing parameters, so that a motor in a lens on the second electronic device can be quickly moved to a target position when the lens focuses on a target object, and quick focusing is realized.
For example, when a target preset point at which the first electronic device is currently located is set, the second electronic device focuses on a certain target object, and then the second electronic device adjusts the current focusing parameter of the device according to the first focusing parameter, so that the second electronic device can be quickly restored to a state of focusing on the target object to focus on the target object.
How the second electronic device adjusts the current focusing parameter of the lens on the device according to the first focusing parameter, for example, when the first focusing parameter is an unnormalized focusing parameter (a focusing parameter is directly read from the lens when a preset point is set), the second electronic device may adjust the current focusing parameter of the lens on the device to the first focusing parameter; or, when the first focusing parameter is a normalized focusing parameter (when a preset point is set, the focusing parameter after normalization processing of the focusing parameter read from the lens), the second electronic device may perform inverse normalization processing on the first focusing parameter, and then adjust the current focusing parameter of the device to the focusing parameter after inverse normalization processing. The above-described modes are only examples and are not intended to be limiting.
In one embodiment, the above method flow can be executed by a focus control apparatus, as shown in fig. 5, the focus control apparatus 200 can include 2 modules: a first focusing parameter receiving module 201 and a current focusing parameter adjusting module 202. The first focusing parameter receiving module 201 is configured to execute the step T100, and the current focusing parameter adjusting module 202 is configured to execute the step T200.
In one embodiment, the first focus parameter is a normalized focus parameter;
the second electronic device adjusts the current focusing parameter to match the first focusing parameter, including:
inputting the first focusing parameter into a preset inverse normalization mapping formula to obtain a third focusing parameter having a mapping relation with the first focusing parameter;
and adjusting the current focusing parameters of the equipment according to the third focusing parameters.
The inverse normalization mapping formula is as in formula (2) in the foregoing embodiment, the first focusing parameter is substituted into formula (2) as tandard _ pos, the obtained value of ad _ pos is used as a third focusing parameter, and the current focusing parameter of the device is adjusted according to the third focusing parameter, for example, the current focusing parameter of a lens on the device is adjusted to the third focusing parameter.
After the current focusing parameter of the lens on the second electronic device is adjusted to the third focusing parameter, the motor in the lens moves to the position represented by the third focusing parameter, and the position is the position where the motor is located when the lens on the second electronic device focuses on the target object when the preset point information where the first focusing parameter is located is set, so that focusing is realized.
Therefore, the motor can be controlled to directly move to the target position when the lens focuses on the target object, the motor does not need to be controlled to pull the focusing assembly back and forth to find out the target position, and the time required by the whole focusing process is shortened.
In one embodiment, before the second electronic device receives the first focusing parameter transmitted from the first electronic device, the method further comprises:
when the second electronic equipment determines that the equipment focuses on the target object, reading a fourth focusing parameter from the equipment;
the second electronic device inputs the fourth focusing parameter into a preset normalization mapping formula to obtain a second focusing parameter having a mapping relation with the fourth focusing parameter, wherein the second focusing parameter is a normalization focusing parameter;
the second electronic device sends the second focusing parameter to the first electronic device.
This embodiment corresponds to a manner in which the first electronic device sets all the preset point information in the focus control method of the first aspect of the present invention. The normalized mapping formula is as in formula (1) in the previous embodiment.
The process of the first electronic device setting the preset point information is described below with reference to the above formula (1).
When the first electronic device is located at each preset point to be set in the inspection area, a control instruction can be sent to the second electronic device according to a prompt about focusing of the second electronic device on a target object, which is input from the outside.
After receiving the control instruction, the second electronic device confirms that the second electronic device focuses on the target object, reads a fourth focusing parameter from the second electronic device, inputs the fourth focusing parameter into formula (1) as a value of ad _ pos, calculates a value of standard _ pos as a second focusing parameter, and sends the second focusing parameter to the first electronic device, namely the second focusing parameter is the normalized focusing parameter.
And after receiving the second focusing parameter, the first electronic equipment sets the preset point information corresponding to the preset point according to the second focusing parameter.
In the above process, the second electronic device may map all the read actual focus parameters to normalized focus parameters in the set normalized focus parameter range in a unified manner. The preset point information set by the first electronic equipment is normalized focusing parameters.
Therefore, multiplexing of each preset point information can be realized for different second electronic devices, and even if the second electronic device is replaced on the first electronic device or a lens is replaced on the second electronic device, the preset point information corresponding to all the preset points does not need to be collected again and recorded again.
In one embodiment, before the second electronic device adjusts the current focusing parameter of the present device according to the third focusing parameter, the method further includes:
the second electronic equipment receives a first temperature sent by the first electronic equipment, wherein the first temperature is the temperature when the first focusing parameter is set;
the second electronic device adjusts the current focusing parameters of the device according to the third focusing parameters, and the method comprises the following steps:
and acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the lens on the equipment to the fifth focusing parameter.
Because the lens in the lens on the second electronic device is made of germanium material, the lens is easy to deform along with the change of the ambient temperature, even if the lens is clearly focused at the first temperature, when the ambient temperature is changed to a preset temperature threshold value, the temperature threshold value is determined according to the actual lens, the virtual focus phenomenon is easy to occur, and the original focusing parameters can not enable the picture to be clearly focused under the condition.
In order to solve the above problem, when the first electronic device sends the first focusing parameter to the second electronic device, the first electronic device also sends the first temperature when the first focusing parameter is set to the second electronic device. The second electronic device can compensate the received first focusing parameter according to the first temperature, and adjust the current focusing parameter on the lens according to the compensated focusing parameter, so that the problem of virtual focus caused by focus offset due to temperature change can be solved.
Optionally, the first temperature and the first focusing parameter may both be carried in the control instruction and sent to the second electronic device by the first electronic device. After receiving the control command, the second electronic device may analyze the first temperature and the first focusing parameter from the control command. For the control command, reference may be made to the contents of the foregoing embodiments, which are not described in detail herein.
After the second electronic device analyzes the first temperature from the control command, the first focusing parameter is input into a preset inverse normalization formula (such as formula (2)) to obtain a third focusing parameter.
And when the second electronic equipment adjusts the current focusing parameter of the equipment according to the third focusing parameter, acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the equipment to the fifth focusing parameter.
The fifth focusing parameter is a focusing parameter at the current temperature, and is a focusing parameter obtained by compensating the third focusing parameter according to the temperature difference between the first temperature and the current temperature, so that the current focusing parameter of the lens on the device is adjusted to the fifth focusing parameter, and the problem of virtual focus caused by focus offset due to temperature change can be solved. The focus compensation algorithm can refer to the related contents in the foregoing embodiments, and will not be described in detail here.
For the related, similar or identical parts of the focus control method provided by the second aspect of the present invention and the focus control method provided by the first aspect, the contents in the foregoing embodiments may be referred to, and details are not repeated herein.
The third aspect of the present invention provides an electronic system, and referring to fig. 2, the electronic system includes a first electronic device 500 and a second electronic device 400.
The first electronic device is to: when a target preset point is patrolled, acquiring target preset point information corresponding to the target preset point, wherein the target preset point information at least comprises a first focusing parameter, the first focusing parameter is applied to second electronic equipment, and the first focusing parameter is sent to the second electronic equipment;
the second electronic device is to: the method comprises the steps of receiving first focusing parameters sent by first electronic equipment, and adjusting current focusing parameters to be matched with the first focusing parameters so as to focus on a target object.
In one embodiment of the present invention,
the first focusing parameter is a normalized focusing parameter;
when the second electronic device adjusts the current focusing parameter to match the first focusing parameter, the second electronic device is specifically configured to:
inputting the first focusing parameter into a preset inverse normalization mapping formula to obtain a third focusing parameter having a mapping relation with the first focusing parameter;
and adjusting the current focusing parameters of the equipment according to the third focusing parameters.
In one embodiment, before the second electronic device adjusts the current focusing parameter of the present device according to the third focusing parameter, the second electronic device is further configured to:
receiving a first temperature sent by first electronic equipment, wherein the first temperature is the temperature when the first focusing parameter is set;
adjusting the current focusing parameters of the device according to the third focusing parameters, including:
and acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the equipment to the fifth focusing parameter.
In one embodiment of the present invention,
the first electronic device is further configured to: when the target object is inspected to each preset point needing to be set in the inspection area, acquiring a second focusing parameter of the second electronic equipment when the second electronic equipment is focused on the target object, and acquiring preset point information corresponding to the preset point according to the second focusing parameter;
the second electronic device is further to: when the device is determined to be focused on the target object, reading a fourth focusing parameter from the device, inputting the fourth focusing parameter into a preset normalization mapping formula by the second electronic device, obtaining a second focusing parameter having a mapping relation with the fourth focusing parameter, wherein the second focusing parameter is a normalization focusing parameter, and sending the second focusing parameter to the first electronic device.
In the electronic system provided by the third aspect of the present invention, the content in the foregoing embodiments can be referred to, and details are not repeated herein, where the relevant, similar, or identical to the focus control method provided by the first aspect.
A fourth aspect of the present invention provides a focus control apparatus applied to an electronic system including: first electronic device and second electronic device, referring to fig. 3, the focus control apparatus 100 includes:
the system comprises a target preset point information acquisition module 101, a target preset point information acquisition module and a target preset point information acquisition module, wherein the target preset point information acquisition module is used for acquiring target preset point information corresponding to a target preset point when a first electronic device patrols the target preset point; the target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to the second electronic equipment;
a first focusing parameter sending module 102, configured to send, by the first electronic device, the first focusing parameter to the second electronic device, so that the second electronic device adjusts the current focusing parameter to match the first focusing parameter.
In one embodiment of the present invention,
the first electronic equipment sets all the preset point information through the following preset point information setting modules:
and the preset point information setting module is used for acquiring a second focusing parameter of the second electronic equipment when the second electronic equipment focuses on the target object when the second electronic equipment patrols and examines each preset point required to be set in the patrol and examine area, and acquiring the preset point information corresponding to the preset point according to the second focusing parameter.
In one embodiment, the target preset point information further includes: a first temperature; the first temperature is a temperature at which the first focusing parameter is set;
when the first focusing parameter sending module sends the first focusing parameter to the second electronic device, the first focusing parameter sending module is specifically configured to:
and sending the first focusing parameter and the first temperature to the second electronic device.
In one embodiment of the present invention,
the first electronic device and the second electronic device are respectively inspection equipment and temperature measuring equipment applied to a transformer substation scene.
The content of the foregoing embodiments can be referred to in the focus control apparatus according to the fourth aspect of the present invention, which is related, similar or identical to the focus control method according to the first aspect, and will not be described herein again.
A fifth aspect of the present invention provides a focus control apparatus applied to an electronic system including: first electronic device and second electronic device, referring to fig. 5, the focus control apparatus 200 includes:
a first focusing parameter receiving module 201, configured to receive, by a second electronic device, a first focusing parameter sent from a first electronic device, where the first electronic device obtains target preset point information of a target preset point when the first electronic device patrols the target preset point; the target preset point information at least comprises a first focusing parameter;
a current focusing parameter adjusting module 202, configured to adjust the current focusing parameter to match the first focusing parameter by the second electronic device, so as to focus on the target object.
In one embodiment of the present invention,
the first focusing parameter is a normalized focusing parameter;
when the current focusing parameter adjusting module adjusts the current focusing parameter to match the first focusing parameter, the current focusing parameter adjusting module is specifically configured to:
inputting the first focusing parameter into a preset inverse normalization mapping formula to obtain a third focusing parameter having a mapping relation with the first focusing parameter;
and adjusting the current focusing parameters of the equipment according to the third focusing parameters.
In one embodiment, before the first focusing parameter receiving module, the apparatus further comprises:
the fourth focusing parameter reading module is used for reading a fourth focusing parameter from the second electronic device when the second electronic device determines that the second electronic device focuses on the target object;
the normalization mapping module is used for the second electronic equipment to input the fourth focusing parameter into a preset normalization mapping formula to obtain a second focusing parameter which has a mapping relation with the fourth focusing parameter, wherein the second focusing parameter is a normalization focusing parameter;
and the second focusing parameter sending module is used for sending the second focusing parameter to the first electronic equipment by the second electronic equipment.
In an embodiment, before the current focusing parameter adjusting module adjusts the current focusing parameter of the present device according to the third focusing parameter, the current focusing parameter adjusting module is further configured to:
receiving a first temperature sent by first electronic equipment, wherein the first temperature is the temperature when the first focusing parameter is set;
the current focusing parameter adjusting module adjusts the current focusing parameter of the device according to the third focusing parameter, and is specifically configured to:
and acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the equipment to the fifth focusing parameter.
The content of the foregoing embodiments can be referred to in the focus control device provided in the fifth aspect of the present invention, which is similar to, or the same as the focus control method provided in the first aspect, and will not be described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units.
The invention also provides an electronic device, which comprises a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the focus control method as described in the foregoing embodiments.
For example, the embodiment of the focus control apparatus according to the first aspect of the present invention may be applied to the first electronic device. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for running through the processor of the first electronic device where the software implementation is located as a logical device. From a hardware aspect, as shown in fig. 6, fig. 6 is a hardware structure diagram of a first electronic device where the focus control apparatus 100 is located according to an exemplary embodiment of the present invention, and besides the processor 510, the memory 530, the interface 520, and the nonvolatile memory 540 shown in fig. 6, the first electronic device where the apparatus 100 is located in the embodiment may also include other hardware according to the actual function, which is not described again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (13)

1. A focus control method, applied to an electronic system, the electronic system comprising: a first electronic device and a second electronic device, the method comprising:
when the first electronic equipment patrols and examines a target preset point, acquiring target preset point information of the target preset point; the target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to the second electronic equipment;
and the first electronic equipment sends the first focusing parameter to the second electronic equipment, so that the second electronic equipment adjusts the current focusing parameter to be matched with the first focusing parameter.
2. The focus control method of claim 1, wherein before the first electronic device patrols to the target preset point, the method further comprises:
the first electronic equipment sets all the preset point information in the following mode:
and when the second electronic equipment is positioned at each preset point needing to be set in the inspection area, acquiring a second focusing parameter of the second electronic equipment when the second electronic equipment focuses on the target object, and acquiring preset point information corresponding to the preset point according to the second focusing parameter.
3. The focus control method of claim 1, wherein the target preset point information further comprises: a first temperature; the first temperature is a temperature at which the first focusing parameter is set;
the first electronic device sends the first focusing parameter to a second electronic device, and the method comprises the following steps:
the first electronic device sends the first focusing parameter and the first temperature to the second electronic device.
4. The focus control method according to any one of claims 1 to 3,
the first electronic device and the second electronic device are respectively inspection equipment and temperature measuring equipment applied to a transformer substation scene.
5. A focus control method, applied to an electronic system, the electronic system comprising: a first electronic device and a second electronic device, the method comprising:
the method comprises the steps that a second electronic device receives a first focusing parameter sent by a first electronic device, wherein when the first electronic device patrols and examines a target preset point, the first electronic device obtains target preset point information of the target preset point; the target preset point information at least comprises a first focusing parameter;
the second electronic device adjusts the current focusing parameters to match the first focusing parameters to focus on the target object.
6. The focus control method of claim 5,
the first focusing parameter is a normalized focusing parameter;
the second electronic device adjusts the current focusing parameter to match the first focusing parameter, including:
inputting the first focusing parameter into a preset inverse normalization mapping formula to obtain a third focusing parameter having a mapping relation with the first focusing parameter;
and adjusting the current focusing parameters of the equipment according to the third focusing parameters.
7. The focus control method of claim 5 or 6, wherein before the second electronic device receives the first focus parameter transmitted from the first electronic device, the method further comprises:
when the second electronic equipment determines that the equipment focuses on the target object, reading a fourth focusing parameter from the equipment;
the second electronic device inputs the fourth focusing parameter into a preset normalization mapping formula to obtain a second focusing parameter having a mapping relation with the fourth focusing parameter, wherein the second focusing parameter is a normalization focusing parameter;
the second electronic device sends the second focusing parameter to the first electronic device.
8. The focus control method as claimed in claim 6, wherein before the second electronic device adjusts the current focus parameter of the present device according to the third focus parameter, the method further comprises:
the second electronic equipment receives a first temperature sent by the first electronic equipment, wherein the first temperature is the temperature when the first focusing parameter is set;
the second electronic device adjusts the current focusing parameters of the device according to the third focusing parameters, and the method comprises the following steps:
and acquiring the current temperature, inputting the third focusing parameter, the first temperature and the current temperature into a preset focusing compensation algorithm to obtain a fifth focusing parameter at the current temperature, and adjusting the current focusing parameter of the equipment to the fifth focusing parameter.
9. An electronic system comprising a first electronic device and a second electronic device;
the first electronic device is to: when a target preset point is patrolled, acquiring target preset point information corresponding to the target preset point, wherein the target preset point information at least comprises a first focusing parameter, and the first focusing parameter is applied to second electronic equipment;
the second electronic device is to: the method comprises the steps of receiving first focusing parameters sent by first electronic equipment, and adjusting current focusing parameters to be matched with the first focusing parameters so as to focus on a target object.
10. A focus control apparatus for use in an electronic system, the electronic system comprising: a first electronic device and a second electronic device, the apparatus comprising:
the target preset point information acquisition module is used for acquiring target preset point information corresponding to a target preset point when the first electronic equipment patrols the target preset point; the target preset point information at least comprises a first focusing parameter, the first focusing parameter is applied to second electronic equipment, and the first focusing parameter is sent to the second electronic equipment;
and the first focusing parameter sending module is used for sending the first focusing parameter to the second electronic equipment by the first electronic equipment so as to adjust the current focusing parameter to be matched with the first focusing parameter by the second electronic equipment.
11. A focus control apparatus for use in an electronic system, the electronic system comprising: a first electronic device and a second electronic device, the apparatus comprising:
the first focusing parameter receiving module is used for receiving a first focusing parameter sent by first electronic equipment by second electronic equipment, wherein when the first electronic equipment patrols and examines a target preset point, the first electronic equipment acquires target preset point information of the target preset point; the target preset point information at least comprises a first focusing parameter;
and the current focusing parameter adjusting module is used for adjusting the current focusing parameter to be matched with the first focusing parameter by the second electronic equipment so as to focus on the target object.
12. An electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor, when executing the program, implements the focus control method of any one of claims 1-4 or 5-8.
13. A machine-readable storage medium, having stored thereon a program which, when executed by a processor, implements the focus control method according to any one of claims 1 to 4 or 5 to 8.
CN201911133770.2A 2019-11-19 2019-11-19 Focus control method, system, device and equipment, and storage medium Pending CN112911128A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911133770.2A CN112911128A (en) 2019-11-19 2019-11-19 Focus control method, system, device and equipment, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911133770.2A CN112911128A (en) 2019-11-19 2019-11-19 Focus control method, system, device and equipment, and storage medium

Publications (1)

Publication Number Publication Date
CN112911128A true CN112911128A (en) 2021-06-04

Family

ID=76103351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911133770.2A Pending CN112911128A (en) 2019-11-19 2019-11-19 Focus control method, system, device and equipment, and storage medium

Country Status (1)

Country Link
CN (1) CN112911128A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114640792A (en) * 2022-02-09 2022-06-17 浙江大华技术股份有限公司 Position adjusting method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108076281A (en) * 2016-11-15 2018-05-25 杭州海康威视数字技术股份有限公司 A kind of auto focusing method and Pan/Tilt/Zoom camera
CN108803661A (en) * 2018-06-29 2018-11-13 广东容祺智能科技有限公司 A kind of unmanned plane fast inspection system and method
CN110278382A (en) * 2019-07-22 2019-09-24 浙江大华技术股份有限公司 A kind of focus method, device, electronic equipment and storage medium
EP3544286A1 (en) * 2018-03-20 2019-09-25 Beijing Xiaomi Mobile Software Co., Ltd. Focusing method, device and storage medium
CN110392201A (en) * 2018-04-20 2019-10-29 杭州海康威视数字技术股份有限公司 A kind of the focus motor location determining method and device of thermal imaging system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108076281A (en) * 2016-11-15 2018-05-25 杭州海康威视数字技术股份有限公司 A kind of auto focusing method and Pan/Tilt/Zoom camera
EP3544286A1 (en) * 2018-03-20 2019-09-25 Beijing Xiaomi Mobile Software Co., Ltd. Focusing method, device and storage medium
CN110392201A (en) * 2018-04-20 2019-10-29 杭州海康威视数字技术股份有限公司 A kind of the focus motor location determining method and device of thermal imaging system
CN108803661A (en) * 2018-06-29 2018-11-13 广东容祺智能科技有限公司 A kind of unmanned plane fast inspection system and method
CN110278382A (en) * 2019-07-22 2019-09-24 浙江大华技术股份有限公司 A kind of focus method, device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114640792A (en) * 2022-02-09 2022-06-17 浙江大华技术股份有限公司 Position adjusting method and device, electronic equipment and storage medium
CN114640792B (en) * 2022-02-09 2024-04-05 浙江大华技术股份有限公司 Position adjustment method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3389268B1 (en) Depth information acquisition method and apparatus, and image collection device
CN105424006B (en) Unmanned plane hovering accuracy measurement method based on binocular vision
CN101470324B (en) Auto-focusing apparatus and method for camera
CN111932636B (en) Calibration and image correction method and device for binocular camera, storage medium, terminal and intelligent equipment
US8619374B2 (en) Lens control apparatus and interchangeable lens including lens control apparatus
CN107431745A (en) Double camera focuses on automatically
KR101214081B1 (en) Image expression mapping system using space image and numeric information
US20120212806A1 (en) Infrared Lens Unit and Infrared Camera System Provided with the Infrared Lens Unit
CN104469168A (en) Shooting module and automatic focusing method thereof
CN105635564A (en) Multiple camera apparatus and method for synchronized autofocus
CN108007426B (en) Camera ranging method
CN112949478A (en) Target detection method based on holder camera
WO2017117749A1 (en) Follow focus system and method based on multiple ranging approaches, and photographing system
KR102494006B1 (en) System and method for dynamic stereoscopic calibration
CN107146257B (en) Underwater camera calibration device capable of self-adapting to water quality
CN102645160B (en) Image measuring apparatus
CN112911128A (en) Focus control method, system, device and equipment, and storage medium
CN114979418A (en) Image processing apparatus
CN109712200B (en) Binocular positioning method and system based on least square principle and side length reckoning
WO2018227345A1 (en) Control method and unmanned aerial vehicle
JP7468523B2 (en) MOBILE BODY, POSITION ESTIMATION METHOD, AND PROGRAM
JP2014096761A (en) Image processing apparatus, and control method and control program of the same
CN113920197A (en) Method for assisting camera to automatically focus and focus by laser radar
CN111552048B (en) Temperature compensation distance focusing servo control method based on hyperbolic interpolation
KR101558981B1 (en) Apparatus for auto focusing of camera

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210604

RJ01 Rejection of invention patent application after publication