CN117560475A - Automatic focusing method, device, equipment and storage medium of projection equipment - Google Patents

Automatic focusing method, device, equipment and storage medium of projection equipment Download PDF

Info

Publication number
CN117560475A
CN117560475A CN202210933525.5A CN202210933525A CN117560475A CN 117560475 A CN117560475 A CN 117560475A CN 202210933525 A CN202210933525 A CN 202210933525A CN 117560475 A CN117560475 A CN 117560475A
Authority
CN
China
Prior art keywords
definition
motor
projection
target
projection image
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
CN202210933525.5A
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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shiyuan Artificial Intelligence Innovation Research Institute Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shiyuan Artificial Intelligence Innovation Research Institute 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shiyuan Artificial Intelligence Innovation Research Institute Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN202210933525.5A priority Critical patent/CN117560475A/en
Publication of CN117560475A publication Critical patent/CN117560475A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3141Constructional details thereof
    • H04N9/317Convergence or focusing systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Projection Apparatus (AREA)

Abstract

The invention discloses an automatic focusing method, a device, equipment and a storage medium of projection equipment, wherein the invention acquires a projection image sequence of the projection equipment in the moving process of a motor of the projection equipment; according to the definition of each projection image in the projection image sequence, determining motor parameters of a motor when the projection image of the projection equipment is the maximum definition; correcting the motor parameters to obtain target motor parameters of the motor; the target position of the motor is determined according to the target motor parameters, the motor is driven to run, and therefore, the accuracy of the target motor parameters is further improved by correcting the motor parameters, the accuracy of the focusing position is improved, accurate focusing is achieved, and the focusing position is determined through image definition.

Description

Automatic focusing method, device, equipment and storage medium of projection equipment
Technical Field
The present invention relates to the field of computer vision, and in particular, to an auto-focusing method, apparatus, device and storage medium for a projection device.
Background
Projection devices are typically used to project interface images displayed on associated devices connected thereto, such as on the screen of a computer, cell phone device, etc. Focusing is needed in the use of the projection equipment, so that the projection effect of the projection equipment is ensured.
In the prior art, some automatic focusing methods exist, such as an additional distance measuring device is adopted to measure the distance between a screen and a projector, and a motor is driven to move a projection lens to a designated position according to the relation between the distance and the focal length, but the focusing precision is poor, the cost is high, the time spent in the focusing process is long, and the use experience of a user is further affected.
Disclosure of Invention
The embodiment of the invention provides an automatic focusing method, an automatic focusing device, automatic focusing equipment and a storage medium of projection equipment, which are used for solving the problems that the focusing time of the existing automatic focusing method is too long and the precision is not high.
In a first aspect, an embodiment of the present invention provides an auto-focusing method of a projection device, where the method includes:
acquiring a projection image sequence of a motor of a projection device in a driving process;
according to the definition of each projection image in the projection image sequence, determining the motor parameters of the motor when the projection image of the projection equipment is the maximum definition;
Correcting the motor parameters to obtain target motor parameters of the motor;
and determining a target position of the motor according to the target motor parameter, and driving the motor to run to the target position.
In a second aspect, an embodiment of the present invention provides an autofocus apparatus for a projection device, the apparatus including:
the acquisition module is used for acquiring a projection image sequence of the projection equipment in the moving process of the motor of the projection equipment;
the definition detection module is used for determining motor parameters of the motor when the projection image of the projection equipment is obtained to be the maximum definition according to the definition of each projection image in the projection image sequence;
the correction module is used for correcting the motor parameters to obtain target motor parameters;
and the driving module is used for determining and obtaining the target position of the motor according to the target motor parameter and driving the motor to run to the target position.
In some embodiments of the present invention, embodiments of the present invention provide a projection device including a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to perform operations in the auto-focusing method of the projection device.
In some embodiments of the present invention, a storage medium is provided, where the storage medium stores a plurality of instructions adapted to be loaded by a processor to perform steps in an auto-focus method of the projection device.
According to the automatic focusing method, the automatic focusing device and the storage medium of the projection equipment, which are provided by the embodiment of the invention, the projection image sequence of the projection equipment is obtained in the moving process of the motor of the projection equipment; according to the definition of each projection image in the projection image sequence, determining motor parameters of a motor when the projection image of the projection equipment is the maximum definition; correcting the motor parameters to obtain target motor parameters of the motor; the target position of the motor is determined according to the target motor parameters, the motor is driven to run the target position, so that the accuracy of the target motor parameters is further improved by correcting the motor parameters, the accuracy of the focusing position is improved, accurate focusing is realized, and the optimal focusing position is determined through image definition.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a block diagram of an auto-focusing apparatus of a projection apparatus according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an auto-focusing method of a video apparatus according to an embodiment of the present invention;
FIG. 3 is a block diagram of a projection device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an auto-focusing apparatus of a video apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
As described in the background, the focusing process of the existing projection apparatus generally employs a ranging method. According to the ranging method, distance information of the projection equipment and a projection plane is obtained through ranging sensors such as TOF, infrared, ultrasonic waves and radars, then the moving distance required by the projection equipment to move to the optimal projection position is calculated according to the distance information, and then a driving motor drives the projection equipment to move to the optimal position so as to realize focusing. However, the focusing method based on distance measurement is insufficient in focusing precision, and requires additional deployment of a distance measurement sensor, which requires increasing hardware cost, and in order to improve focusing precision, the distances of the optimal projection positions of different projection devices are required to be acquired in advance, and the distance measurement sensor with high precision is deployed, which further improves focusing cost, and the focusing method based on distance measurement cannot solve the problem of thermal defocus of the projection device, when the projection device is thermally defocused, the position of the projection device is not changed, but the corresponding optimal focusing position is displaced due to expansion of an optical instrument, and at the moment, the distance information loses referential, so that the distance measurement method is ineffective.
Based on the above, the embodiment of the invention provides an automatic focusing method of a projection device, which directly determines the target motor parameter corresponding to the optimal focusing position according to the image definition, does not need to use an additional distance measuring device, can improve the focusing precision, and has the advantages of less quantity of captured images, shorter focusing time and higher focusing efficiency compared with the prior art; and the motor parameters are corrected to obtain the target motor parameters, and the focusing effect is improved by further improving the accuracy of the target motor parameters.
In order to facilitate understanding of the technical solution of the present invention, the automatic focusing method of the shadow apparatus provided by the embodiment of the present invention will be described below in connection with an actual application scenario.
Referring to fig. 1, fig. 1 is a block diagram illustrating an auto-focusing apparatus of a projection apparatus according to an embodiment of the present invention. The auto-focusing apparatus 100 of the projection apparatus may include the auto-focusing device 10 of the projection apparatus, a memory 20, a processor 30, and a communication unit 40, the memory 20 storing machine-readable instructions executable by the processor 30, the processor 30 and the memory 20 communicating via a bus when the auto-focusing apparatus 100 of the projection apparatus is operated, the processor 30 executing the machine-readable instructions, and performing an auto-focusing method of the projection apparatus.
The memory 20, the processor 30 and the communication unit 40 are electrically connected directly or indirectly to each other to realize signal transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The autofocus device 10 of the projection device comprises at least one software function which may be stored in the memory 20 in the form of software or firmware (firmware). The processor 30 is configured to execute executable modules (e.g., software functional modules or computer programs included in the auto-focus apparatus 10 of the projection device) stored in the memory 20.
The Memory 20 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
In some embodiments, processor 30 is configured to perform one or more of the functions described in this embodiment. In some embodiments, processor 30 may include one or more processing cores (e.g., a single core processor (S) or a multi-core processor (S)). By way of example only, processor 30 may include a central processing unit (Central Processing Unit, CPU), application specific integrated circuit (Application Specific IntegratedCircuit, ASIC), special instruction set processor (Application Specific Instruction-setProcessor, ASIP), graphics processing unit (Graphics Processing Unit, GPU), physical processing unit (Physics Processing Unit, PPU), digital signal processor (Digital Signal Processor, DSP), field programmable gate array (Field Programmable Gate Array, FPGA), programmable logic device (Programmable Logic Device, PLD), controller, microcontroller unit, reduced instruction set computer (ReducedInstruction Set Computing, RISC), microprocessor, or the like, or any combination thereof.
For ease of illustration, only one processor is depicted in the auto-focus device 100 of the projection device. It should be noted, however, that the auto-focusing apparatus 100 of the projection apparatus in the present embodiment may also include a plurality of processors, and thus the steps performed by one processor described in the present embodiment may also be performed by the plurality of processors in combination or performed separately. For example, if the processor of the server performs step a and step B, it should be understood that step a and step B may also be performed by two different processors together or performed separately in one processor. For example, the processor performs step a, the second processor performs step B, or the processor and the second processor together perform steps a and B.
In this embodiment, the memory 20 is used for storing a program, and the processor 30 is used for executing the program after receiving an execution instruction. The method of defining a flow disclosed in any embodiment of the present invention may be applied to the processor 30, or implemented by the processor 30.
The communication unit 40 is used for establishing a communication connection between the auto-focusing apparatus 100 of the projection apparatus and other apparatuses through a network, and for transceiving data through the network.
In some embodiments, the network may be any type of wired or wireless network, or a combination thereof. By way of example only, the network may include a wired network, a wireless network, a fiber optic network, a telecommunications network, an intranet, the Internet, a local area network (Local Area Network, LAN), a wide area network (Wide Area Network, WAN), a wireless local area network (Wireless Local Area Networks, WLAN), a metropolitan area network (Metropolitan Area Network, MAN), a wide area network (Wide Area Network, WAN), a public switched telephone network (Public Switched Telephone Network, PSTN), a Bluetooth network, a ZigBee network, a near field communication (Near Field Communication, NFC) network, or the like, or any combination thereof.
In the present embodiment, the auto-focusing apparatus 100 of the projection apparatus may be, but is not limited to, a projection apparatus, a notebook computer, a mobile terminal, a personal computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), etc., and the present embodiment does not impose any limitation on the specific type of auto-focusing apparatus of the projection apparatus.
It will be appreciated that the structure shown in fig. 1 is merely illustrative. The auto-focus device 100 of the projection device may also have more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Based on the implementation architecture of fig. 1, an embodiment of the present invention provides an auto-focusing method of a projection device, which is performed by the auto-focusing device of the projection device shown in fig. 1, and the following describes in detail the steps of the auto-focusing method of the projection device provided by the embodiment of the present invention based on the structure diagram of the auto-focusing device of the projection device shown in fig. 1. Referring to fig. 2, the auto-focusing method of the projection device provided by the embodiment of the invention includes steps S201 to S204:
Step S201, acquiring a projection image sequence of the projection device during the movement of the motor of the projection device.
In some embodiments of the present invention, as shown in fig. 3, the projection device includes a motor 302, a computing module 304, a camera 303, and a projection module 301, where the computing module 304 is configured to implement auto-focusing of the projection device; the projection module 301 projects an image to a position of a picture to be displayed to form a projection picture; the motor 302 includes, but is not limited to, a direct current motor, a stepping motor, and a servo motor, and the motor 302 is used for driving the projection module 301 to move so that the projection module 301 projects a picture; the camera 303 is used for shooting a projection picture during the movement of the projection module 301.
In some embodiments of the present invention, the projection module 301 includes a light source unit, an optical machine unit, and a projection lens. The light source unit is used for providing an illumination light beam, the optical machine unit is used for converting the illumination light beam into an image light beam, the projection lens is used for converting the image light beam into a projection light beam, and the projection light beam is projected out to form a projection picture. The motor 302 is connected to the projection module 301, and drives the projection lens of the projection module 301 to move along the optical axis direction, and the projection lens of the projection module 301 is driven by the motor 302 to move and project a projection screen onto a wall surface or a curtain. It will be appreciated that, as the projection lens moves, the definition of the projection image is different, and the camera 303 captures and records the projection images with different definition to form a plurality of projection images, so as to obtain a projection image sequence.
In some embodiments of the present invention, under the driving of the motor 302, the projection module 301 can move and project images onto a wall or a curtain according to a preset time sequence, and the camera 303 shoots and records the projection images with different definition in the driving process frame by frame according to the preset time sequence to form a plurality of projection images, so as to obtain a projection image sequence.
In some embodiments of the present invention, under the driving of the motor 302, the projection module 301 may complete one movement according to a preset movement track, and the camera 303 photographs and records the projection pictures with different resolutions in the driving process frame by frame according to a preset time sequence, so as to form a plurality of projection images, and obtain a projection image sequence.
In some embodiments of the present invention, under the driving of the motor 302, the projection module 301 may complete multiple movements according to a preset movement track, and the camera 303 photographs and records projection images with different resolutions in each movement process according to the movement track according to a preset time sequence, so as to form multiple projection images, and obtain multiple projection image sequences.
It will be appreciated that the projection image sequence is captured during the movement of the projection module 301 driven by the motor 302, so that each projection image of the projection image sequence corresponds to a motor parameter, where the motor parameter may be the number of motor steps or the movement time. In some embodiments of the present invention, when the motor 302 is a stepper motor, the motor parameter is the motor step number, i.e., one motor step number corresponds to each projected image of the sequence of projected images; when the motor is a servo motor or a direct current motor, the motor parameter is the motion time, i.e. each projected image of the projected image sequence corresponds to a motion time.
Step S202, according to the definition of each projection image in the projection image sequence, determining the motor parameter of the motor when the projection image of the projection device is the maximum definition.
When the motor 302 drives the projection module 301 to move, there may be a projection image corresponding to the best focusing position in the acquired projection image sequence, and since the image quality of the projection image corresponding to the best focusing position is greater than that of the projection images corresponding to other focusing positions. Therefore, in the embodiment of the invention, the image quality of the projection images is quantified through definition, specifically, the definition of each projection image in the projection image sequence is determined through definition detection, and the motor parameter of the motor when the projection image of the projection device is the maximum definition is determined according to the definition of each projection image.
In some embodiments of the present invention, step S202 includes: determining the definition of each projection image in the projection image sequence through definition detection, determining a projection image corresponding to the target definition in the projection image sequence according to the definition of each projection image, acquiring a motor parameter corresponding to the projection image, and setting the motor parameter corresponding to the projection image as the motor parameter of a motor when the projection image of the projection device is the maximum definition. Wherein the target sharpness may be a sharpness maximum in the sequence of projection images.
In some embodiments of the present invention, considering that in the motor driving, due to a certain time difference between the shooting time intervals, the projection image corresponding to the target definition in the collected projection image sequence is not the real maximum definition, that is, due to the shooting time intervals, the camera 303 does not shoot the projection image corresponding to the best focusing position, in order to solve the problem, data fitting may be performed according to the definition of each projection image, to obtain a definition change state corresponding to the projection image sequence, the peak definition is determined according to the definition change state corresponding to the projection image sequence, and the motor parameter of the motor when the projection image of the projection device is the maximum definition is obtained according to the peak definition. Wherein, according to the peak definition, the motor parameters of the motor when the projection image of the projection equipment is the maximum definition comprise: obtaining a candidate maximum definition in a projection image sequence, and calculating a difference value between the candidate maximum definition and a peak value definition; if the difference value is smaller than or equal to a preset difference value threshold value, the candidate maximum definition is similar to or the same as the peak definition, determining a projection image corresponding to the candidate maximum definition, acquiring a motor parameter corresponding to the projection image, and setting the motor parameter corresponding to the projection image as the motor parameter of a motor when the projection image of the projection device is the maximum definition; if the difference value is larger than a preset difference value threshold value, the fact that the difference value between the maximum definition of the candidate and the peak definition is larger is indicated, then adjacent definition of the maximum definition of the candidate is obtained, a first projection image corresponding to the maximum definition of the candidate and a second projection image corresponding to the adjacent definition of the maximum definition of the candidate are obtained, and according to a first motor parameter corresponding to the first projection image and a second motor parameter corresponding to the second projection image, the motor parameter of the motor when the projection image of the projection equipment is obtained is the maximum definition is determined. In some embodiments of the present invention, a weighted average process may be performed according to a first motor parameter corresponding to a first projection image and a second motor parameter corresponding to a second projection image, to obtain a processed motor parameter, and the processed motor parameter is set to a motor parameter of a motor when the projection image of the projection device is at a maximum sharpness.
In some embodiments of the present invention, when there are a plurality of projection image sequences, for each projection image sequence, according to the method for determining a motor parameter of the motor when the projection image of the projection device is at the maximum definition, the motor parameter of the motor when the projection image of the projection device in each projection image sequence is at the maximum definition is obtained.
In some embodiments of the present invention, the sharpness of each projected image in the sequence of projected images may be determined by one or more sharpness detection methods, such as wavelet transform, fourier transform, image gray scale gradient value algorithms.
In some embodiments of the present invention, in each acquisition of a projection image in the motor driving, the definition corresponding to the projection image is determined by one or more definition detection methods in wavelet transform, fourier transform, image gray level transform, and image gray level gradient value algorithm, so as to obtain a definition sequence corresponding to the projection image sequence, for example, the definition sequence { I1, I2, I3} of the projection image sequence of the projection device is acquired in the motor driving, the definition sequence { Q1, Q2, Q3} of the projection image sequence is acquired, where the definition corresponding to the projection image I1 is Q1, the definition corresponding to the projection image I2 is Q2, and the definition corresponding to the projection image I3 is Q3.
And step S203, correcting the motor parameters to obtain target motor parameters of the motor.
In consideration of the above problems, in the motor driving, due to the acceleration time, the deceleration time and the return error in the motor driving process, when the motor is driven to the position corresponding to the motor parameter corresponding to the maximum definition again after completing one-time running track, the projection device is not in the optimal focusing position, so that the above problems are solved.
Specifically, when a plurality of projection image sequences exist, the motor parameters are corrected according to the motor parameters of the motor corresponding to the maximum definition in each projection image sequence, and the target motor parameters of the motor are obtained. The motor parameters of the motors corresponding to the maximum definition in each projection image sequence are compared, and if the motor parameters of the motors corresponding to the maximum definition in each projection image sequence are the same, the motor parameters are set as target motor parameters; and if the motor parameters of the motors corresponding to the maximum definition in each projection image sequence are not completely the same, correcting the motor parameters according to the average value of the motor parameters of the motors corresponding to the maximum definition in each projection image sequence to obtain target motor parameters of the motors. For example, an average value of motor parameters of the motor corresponding to the maximum sharpness in each projection image sequence is set as a target motor parameter of the motor.
When a projection image sequence exists, a driving error corresponding to the motor is obtained, and the motor parameter corresponding to the motor with the maximum definition is corrected according to the driving error corresponding to the motor, so that the target motor parameter of the motor is obtained. The driving error comprises acceleration time, deceleration time and return error in the motor driving process; in some embodiments of the present invention, correcting the motor parameter of the motor corresponding to the maximum definition according to the driving error corresponding to the motor includes: and obtaining the target motor parameter of the motor by adding or subtracting the driving error corresponding to the motor from the motor parameter corresponding to the maximum definition.
Step S204, determining a target position of the motor according to the target motor parameters, and driving the motor to run the target position.
In some embodiments of the present invention, the target position of the motor corresponding to the target motor parameter is the optimal focusing position, and according to the number of motor steps or the running time in the target motor parameter, the motor runs according to the number of motor steps or the running time in the target motor parameter, so as to drive the projection module 301 to reach the optimal focusing position, and complete focusing of the projection device.
According to the embodiment of the invention, the accuracy of the target motor parameters is further improved by correcting the motor parameters, the accuracy of the focusing position is improved, and the accurate focusing is realized, and the embodiment of the invention can directly determine the target motor parameters corresponding to the optimal focusing position according to the definition of the image without adopting an additional distance measuring device, so that the focusing accuracy can be improved, and compared with the prior art, the method and the device have the advantages of less quantity of the shot images, shorter focusing time and higher focusing efficiency.
In some embodiments of the present invention, in step S201, the motor is controlled to move, and the camera 303 acquires the projection image of the projection device during the movement of the motor of the projection device, so as to obtain a projection image sequence. The projection image sequence acquisition step specifically comprises the following steps:
(1) And controlling the motor to move in a preset direction, and controlling the projection equipment to project the image to be displayed in the moving process of the motor.
(2) And acquiring images to be displayed projected by the projection equipment according to a preset time interval or a preset step number interval to obtain a projection image sequence.
In some embodiments of the present invention, as shown in fig. 3, the projection device includes a control module 305, wherein the control module 305 is used to control the motor drive, the projection of the projection module 301, and the shooting of the camera 303.
In some embodiments of the present invention, the control module 305 controls the motor to drive, under the motor drive, the projection module 301 is controlled to project images onto a wall or a curtain while moving according to a preset moving track, and the camera 303 is controlled to shoot and record the projected images with different definition in the driving process frame by frame at preset time intervals or preset step intervals, so as to form a plurality of projected images, and obtain a projected image sequence. Wherein the preset number of steps may be the number of steps of the motor.
In some embodiments of the present invention, during or after the acquisition of the projection image sequence, the definition detection is performed on each projection image in the projection image sequence, so as to obtain a definition sequence corresponding to the projection image sequence, the fitting is performed according to the definition sequence determination, definition fitting data is obtained, and according to the definition fitting data, the motor parameter of the motor when the projection image of the projection device is obtained as the maximum definition is determined. Specifically, the motor parameter determination method includes steps a1 to a4:
and a1, detecting the definition of each projection image in the projection image sequence to obtain the definition corresponding to each projection image.
In some embodiments of the present invention, considering that different deployment environments and environmental illumination of a projection device have an influence on image sharpness, in order to reduce the influence of the deployment environments and the environmental illumination on sharpness obtained by detection in sharpness detection, the embodiments of the present invention respectively perform sharpness detection on each projection image by using a plurality of sharpness detection methods, and obtain sharpness corresponding to each projection image according to initial sharpness of each projection image under various sharpness detection methods, where the sharpness detection method specifically includes:
(1) And respectively carrying out definition detection on each projection image in the projection image sequence through a plurality of preset definition detection models to obtain the initial definition of the projection image under each definition detection model.
(2) And carrying out weighted average processing on the initial definition of the projection image under each definition detection model to obtain the definition corresponding to the projection image.
The preset multiple definition detection models include, but are not limited to, an image Laplace variance model, an image Sobel metric model, an image gray variance and mean model, an image custom template filter mean model and the like. For each projection image, the definition detection can be performed on the projection image through the image Laplace variance model, the image Sobel metric model, the image gray variance and mean model and the image custom template filter mean model to obtain the initial definition of the projection image under each definition detection model, and the weighted average processing is performed on the initial definition of the projection image under each definition detection model to obtain the definition corresponding to the projection image. It should be noted that, the method for setting the weight corresponding to each definition detection model in the weighted average processing is not limited, for example, the weighted average processing may be performed according to the initial definition of the projection image under each definition detection model and the preset weight corresponding to each definition detection model, so as to obtain the definition corresponding to the projection image; the contrast, brightness, exposure value or gamma value of the projection image can be detected, preset weight data is queried according to illumination parameters of the projection image, weights corresponding to the definition detection models are obtained, and weighted average processing is carried out according to the initial definition of the projection image under the definition detection models and the weights corresponding to the definition detection models, so that the definition corresponding to the projection image is obtained. The illumination parameters comprise contrast, brightness, exposure value or gamma value, and the weight data comprise various illumination parameters and weights of the definition detection models corresponding to the illumination parameters.
And a2, determining and obtaining a target definition sequence according to the definition corresponding to each projection image.
The target definition sequence may be a definition sequence corresponding to the projection image sequence, or may be a sequence composed of a preset number of definitions selected from the definition sequences corresponding to the projection image sequence.
In some embodiments of the present invention, in order to reduce the data amount in the target definition sequence and reduce the subsequent calculation amount, a preset number of candidate definition values adjacent to the maximum value may be selected from the definition sequences corresponding to the projection image sequences by determining the maximum value in the definition sequences corresponding to the projection image sequences, and the selected candidate definition values and the maximum value are summarized to obtain the target definition sequence, and specifically, the method for obtaining the target definition sequence includes:
(1) And obtaining a definition sequence corresponding to the projection image sequence according to the definition corresponding to each projection image.
(2) Determining target definition in the definition sequence, and selecting candidate definition adjacent to the target definition from the definition sequence according to the preset sequence number.
(3) And obtaining a target definition sequence according to the target definition and the selected candidate definition.
Wherein the target sharpness in the sharpness sequence may be a sharpness maximum in the sharpness sequence.
In some embodiments of the present invention, the preset number of sequences may be set according to the number of images in the projection image sequence, for example, the preset number of sequences may be obtained by using the number of images/C in the projection image sequence, where C is a constant, and an exemplary value of C may be 5, that is, the number of images/5 in the projection image sequence is set as the preset number of sequences.
In some embodiments of the present invention, selecting candidate sharpness values adjacent to the target sharpness from the sharpness sequence according to a preset number of sequences includes: and determining the first sequence number and the second sequence number according to the preset sequence number, selecting a first candidate definition value adjacent to the target definition from the definition sequences according to the first sequence number, and selecting a second candidate definition value adjacent to the target definition from the definition sequences according to the second sequence number. The first number of sequences may be a preset number of sequences/2, and the second number of sequences may be a difference between the preset number of sequences and the first number of sequences.
In some embodiments of the present invention, obtaining the target sharpness sequence according to the target sharpness and the selected candidate sharpness values includes: and sequencing the target definition and the selected candidate definition values according to the sequence from the large value to the small value or the sequence from the small value to the large value to obtain a target definition sequence.
In some embodiments of the present invention, obtaining the target sharpness sequence according to the target sharpness and the selected candidate sharpness values includes: and sorting the maximum value and the selected candidate definition value according to the relation from near to far of the position according to the position of the projection image corresponding to the target definition in the projection image sequence and the position of the projection image in which the selected candidate definition value is positioned in the projection image sequence, so as to obtain the target definition sequence. Where the position may be the image number of the projection image in the sequence of projection images.
And a3, fitting according to the target definition sequence to obtain definition fitting data.
In some embodiments of the present invention, in order to ensure that the motor parameter is a motor parameter that moves to an optimal focusing position, a second fitting is performed on the target definition sequence to obtain definition fitting data, where the definition fitting data characterizes a mapping relationship between each target definition and a time parameter corresponding to the target definition, and/or a mapping relationship between each target definition and a motor step number corresponding to the target definition.
In some embodiments of the invention, the quadratic fit may be a quadratic curve fit to obtain sharpness fit data for the presence of peaks.
And a4, determining and obtaining motor parameters corresponding to the peak definition according to the definition fitting data.
In some embodiments of the present invention, a peak value in the definition fitting data is determined according to the definition fitting data, the peak value is set as a peak value definition, and according to a mapping relationship between each target definition and a time parameter corresponding to the target definition and/or a mapping relationship between each target definition and a motor step number corresponding to the target definition, the time parameter corresponding to the peak value definition and/or the motor step number corresponding to the peak value definition are obtained, and the time parameter corresponding to the peak value definition and/or the motor step number corresponding to the peak value definition are set as motor parameters corresponding to the peak value definition.
In the embodiment of the invention, the target definition sequence is obtained by selecting the candidate definition values adjacent to the target definition value, the calculation efficiency of the automatic focusing method of the projection equipment is improved, the peak definition and the motor parameters corresponding to the peak definition are obtained by fitting the target definition sequence, a small amount of image definition data can be used for obtaining the peak definition by fitting, and the calculation efficiency of the automatic focusing method of the projection equipment is further improved.
In some embodiments of the present invention, after obtaining a motor parameter corresponding to a peak value definition, in order to further improve focusing accuracy of a projection device, by obtaining calibration data of a motor, correcting the motor parameter corresponding to the peak value definition according to the calibration data of the motor, to obtain a target motor parameter of the motor, and specifically, a method for correcting the motor parameter includes:
(1) And acquiring calibration data of the motor.
The calibration data comprise the speed adjustment time and return error of the motor;
(2) And correcting the time parameter in the motor parameters according to the speed adjustment time to obtain target motor parameters, or correcting the motor steps in the motor parameters according to the return error to obtain target motor parameters.
In some embodiments of the invention, to ensure that the motor can move to the best focus position after restarting, the motor parameters corresponding to the peak sharpness are corrected by the speed adjustment time and the return error of the motor.
In some embodiments of the present invention, an actual target time parameter may be obtained by calculating a sum between the speed adjustment time and a time parameter of the motor parameters, and the actual target time parameter is set as a target motor parameter; and obtaining the actual target motor step number by calculating the sum of the return error and the motor step number in the motor parameters, and setting the actual target motor step number as the target motor parameter.
In some embodiments of the present invention, after obtaining the target motor parameter, the driving motor moves to a position corresponding to the target motor parameter according to the step in step S204, so as to implement auto-focusing of the projection device.
According to the automatic focusing method of the projection equipment, provided by the embodiment of the invention, the projection image sequence of the projection equipment is obtained in the moving process of the motor of the projection equipment; according to the definition of each projection image in the projection image sequence, determining and obtaining motor parameters of a motor corresponding to the maximum definition; correcting the motor parameters to obtain target motor parameters of the motor; the target position of the motor is determined according to the target motor parameters, and the motor is driven to run to the target position, so that the accuracy of the target motor parameters is further improved by correcting the motor parameters, the accuracy of the focusing position is improved, the accurate focusing is realized, and the optimal focusing position is determined according to the image definition.
Based on the same inventive concept, please refer to fig. 4 in combination, the embodiment of the present invention further provides an auto-focusing apparatus 10 of a projection device, which is applied to the projection device shown in fig. 1, wherein each functional module of the auto-focusing apparatus 10 of a shadow device provided in the embodiment of the present invention may be stored in a memory of a computer device in a form of software or firmware (firmware), and as shown in fig. 4, the auto-focusing apparatus 10 of the shadow device includes an acquisition module 11, a definition detection module 12, a correction module 13 and a driving module 14.
The acquisition module 11 is used for acquiring a projection image sequence of the projection equipment in the moving process of the motor of the projection equipment;
the definition detection module 12 is configured to determine, according to the definition of each projection image in the sequence of projection images, a motor parameter of the motor when the projection image of the projection device is the maximum definition;
the correction module 13 is used for correcting the motor parameters to obtain target motor parameters;
and the driving module 14 is used for determining a target position of the motor according to the target motor parameters and driving the motor to run to the target position.
In some embodiments of the present invention, the sharpness detection module 12 includes:
the definition detection unit is used for carrying out definition detection on each projection image in the projection image sequence to obtain the definition corresponding to each projection image;
the definition processing unit is used for determining and obtaining a target definition sequence according to the definition corresponding to each projection image;
the fitting unit is used for fitting the target definition sequence to obtain definition fitting data;
and the parameter determining unit is used for determining motor parameters of the motor when the projection image of the projection equipment is obtained to be the maximum definition according to the definition fitting data.
In some embodiments of the invention, the sharpness processing unit is configured to:
obtaining a definition sequence corresponding to the projection image sequence according to the definition corresponding to each projection image;
determining target definition in a definition sequence, and selecting candidate definition adjacent to the target definition from the definition sequence according to the preset sequence number;
and obtaining a target definition sequence according to the target definition and the selected candidate definition.
In some embodiments of the present invention, the sharpness detection unit is configured to:
for each projection image in the projection image sequence, respectively carrying out definition detection on the projection image through a plurality of preset definition detection models to obtain the initial definition of the projection image under each definition detection model;
and carrying out weighted average processing on the initial definition of the projection image under each definition detection model to obtain the definition corresponding to the projection image.
In some embodiments of the present invention, the fitting unit is configured to perform a second fitting on the target sharpness sequence to obtain sharpness fitting data; the definition fitting data represents the mapping relation between each target definition and the time parameter corresponding to the target definition and/or the mapping relation between each target definition and the motor step number corresponding to the target definition;
The parameter determining unit is used for determining a time parameter and/or a motor step number corresponding to the peak value definition according to the definition data; and determining a time parameter corresponding to the peak definition and/or a motor parameter of the motor when the step number of the motor is the maximum definition of the projection image of the projection equipment.
In some embodiments of the invention, the correction module 13 is configured to:
acquiring calibration data of the motor, wherein the calibration data comprises speed adjustment time and return error of the motor;
and correcting the time parameter in the motor parameters according to the speed adjustment time to obtain target motor parameters, or correcting the motor steps in the motor parameters according to the return error to obtain target motor parameters.
In some embodiments of the present invention, the acquisition module 11 is configured to:
controlling the motor to move in a preset direction, and controlling the projection equipment to project an image to be displayed in the moving process of the motor;
and acquiring images to be displayed projected by the projection equipment according to a preset time interval or a preset step number interval to obtain a projection image sequence.
According to the automatic focusing device of the projection equipment, the motor parameters are corrected, so that the accuracy of target motor parameters is further improved, the accuracy of focusing positions is improved, accurate focusing is realized, and the optimal focusing position is determined through image definition.
It will be clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the image processing apparatus described above may participate in the corresponding process in the foregoing method, and will not be described in detail herein.
On the basis of the above, an embodiment of the present invention provides a projection device, where the projection device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the auto-focusing method of the projection device described in any one of the foregoing embodiments.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method for the specific working process of the projection apparatus described above, and thus, redundant description is omitted herein.
On the basis of the above, an embodiment of the present invention provides a storage medium storing a computer program which, when executed by a processor, implements the auto-focusing method of the projection device of any one of the foregoing embodiments.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to corresponding processes in the foregoing method for specific working processes of the storage medium, and thus, redundant description is not necessary.
In summary, the automatic focusing method, device, equipment and storage medium of the projection equipment provided by the embodiment of the invention further improve the accuracy of the target motor parameter by correcting the motor parameter, improve the accuracy of the focusing position, realize accurate focusing, and determine the optimal focusing position through image definition.
The above description is merely illustrative of various embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think about variations or substitutions within the scope of the present invention, and the invention is intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An auto-focus method of a projection device, the method comprising:
acquiring a projection image sequence of a motor of a projection device in a driving process;
according to the definition of each projection image in the projection image sequence, determining the motor parameters of the motor when the projection image of the projection equipment is the maximum definition;
Correcting the motor parameters to obtain target motor parameters of the motor;
and determining a target position of the motor according to the target motor parameter, and driving the motor to run to the target position.
2. The method for auto-focusing a projection device according to claim 1, wherein determining the motor parameter of the motor when the projected image of the projection device is the maximum sharpness according to the sharpness of each projected image in the sequence of projected images comprises:
performing definition detection on each projection image in the projection image sequence to obtain definition corresponding to each projection image;
determining and obtaining a target definition sequence according to the definition corresponding to each projection image;
fitting the target definition sequence to obtain definition fitting data;
and determining motor parameters of the motor when the projection image of the projection equipment is obtained to be the maximum definition according to the definition fitting data.
3. The method for auto-focusing a projection device according to claim 2, wherein determining a target sharpness sequence according to the sharpness corresponding to each of the projection images comprises:
Obtaining a definition sequence corresponding to the projection image sequence according to the definition corresponding to each projection image;
determining target definition in the definition sequence, and selecting candidate definition adjacent to the target definition from the definition sequence according to the preset sequence number;
and obtaining a target definition sequence according to the target definition and the selected candidate definition.
4. The method of claim 2, wherein performing sharpness detection on each of the projection images in the sequence of projection images to obtain sharpness corresponding to each of the projection images comprises:
for each projection image in the projection image sequence, respectively carrying out definition detection on the projection image through a plurality of preset definition detection models to obtain the initial definition of the projection image under each definition detection model;
and carrying out weighted average processing on the initial definition of the projection image under each definition detection model to obtain the definition corresponding to the projection image.
5. The method of auto-focusing a projection device according to claim 2, wherein said fitting according to the target sharpness sequence to obtain sharpness fitting data comprises:
Performing secondary fitting on the target definition sequence to obtain definition fitting data; the definition fitting data represents a mapping relation between each target definition and a time parameter corresponding to the target definition, and/or a mapping relation between each target definition and a motor step number corresponding to the target definition.
And determining motor parameters of the motor when the projected image of the projection equipment is the maximum definition according to the definition fitting data comprises the following steps:
according to the definition data, determining a time parameter and/or a motor step number corresponding to the peak definition;
and determining the time parameter corresponding to the peak definition and/or the motor parameter of the motor when the number of motor steps is the maximum definition of the projection image of the projection equipment.
6. The method of claim 1, wherein the modifying the motor parameter to obtain a target motor parameter comprises:
acquiring calibration data of the motor, wherein the calibration data comprises speed adjustment time and return error of the motor;
and correcting the time parameter in the motor parameters according to the speed adjustment time to obtain target motor parameters, or correcting the motor steps in the motor parameters according to the return error to obtain target motor parameters.
7. The auto-focusing method of a projection device according to any one of claims 1 to 6, wherein the acquiring a sequence of projection images of the projection device during driving of the motor of the projection device comprises:
controlling the motor to move in a preset direction, and controlling the projection equipment to project an image to be displayed in the moving process of the motor;
and acquiring images to be displayed projected by the projection equipment according to a preset time interval or a preset step number interval to obtain a projection image sequence.
8. An autofocus device for a projection apparatus, the device comprising:
the acquisition module is used for acquiring a projection image sequence of the projection equipment in the moving process of the motor of the projection equipment;
the definition detection module is used for determining motor parameters of the motor when the projection image of the projection equipment is obtained to be the maximum definition according to the definition of each projection image in the projection image sequence;
the correction module is used for correcting the motor parameters to obtain target motor parameters;
and the driving module is used for determining and obtaining the target position of the motor according to the target motor parameter and driving the motor to run to the target position.
9. A projection device, the projection device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the operation in the auto-focusing method of the projection device according to any one of claims 1 to 7.
10. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the auto focus method of the projection device of any one of claims 1 to 7.
CN202210933525.5A 2022-08-04 2022-08-04 Automatic focusing method, device, equipment and storage medium of projection equipment Pending CN117560475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210933525.5A CN117560475A (en) 2022-08-04 2022-08-04 Automatic focusing method, device, equipment and storage medium of projection equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210933525.5A CN117560475A (en) 2022-08-04 2022-08-04 Automatic focusing method, device, equipment and storage medium of projection equipment

Publications (1)

Publication Number Publication Date
CN117560475A true CN117560475A (en) 2024-02-13

Family

ID=89815320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210933525.5A Pending CN117560475A (en) 2022-08-04 2022-08-04 Automatic focusing method, device, equipment and storage medium of projection equipment

Country Status (1)

Country Link
CN (1) CN117560475A (en)

Similar Documents

Publication Publication Date Title
CN106707674B (en) Automatic focusing method of projection equipment and projection equipment
US10698308B2 (en) Ranging method, automatic focusing method and device
TWI515470B (en) Auto-focus system for multiple lens and method thereof
JP2017161586A (en) Image shake correction device and method of controlling image shake correction device, imaging device, program, and storage medium
JP6447840B2 (en) Image device, method for automatic focusing in an image device, and corresponding computer program
CN111050151B (en) Projection focusing method and device, projector and readable storage medium
EP3557530A1 (en) Calibration system and method
CN113301314B (en) Focusing method, projector, imaging apparatus, and storage medium
JP2019078843A5 (en)
JP2013101305A (en) Focus adjustment device and control method for focus adjustment device
JP2020046637A (en) Control device, image capturing device, control method, and program
JP2018004918A5 (en)
JP2016116008A (en) Imaging apparatus, control method and program of imaging direction
CN113596421B (en) Thermal defocus compensation method, storage medium and projection equipment
CN110300252B (en) Lens inclination correction method and device
CN112734759B (en) Method and device for determining trigger point of flying shooting
JPH04277728A (en) Vibration-proof device for camera
CN112598719B (en) Depth imaging system, calibration method thereof, depth imaging method and storage medium
JP2017079466A (en) Method and device for setting focus of camera
CN117560475A (en) Automatic focusing method, device, equipment and storage medium of projection equipment
JP2001066112A (en) Image measuring method and device
JP6702737B2 (en) Image blur correction apparatus and method for controlling image blur correction apparatus
JP6602089B2 (en) Image processing apparatus and control method thereof
JP2019197295A (en) Image processing device, image processing method, and program
CN114383812B (en) Sensor stability detection method and device, electronic equipment and medium

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