A focusing method, device, apparatus and computer storage medium
By accelerating the processing of the projector's initial image and performing sharpness comparison analysis using the SIMD architecture, the problem of long autofocus time in projectors is solved, achieving a fast and clear focusing effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU XGIMI TECH CO LTD
- Filing Date
- 2022-03-25
- Publication Date
- 2026-07-03
AI Technical Summary
Existing autofocus solutions for projectors suffer from excessively long focusing times and poor user experience, especially due to factors such as assembly errors in production lines, environmental interference, and thermal expansion and contraction of lenses.
The initial image captured by the camera is accelerated using a single instruction multiple data (SIMD) architecture. By comparing and analyzing the sharpness of the target image with the previous frame, the focusing motor is operated to achieve automatic focusing.
It improves focus clarity and enables fast focusing of the device, reduces focusing time, and enhances the user experience.
Smart Images

Figure CN116866536B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic device focusing technology, and in particular to a focusing method, apparatus, device, and computer storage medium. Background Technology
[0002] With the continuous development of projector technology, people have increasingly higher requirements for the focusing function of projectors. Among them, the traditional manual focus solution can no longer meet users' needs for convenient focusing, which is the most important function of projectors.
[0003] While autofocus solutions already exist in related technologies—for example, projectors commonly use depth cameras or sensors such as lasers, infrared, and acoustic waves to measure distance and then use the relationship between the projector's sharpness curve and distance to achieve autofocus; or they can analyze images to achieve autofocus—these solutions all have drawbacks, resulting in excessively long focusing times and a reduced user experience. Summary of the Invention
[0004] This application proposes a focusing method, apparatus, device, and computer storage medium that can accelerate the processing of an initial image using a SIMD architecture, thereby enabling the device to focus quickly.
[0005] To achieve the above objectives, the technical solution of this application is implemented as follows:
[0006] In a first aspect, embodiments of this application provide a focusing method, the method comprising:
[0007] Acquire the initial image captured by the camera;
[0008] The initial image is accelerated using a single instruction multiple data (SIMD) architecture to obtain the target image corresponding to the initial image;
[0009] A sharpness comparison analysis is performed between the target image and the target image of the previous frame to obtain the sharpness change trend. The focusing motor is operated according to the sharpness change trend to achieve automatic focusing of the device to be focused.
[0010] Secondly, embodiments of this application provide a focusing device, which includes an acquisition unit, a processing unit, and a focusing unit; wherein...
[0011] The acquisition unit is configured to acquire the initial image captured by the camera in the device to be focused;
[0012] The processing unit is configured to preprocess the initial image to obtain a binary image corresponding to the initial image;
[0013] The focusing unit is configured to perform a sharpness comparison analysis between the target image and the target image of the previous frame to obtain the sharpness change trend, and operate the focusing motor according to the sharpness change trend to achieve automatic focusing of the device to be focused.
[0014] Thirdly, embodiments of this application provide an electronic device, which includes a memory and a processor; wherein,
[0015] The memory is used to store computer programs that can run on the processor;
[0016] The processor is configured to execute the method as described in the first aspect when running the computer program.
[0017] Fourthly, embodiments of this application provide a computer storage medium storing a computer program that, when executed by at least one processor, implements the method described in the first aspect.
[0018] This application provides a focusing method, apparatus, device, and computer storage medium that acquires an initial image captured by a camera in a device to be focused; accelerates the initial image processing based on a Single Instruction Multiple Data (SIMD) architecture to obtain a target image corresponding to the initial image; performs a sharpness comparison analysis between the target image and the target image of the previous frame to obtain a sharpness change trend; and operates the focusing motor according to the sharpness change trend to achieve automatic focusing of the device. In this way, by using a SIMD architecture to accelerate the processing of the initial image captured by the camera and then operating the focusing motor according to the obtained sharpness change trend, not only is the focusing sharpness improved, but also rapid focusing of the device is achieved. Attached Figure Description
[0019] Figure 1 A schematic flowchart of a focusing method provided in an embodiment of this application;
[0020] Figure 2 A schematic diagram illustrating the relationship between image clarity and motor steps is provided for an embodiment of this application.
[0021] Figure 3 A detailed flowchart illustrating a focusing method provided in this application embodiment;
[0022] Figure 4 A detailed flowchart illustrating an image decoding method provided in this application embodiment;
[0023] Figure 5 A detailed flowchart illustrating an image binarization method provided in this application embodiment;
[0024] Figure 6A detailed flowchart illustrating a three-stage focusing method provided in this application embodiment.
[0025] Figure 7 This is a schematic diagram of the composition structure of a focusing device provided in an embodiment of this application;
[0026] Figure 8 This is a schematic diagram of the specific hardware structure of an electronic device provided in an embodiment of this application;
[0027] Figure 9 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0028] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0030] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first, second, third" used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0031] Understandably, with the rapid development of projector technology, home projectors have begun to enter thousands of households. As the most important focusing function of projectors, the traditional manual focus solution can no longer meet users' needs for convenient focusing functions.
[0032] Specifically, the autofocus solution commonly used in projectors currently on the market employs distance measurement using depth cameras or sensors such as lasers, infrared, and acoustic waves, for example, the Time of Flight (TOF) method. It then uses the relationship between the projector's sharpness curve and distance to achieve autofocus. However, this focusing solution is susceptible to factors such as assembly errors in the production line, environmental interference, lens thermal expansion and contraction, and side projection, often resulting in unclear focus or misjudgment. To address this issue, a focusing solution has emerged that achieves focus through image analysis. However, most of these solutions have been abandoned due to significant performance degradation and excessively long focusing times, negatively impacting the user experience.
[0033] Based on this, this application proposes a focusing method. The basic idea of this method is as follows: acquire an initial image captured by a camera in the device to be focused; accelerate the processing of the initial image based on a Single Instruction Multiple Data (SIMD) architecture to obtain a target image corresponding to the initial image; perform a sharpness comparison analysis between the target image and the target image of the previous frame to obtain a sharpness change trend; and operate the focusing motor according to the sharpness change trend to achieve automatic focusing of the device. In this way, by using the SIMD architecture to accelerate the processing of the initial image captured by the camera, and then operating the focusing motor according to the obtained sharpness change trend, not only is the focusing sharpness improved, but also the device's fast focusing is achieved.
[0034] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0035] Example 1
[0036] In one embodiment of this application, see [link to embodiment]. Figure 1 This illustrates a flowchart of a focusing method provided in an embodiment of this application. Figure 1 As shown, the method may include:
[0037] S101: Acquire the initial image captured by the camera.
[0038] It should be noted that the focusing method provided in this application embodiment can be applied to devices that need to be focused, or electronic devices that integrate such devices. Here, the electronic device is the device to be focused, which can be such as a projector, digital camera, camcorder, mobile phone, laptop, handheld computer, personal digital assistant (PDA), wearable device, etc. This application embodiment does not specifically limit it in this regard.
[0039] It should also be noted that the embodiments of this application can be applied to any operating system that requires fast focusing. The operating system can include various operating systems, such as Android, iOS, UNIX, etc., without any additional limitations. In addition, the operating system kernel here can be various suitable operating system kernels, such as monolithic kernels, dual kernels, microkernels, hybrid kernels, but the embodiments of this application are not limited to these.
[0040] It should also be noted that the device to be focused can include a camera. The initial image can be taken by the camera before focusing begins, or it can be a new image taken each time the camera performs a focusing process. The focusing process of the device to be focused is then performed by analyzing the changes in sharpness of different initial images.
[0041] S102: Accelerate the processing of the initial image based on the Single Instruction Multiple Data (SIMD) architecture to obtain the target image corresponding to the initial image.
[0042] It's important to note that Single Instruction Multiple Data (SIMD) is a technique that uses a single controller to manage multiple processors, simultaneously performing the same operation on each element of a set of data (also known as a "data vector") to achieve spatial parallelism. It is particularly suitable for data-intensive computations. Specifically, SIMD is a parallel processing technique where "one instruction processes multiple data items (typically exponential numbers to the base 2)," significantly increasing processing speed compared to "one instruction processing one data item." NEON is an ARM technology based on the SIMD concept. Compared to ARMv6 or earlier architectures, NEON combines 64-bit and 128-bit SIMD instruction sets, providing 128-bit wide vector operations.
[0043] It should also be noted that the accelerated processing can include decoding and binarization. Specifically, the initial image is first decoded to obtain a decoded image, and then the decoded image is binarized to obtain the target image. This accelerated processing can be performed on the Graphics Processing Unit (GPU), thus reducing the computational load on the Central Processing Unit (CPU). In other words, this embodiment utilizes the GPU and the NEON technology of the SIMD extended architecture to accelerate the initial image decoding and image binarization processes.
[0044] In some embodiments, for S102, the step of accelerating the initial image based on the SIMD architecture to obtain the target image corresponding to the initial image may include:
[0045] The initial image is decoded to obtain a decoded image;
[0046] The decoded image is processed into grayscale based on the SIMD architecture to obtain the target image. It should be noted that during the accelerated decoding process, the output memory needs to be initialized first, and its distribution needs to be read. Based on the output memory distribution, the output memory address is converted into a non-cached virtual address, and then the initial image is decoded according to the decoding parameters.
[0047] Specifically, in some embodiments, the focusing device includes a graphics processor, and the decoding process of the initial image to obtain a decoded image may include:
[0048] Create an image decoding buffer area;
[0049] In the image decoding buffer area, the graphics processor is invoked to decode the initial image;
[0050] If the decoding is successful and the number of decoding attempts is less than the preset number, the decoded image is output.
[0051] It should be noted that, in order to improve decoding speed and save CPU performance, the GPU is used to decode the initial image. This can fully utilize the inherent advantages of the GPU chip in image and graphics-related operations without consuming CPU resources, and achieve decoding quickly.
[0052] It should also be noted that the output memory is first initialized and its distribution is read. Based on the output memory distribution, the output memory address is converted into a non-cached virtual address. Then, specific decoding parameters are set and an image processing cache is created. Finally, the GPU is called through the decoding application programming interface (API) to decode the initial image according to the decoding parameters.
[0053] It should also be noted that if decoding fails or the number of decoding attempts exceeds the preset number, a decoding failure result can be returned and the decoding process of the initial image can be exited; then the initial image can be reacquired and the decoding can be performed again. The preset number of attempts is set in advance based on experimental data. For example, the preset number of attempts can be set to 2.
[0054] Furthermore, in some embodiments, the grayscale processing of the decoded image based on the SIMD architecture to obtain the target image may include:
[0055] The decoded image is divided into pixel groups to obtain N pixel groups; where each pixel group includes several pixels, and N is an integer greater than zero.
[0056] The target image is obtained by extracting target components from the N pixel groups based on the SIMD architecture.
[0057] It should be noted that the purpose of grouping pixels in the decoded image is to perform single-instruction multiple-data-structure processing on the decoded image. This allows processing of one group of pixels at a time or multiple groups of pixels simultaneously, enabling parallel processing of the decoded image and thus accelerating the image processing process.
[0058] It should also be noted that the target component can be the Y component. The decoded image is analyzed and processed to extract the required Y component and generate the target image (i.e., grayscale image).
[0059] Specifically, in some embodiments, the step of extracting target components from the N pixel groups based on the SIMD architecture to obtain the target image may include:
[0060] Get several pixels corresponding to the i-th pixel group;
[0061] The target component corresponding to each pixel in the i-th pixel group is stored in the preset vector register;
[0062] Fill the target component corresponding to each pixel in the i-th pixel group into a preset matrix;
[0063] If i is less than or equal to N-1, then increment i by 1 and return to the step of obtaining the number of pixels corresponding to the i-th pixel group;
[0064] If i equals N, then the target image is obtained according to the preset matrix.
[0065] Set the initial value of i to 1.
[0066] For example, 300,000 pixels can be grouped into groups of 16 pixels each. One or more groups of pixels can be processed at a time. 16 or multiples of 16 pixels can be loaded. Taking loading 16 pixels as an example, the Y component of the pixel can be stored in a 128-bit vector register, and a preset matrix filled with the Y component can be output. The target image can be obtained based on the preset matrix.
[0067] S103: Perform a sharpness comparison analysis between the target image and the target image of the previous frame to obtain the sharpness change trend, and operate the focus motor according to the sharpness change trend to achieve automatic focusing of the device to be focused.
[0068] It should be noted that, in the embodiments of this application, to achieve the focusing process of the focusing device, the above steps need to be repeated until the image clarity displayed by the focusing device reaches the target effect. Specifically, each time the focusing motor is operated, the latest initial image needs to be acquired again, and the initial image needs to be decoded and binarized to obtain the target image. The clarity change trend between the target image and the previous frame target image is analyzed. Based on the clarity change trend of the two target images, the adjustment scheme of the focusing motor is determined until the latest target image reaches the target clarity, thus achieving the focusing process of the device to be focused.
[0069] In some embodiments, the step of performing a sharpness comparison analysis between the target image and the target image of the previous frame to obtain a sharpness change trend may include:
[0070] Determine the sharpness value of the target image;
[0071] The sharpness value of the target image is compared with the sharpness value of the target image in the previous frame to obtain the sharpness change trend.
[0072] It should be noted that each time the focus motor is adjusted, a new target image must be acquired. The comparison of the sharpness value of the target image with the previous frame refers to comparing the sharpness value of the currently acquired target image with the sharpness value of the target image acquired before the current focus motor adjustment. The target image acquired before the current focus motor adjustment is obtained by accelerating the processing of the initial image acquired before the current focus motor adjustment.
[0073] In some embodiments, determining the sharpness value of the target image may include:
[0074] Obtain the grayscale value corresponding to each pixel in the target image;
[0075] The grayscale value corresponding to each pixel in the target image is multiplied using a preset function to obtain the intermediate value corresponding to each pixel in the target image;
[0076] The sharpness value of the target image is obtained by cumulatively calculating the intermediate value corresponding to each pixel in the target image pixel by pixel.
[0077] It should be noted that the preset function can specifically use the gray-scale variance product (SMD2) evaluation function, which multiplies the two gray levels in the neighborhood of each pixel in each image to obtain the sharpness value of each pixel. Then, the sharpness values corresponding to each pixel in the target image are accumulated to obtain the sharpness value of the target image.
[0078] In some embodiments, for S103, operating the focus motor according to the sharpness change trend to achieve autofocus of the device to be focused may include:
[0079] Based on the sharpness change trend and the target motor steps, the focusing motor is adjusted to the position corresponding to the target sharp point; wherein, the target motor steps include: a first motor step, a second motor step, and a third motor step; the second motor step is equal to the product of the first motor step and a first constant value, and the third motor step is equal to the product of the first motor step and a second constant value.
[0080] It should be noted that, see Figure 2 It shows a schematic diagram illustrating the relationship between image clarity and motor steps. For example... Figure 2 As shown, the sharpness curve of the device to be focused is an approximate 'Gaussian distribution' curve. Taking the projector optical engine as an example, the horizontal direction represents the motor steps 'a', and the vertical direction represents the projector optical engine sharpness 'S'. The better the curve approximation, the better the design and manufacturing level of the optical mechanism. The position corresponding to the peak of the curve is the position of the sharp point of the target under projection at the current distance.
[0081] It should also be noted that a three-stage focusing algorithm can be used to determine the location of the target point in focus. This algorithm requires determining three different motor steps. For example, the first stage's motor steps can be obtained by dividing the minimum rotation angle of the optical engine output of the device being focused by the actual step angle. The second stage's motor steps can be twice the first stage's, and the third stage's motor steps can be three times the first stage's. In this way, after focusing, the sharpness of the device being focused can reach its theoretically optimal state.
[0082] Specifically, in some embodiments, for S103, adjusting the focus motor to the position corresponding to the target sharp point based on the sharpness change trend and the target motor steps may include:
[0083] Control the focusing motor to move the third motor forward by a number of steps;
[0084] If the focusing motor reaches the end position, it is determined whether the sharpness change trend has continuously decreased for the third adjustment.
[0085] If the sharpness change trend continues to decrease after the third adjustment, then control the focusing motor to turn and move a first preset number of steps, and control the focusing motor to continue moving forward a second number of motor steps;
[0086] Determine whether the sharpness change trend is continuously decreasing after the second adjustment;
[0087] If the sharpness change trend continues to decrease after the second adjustment, then control the focusing motor to turn and move a first preset number of steps, and control the focusing motor to continue moving forward by the first motor step;
[0088] Determine whether the sharpness change trend is continuously decreasing after the first adjustment;
[0089] If the sharpness change trend continues to decrease after the first adjustment number, then the focusing motor is controlled to turn and move a first preset number of steps, and the focusing motor is controlled to continue moving forward as a product of the first motor steps and the first adjustment number, so as to reach the position corresponding to the target sharp point.
[0090] It should be noted that after controlling the focusing motor to move forward by the third motor step, it is necessary to determine whether the focusing motor has reached the endpoint. If the endpoint has been reached, the focusing motor is turned around, and the process returns to the step of moving the focusing motor forward by the third motor step.
[0091] It should also be noted that the first number of adjustments corresponds to the first motor step, the second number of adjustments corresponds to the second motor step, and the third number of adjustments corresponds to the third motor step. The first preset number of steps is the system error of the device to be focused.
[0092] It should also be noted that the method for determining the first preset number of steps can be as follows: The system error of the focusing equipment can be obtained by randomly selecting N machines and using the maximum number of pulses per second (PPS) supported by the focusing system motor to traverse the entire process, recording the full stroke Sn (n = 0, 1, 2...N) for each machine. Then, the median average filtering method is used to obtain So, and this value is stored in the database of each machine. During the production process, the PPS of the factory motor of each machine is used to traverse the entire process, and the median average filtering method is also used to obtain Io. The difference Sd between Io and So in the database is calculated and stored in the database. This value is the focusing motor system error of that machine.
[0093] In short, this application provides a solution for achieving fast focusing by using a hardware platform to accelerate image processing and combining it with a sharp point positioning algorithm. Specifically, by utilizing the embedded GPU in a System on a Chip (SOC) and NEON technology with a SIMD extended architecture, the initial image decoding and image binarization processes can be accelerated. Combined with a fast and accurate three-stage positioning algorithm, rapid focusing at the projector's current distance can be achieved.
[0094] This embodiment provides a focusing method that involves acquiring an initial image captured by a camera in a device to be focused; accelerating the processing of the initial image based on a SIMD architecture to obtain a target image corresponding to the initial image; performing a sharpness comparison analysis between the target image and the target image of the previous frame to obtain a sharpness change trend; and operating the focusing motor according to the sharpness change trend to achieve automatic focusing of the device. In this way, by using a SIMD architecture to accelerate the processing of the initial image captured by the camera and then operating the focusing motor according to the obtained sharpness change trend, not only is the focusing sharpness improved, but also rapid focusing of the device is achieved.
[0095] Example 2
[0096] Based on the same inventive concept as the foregoing embodiments, see [link to previous document]. Figure 3 This illustrates a detailed flowchart of a focusing method provided in an embodiment of this application. Figure 3 As shown, the method may include:
[0097] S301: Focusing begins;
[0098] S302: Read the initial image captured by the camera;
[0099] It should be noted that while improving image processing speed, the camera needs to have a fast image output capability. Otherwise, after one frame of image is processed, the next frame of image may not be ready yet, causing the image processing task to be blocked and waiting. Therefore, a high frame rate camera module needs to be selected. This solution selects a 30W / 60FPS camera module, which outputs MJPEG format data by default.
[0100] S303: Utilizes the GPU to decode the initial image to obtain the decoded image;
[0101] Regarding the image decoding process, in one specific embodiment, see [link to relevant documentation]. Figure 4 This illustrates a flowchart of an image decoding method provided in an embodiment of this application. Figure 4 As shown, the method may include:
[0102] S401: Read in the initial data from the camera;
[0103] S402: Initialize output memory;
[0104] S403: Read the memory distribution of the output;
[0105] S404: Converts the address of the output memory to an uncached virtual address;
[0106] S405: Set decoding parameters;
[0107] It should be noted that the decoding parameters may include the communication baud rate and the address code.
[0108] S406: Create image processing cache;
[0109] S407: Calls the decoding API and decodes using the GPU;
[0110] S408: Determine if decoding was successful and the number of decoding attempts is less than 2;
[0111] It should be noted that if decoding is successful and the number of decoding attempts is less than 2, it means that decoding is complete, and S409 can be executed; otherwise, it means that decoding has failed, and S401 can be executed.
[0112] S409: Output decoded image.
[0113] It should be noted that in related technologies, OpenCV library functions are generally used for decoding during the initial image decoding process. If no other special processing is done, the CPU will be called to perform image decoding. However, due to the performance limitations of TV chips, the whole process takes a lot of time. Currently, most SOCs have embedded GPU chips. Using the GPU for decoding can make full use of the inherent advantages of GPU chips in image and graphics-related operations without consuming CPU resources, and quickly achieve decoding.
[0114] S304: Binarize the decoded image to obtain the target image;
[0115] It should be noted that binarizing the decoded image means processing the decompressed color image in the previous step into a grayscale image, i.e., a binary image. A binary image means that the grayscale value of any pixel in the image has only two values: 0 and 255, which are black and white, respectively.
[0116] For example, after decompression in the previous step, an image in YUY4:2:2-packed format is obtained, in which the three components Y, U, and V are stored interleaved, and two adjacent Y components share an adjacent set of UV components.
[0117] Table 1
[0118] start+0 <![CDATA[Y’ 00 ]]> <![CDATA[Cb 00 ]]> <![CDATA[Y’ 01 ]]> <![CDATA[Cr 00 ]]> <![CDATA[Y’ 02 ]]> <![CDATA[Cb 01 ]]> <![CDATA[Y’ 03 ]]> <![CDATA[Cr 01 ]]> start+8 <![CDATA[Y’ 10 ]]> <![CDATA[Cb 10 ]]> <![CDATA[Y’ 11 ]]> <![CDATA[Cr 10 ]]> <![CDATA[Y’ 12 ]]> <![CDATA[Cb 11 ]]> <![CDATA[Y’ 13 ]]> <![CDATA[Cr 11 <!-- 7 -->]]> start+16 <![CDATA[Y’ 20 ]]> <![CDATA[Cb 20 ]]> <![CDATA[Y’ 21 ]]> <![CDATA[Cr 20 ]]> <![CDATA[Y’ 22 ]]> <![CDATA[Cb 21 ]]> <![CDATA[Y’ 23 ]]> <![CDATA[Cr 21 ]]> start+24 <![CDATA[Y’ 30 ]]> <![CDATA[Cb 30 ]]> <![CDATA[Y’ 31 ]]> <![CDATA[Cr 30 ]]> <![CDATA[Y’ 32 ]]> <![CDATA[Cb 31 ]]> <![CDATA[Y’ 33 ]]> <![CDATA[Cr 31 ]]>
[0119] As shown in Table 1, for pixels Y`00 and Y`01, their corresponding Cb and Cr values are Cb00 and Cr00, respectively. The YUV values for other pixels follow the same pattern. The meanings of Cb and Cr are equivalent to U (chromaticity) and Y (density). Based on the YUV 4:2:2-packed sampling and arrangement principle described above, an algorithm can be written to directly extract the Y component information of the image and achieve binary conversion.
[0120] It should also be noted that during the extraction of the Y component, the embedded GPU and Cortex of the System on a Chip (SOC) are utilized. TM - NEON (a 128-bit SIMD extension architecture for ARM Cortex-A series processors) technology, which leverages its support for massively parallel computing, accelerates the processing.
[0121] For the image binarization process, in one specific embodiment, see [link to relevant documentation]. Figure 5 This illustrates a detailed flowchart of an image binarization method. Taking a 300,000-pixel image as an example, such as... Figure 5 As shown, the method may include:
[0122] S501: Groups 30W pixels into groups of 16 pixels each;
[0123] S502: Load a group of 16 pixels;
[0124] S503: Allocate a 128-bit vector register to store the Y components of 16 pixels;
[0125] S504: Fill the output matrix with Y components;
[0126] S505: Determine whether the decoded image has been completely extracted.
[0127] It should be noted that, Figure 5 The process shown mainly aims to accelerate image extraction by using an extended SIMD architecture, which leverages its support for massively parallel computing to speed up the binarization process.
[0128] It should also be noted that for S505, if the judgment result is that the image extraction is not complete, it returns to S502 to continue processing the next group of pixels; otherwise, if the judgment result is that the image extraction is complete, it outputs the extraction result and obtains the target image.
[0129] S305: Process the target image to determine whether the image is clear;
[0130] S306: Operate the focusing motor to focus;
[0131] S307: Focusing complete.
[0132] It should be noted that the target image is first analyzed to obtain the trend of the change in sharpness between the target image and the target image in the previous frame, and the image is judged to be clear based on the trend of the change in sharpness.
[0133] It should also be noted that for S305, if the result is that the image is not clear, S306 can be executed, and then return to execute S302 to reread the initial image captured by the camera; if the result is that the image is clear, S307 can be executed, which means that focusing is over.
[0134] Understandably, taking a projector's optical engine as an example, the sharpness curve of the projector's optical engine is an approximate 'Gaussian distribution' curve. The better the approximation of the curve, the better the design and manufacturing level of the optical mechanism. The number of motor steps corresponding to the peak of the curve is the location of the best sharpness point under the current distance projection, where the x-axis direction represents the number of motor steps and the y-axis direction represents the optical engine sharpness.
[0135] Through the grayscale processing in the third step, a binarized image of the current position is obtained. Using the grayscale variance product (SMD2) evaluation function, the two grayscale values of each pixel in each image are multiplied together and then accumulated pixel by pixel, as shown in formula (1):
[0136]
[0137] Where x and y are the horizontal and vertical coordinates of the pixel, respectively, the x-axis represents the motor steps, and the y-axis represents the optical-mechanical sharpness. Using this value as the basis for sharpness evaluation, by comparing two images taken before and after, and combining it with the sharpness point localization algorithm, the optimal sharpness point within the range can be derived, thereby achieving precise focusing.
[0138] It should also be noted that defects in the optical engine design and manufacturing process need to be considered during the focusing process. In order to avoid getting stuck in the local best point of sharpness during positioning, the best positioning method adopts a three-segment positioning scheme. After determining the overall positioning scheme, it is necessary to determine the required focusing step angle for each of the three segments.
[0139] Optical focusing systems typically use stepper motors or servo motors. Stepper motors can be classified by the number of phases, such as single-phase, two-phase, and three-phase. Here, we take a four-phase stepper motor as an example to describe how to select the number of focusing steps for each segment in a three-segment focusing algorithm.
[0140] Whenever a stepper motor receives a pulse signal, it will rotate one step angle in the currently set direction. By controlling the number of control pulses, the angular displacement can be controlled, thus achieving accurate positioning.
[0141] After the optical engine design is completed, a stepper motor that meets the image quality requirements is selected based on the various parameters of the optical engine. After the overall system is confirmed, the minimum rotation step angle is obtained according to the image quality standards such as the minimum resolution that the human eye can distinguish for different optical engines. In order to ensure that the best point of sharpness is not missed, the number of focusing steps used in the last focusing process is denoted as S1, and it must be this value. The second focusing step S2 is selected as a*S1, and so on. The third focusing step S3 is selected as b*S3. After multiple curve fitting tests on the focusing results, it was found that when the values of a and b are 2 and 3, respectively, the effect is optimal after balancing the two dimensions of speed and stability. The step angle of the stepper motor is determined by the relationship in equation (2).
[0142] θ=(360°÷(T×M))×D (2)
[0143] Wherein, step angle of stepper motor: θ; number of rotor teeth: T; number of running steps: M; microstepping: D
[0144] The determination of S1, S2, and S3 above requires the introduction of the concept of stepper motor microstepping. Stepper motor microstepping is essentially an electronic damping technology, primarily aimed at reducing or eliminating low-frequency vibrations in the stepper motor. Improving the motor's operating accuracy is merely a secondary function of microstepping. After microstepping, the actual step angle during motor operation is a fraction of the basic step angle. For example, with a step angle of 7.2°, after two microsteps, the step angle changes by 3.6°. In this embodiment, we assume a conventional two- or four-phase stepper motor with 50 rotor teeth, 4 operating cycles, and 2 microsteps. Therefore, θ is 0.9°. Further assuming the minimum rotation angle output by the optical engine is 14.4°, a is 2, and b is 3, the calculation methods for S1, S2, and S3 are as shown in equations (3), (4), and (5), respectively.
[0145] S1 = 14.4° ÷ 0.9 = 16; (3)
[0146] S2 = 2 × S1 = 32; (4)
[0147] S3 = 3 × S1 = 64; (5)
[0148] To quickly locate the point of focus, the motor will travel an extra distance in the direction of rotation when it turns. The usual approach is to return directly to the position where the descent began after the point of focus was detected. Theoretically, this ensures the fewest steps are taken without missing the point of focus, saving time. However, uncontrollable factors such as structural deviations or differences during the assembly of the optical engine can cause gaps in the machine's focusing system, resulting in inaccurate motor return, especially when the motor is turning. Therefore, the entire positioning algorithm also needs to consider eliminating system errors during rotation. The specific elimination method is as follows:
[0149] N machines are randomly selected (the larger the proportion of N to the total sample, the more representative the sampling result). The focusing system motor supports a maximum of PPS to traverse the entire process, and the total travel Sn (n = 0, 1, 2…N) of each machine is recorded. Then, the median average filtering method is used. This method combines the advantages of median filtering and arithmetic mean filtering, and has strong anti-interference ability for occasional outliers. It also has the advantages of average filtering. The specific algorithm is relatively mature and will not be elaborated further. Through this algorithm, So can be obtained, and this value is stored in the database of each machine.
[0150] During the production process, each machine is traversed through its factory-issued motor PPS once (depending on the factory's human resources). The median average filtering method is also used to obtain Io, and the difference Sd between Io and So in the database is calculated and stored in the database. This value is the focusing motor system error of that machine.
[0151] For switching between the three segments, a certain number of changes in sharpness (increase or decrease) is needed as the criterion, denoted as Cn (n = 1, 2, 3). To ensure that the judgment does not get stuck in a local point of sharpness, the value of Cn must be greater than 1. The three segments are ranked according to their level of detail, with C1 ≥ C2 ≥ C3. Generally, a value of Cn up to 2 is sufficient to meet the requirements.
[0152] In one specific embodiment, see Figure 6 It illustrates a detailed flowchart of a three-stage focusing method. For example... Figure 6 As shown, the method may include:
[0153] S601: Input target image;
[0154] S602: Three-stage focusing, with motor adjustment steps of S1, S2, and S3 steps for each stage;
[0155] S603: Move the focusing motor forward by S3 steps;
[0156] S604: Determine if the focusing motor has reached its limit;
[0157] S605: Rotate the focusing motor and move the Sd step;
[0158] S606: Determine whether the sharpness of the target image decreases continuously for C3 times;
[0159] It should be noted that, in the embodiments of this application, for S604, if the focusing motor has reached its end, S605 is executed at this time; if the focusing motor has not reached its end, S606 is executed at this time.
[0160] It should also be noted that, in the embodiments of this application, for S606, if the sharpness of the target image decreases continuously for C3 times, then S607 is executed; if the sharpness of the target image does not decrease continuously for C3 times, then S603 is executed.
[0161] S607: Rotate the focusing motor and move the Sd step;
[0162] S608: Move the focusing motor forward by S2 steps.
[0163] S609: Determine whether the sharpness of the target image has decreased continuously by C2 times;
[0164] It should be noted that, in the embodiments of this application, for S609, if the clarity of the target image does not decrease continuously by C2 times, S608 is executed at this time; if the clarity of the target image decreases continuously by C2 times, S610 is executed at this time.
[0165] S610: Rotate the focusing motor and move the Sd step;
[0166] S611: Move the focusing motor forward by S1 steps;
[0167] S612: Determine whether the sharpness of the target image has decreased continuously by C1 times;
[0168] S613: Rotate the focusing motor and move it (Sd+S1*C1) steps to end focusing.
[0169] It should be noted that, in the embodiments of this application, for S612, if the clarity of the target image does not decrease continuously by C1 times, S611 is executed at this time; if the clarity of the target image decreases continuously by C1 times, S613 is executed at this time.
[0170] It should also be noted that, in the embodiments of this application, each time the focusing motor is moved, operations such as taking pictures, decoding, and image binarization are performed.
[0171] Briefly speaking, taking the decrease in clarity as an example for the judgment basis, the above specific focusing process can be divided into three-stage focusing (which can also be called: three-stage focusing algorithm, three-stage positioning algorithm, etc.). Here, the number of steps for the motor adjustment in each stage is S1, S2, and S3 respectively, and S1 < S2 < S3. Among them, S3 is the number of steps of the third motor in the foregoing embodiment, S2 is the number of steps of the second motor in the foregoing embodiment, S1 is the number of steps of the first motor in the foregoing embodiment, C3 is the number of times of the third adjustment in the foregoing embodiment, C2 is the number of times of the second adjustment in the foregoing embodiment, C1 is the number of times of the first adjustment in the foregoing embodiment, and Sd is the number of steps of the first preset in the foregoing embodiment; among them, for the switching between the three stages, the number of changes in clarity is used as the judgment basis, and this number is denoted as Cn (n = 1, 2, 3). To ensure not getting stuck in local clear points during judgment, the value of Cn should be at least greater than 1 time. According to the degree of fineness among the three stages, C1 ≥ C2 ≥ C3, and generally, taking Cn as 2 can meet the requirements.
[0172] This embodiment provides a focusing method. Through the above embodiments, the specific implementation of the foregoing embodiment is elaborated in detail. It can be seen that through the technical solution of the foregoing embodiment, the initial image decoding and image binarization processes are accelerated, and with the fast and accurate three-stage positioning algorithm, the fast focusing of the device to be focused (such as a projector) at the current distance is achieved; thus, not only the focusing clarity is improved, but also the user experience is optimized.
[0173] Embodiment III
[0174] Based on the same inventive concept as the foregoing embodiment, refer to Figure 7 , which shows a schematic structural diagram of a focusing device 70 provided by an embodiment of the present application. As Figure 7 shown, the focusing device may include an acquisition unit 701, a processing unit 702, and a display unit 703; among them,
[0175] The acquisition unit 701 is configured to acquire an initial image captured by a camera in the device to be focused;
[0176] The processing unit 702 is configured to perform acceleration processing on the initial image based on the SIMD architecture to obtain a target image corresponding to the initial image;
[0177] The focusing unit 703 is configured to perform clarity comparison and analysis on the target image and the target image of the previous frame to obtain a clarity change trend, and operate the focusing motor according to the clarity change trend to achieve automatic focusing of the device to be focused.
[0178] In some embodiments, the processing unit 702 is specifically configured to perform decoding processing on the initial image to obtain a decoded image; and to perform grayscale processing on the decoded image based on a SIMD architecture to obtain the target image.
[0179] In some embodiments, the processing unit 702 is specifically configured to: create an image decoding buffer region; and in the image decoding buffer region, invoke the graphics processor and perform decoding processing on the initial image; and if the decoding is successful and the number of decoding attempts is less than a preset number, output the decoded image.
[0180] In some embodiments, the processing unit 702 is specifically configured to group the decoded image into N pixel groups, wherein each pixel group includes several pixels and N is an integer greater than zero; and to extract target components from the N pixel groups based on a SIMD architecture to obtain the target image.
[0181] In some embodiments, the processing unit 702 is specifically configured to: acquire a plurality of pixels corresponding to the i-th pixel group; store the target component corresponding to each pixel in the i-th pixel group in a preset vector register; fill the target component corresponding to each pixel in the i-th pixel group into a preset matrix; and if i is less than or equal to N-1, increment i by 1 and return to the step of acquiring the plurality of pixels corresponding to the i-th pixel group; and if i is equal to N, obtain the target image according to the preset matrix; and is further configured to set the initial value of i to 1.
[0182] In some embodiments, the focusing unit 703 is specifically configured to adjust the focusing motor to the position corresponding to the target sharp point according to the sharpness change trend and the target motor steps; wherein, the target motor steps include: a first motor step, a second motor step, and a third motor step; the second motor step is equal to the product of the first motor step and a first constant value, and the third motor step is equal to the product of the first motor step and a second constant value.
[0183] In some embodiments, the focusing unit 703 is specifically configured to: control the focusing motor to move forward by the third motor step; and if the focusing motor reaches the end position, determine whether the sharpness change trend continuously decreases by the third adjustment number; and if the sharpness change trend continuously decreases by the third adjustment number, control the focusing motor to turn and move by the first preset step, and control the focusing motor to continue moving forward by the second motor step; and determine whether the sharpness change trend continuously decreases by the second adjustment number; and if the sharpness change trend continuously decreases by the second adjustment number, control the focusing motor to turn and move by the first preset step, and control the focusing motor to continue moving forward by the first motor step; and determine whether the sharpness change trend continuously decreases by the first adjustment number; and if the sharpness change trend continuously decreases by the first adjustment number, control the focusing motor to turn and move by the first preset step, and control the focusing motor to continue moving forward by the product of the first motor step and the first adjustment number, to reach the position corresponding to the target sharp point.
[0184] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.
[0185] If the integrated unit is implemented as a software functional module and not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0186] Therefore, this embodiment provides a computer storage medium storing a focusing program, which, when executed by at least one processor, implements the steps of the method described in any of the foregoing embodiments.
[0187] Based on the composition of the focusing device 70 and the computer storage medium described above, see [link to documentation]. Figure 8 This illustrates a schematic diagram of the specific hardware structure of the electronic device 80 provided in an embodiment of this application. For example... Figure 8 As shown, it may include: a communication interface 801, a memory 802, and a processor 803; the various components are coupled together through a bus system 804. It is understood that the bus system 804 is used to implement communication between these components. In addition to a data bus, the bus system 804 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 8 The various buses are all labeled as bus system 804. Among them, the communication interface 801 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
[0188] Memory 802 is used to store computer programs that can run on processor 803;
[0189] Processor 803, when running the computer program, performs the following:
[0190] Acquire the initial image captured by the camera in the device to be focused;
[0191] The initial image is accelerated based on the SIMD architecture to obtain the target image corresponding to the initial image;
[0192] A sharpness comparison analysis is performed between the target image and the target image of the previous frame to obtain the sharpness change trend. The focusing motor is operated according to the sharpness change trend to achieve automatic focusing of the device to be focused.
[0193] It is understood that the memory 802 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 802 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0194] The processor 803 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 803 or by instructions in software form. The processor 803 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 802, and the processor 803 reads the information in memory 802 and, in conjunction with its hardware, completes the steps of the above method.
[0195] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0196] For software implementation, the techniques described herein can be achieved through modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or externally.
[0197] Alternatively, as another embodiment, the processor 803 is further configured to perform the steps of the method described in any of the foregoing embodiments when running the computer program.
[0198] In some embodiments, see Figure 9 This illustrates a schematic diagram of the structural composition of an electronic device 80 provided in an embodiment of this application. For example... Figure 9 As shown, the electronic device 80 includes at least the focusing device 70 described in any of the foregoing embodiments.
[0199] In this embodiment, for the electronic device 80, an initial image captured by a camera is acquired; the initial image is processed using a SIMD architecture to obtain a target image corresponding to the initial image; a sharpness comparison analysis is performed between the target image and the target image of the previous frame to obtain a sharpness change trend; and the focusing motor is operated according to the sharpness change trend to achieve automatic focusing of the device to be focused. Thus, by using a SIMD architecture to accelerate the processing of the initial image captured by the camera, and then operating the focusing motor according to the obtained sharpness change trend, not only is the focusing sharpness improved, but also rapid focusing of the device is achieved.
[0200] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0201] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0202] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0203] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0204] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0205] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A focusing method characterized by, The method includes: Acquire the initial image captured by the camera; The initial image is accelerated using a single instruction multiple data (SIMD) architecture to obtain the target image corresponding to the initial image. A sharpness comparison analysis is performed between the target image and the target image of the previous frame to obtain the sharpness change trend, and the number of steps the focusing motor moves forward by the third motor is controlled. If the focusing motor reaches the end position, it is determined whether the sharpness change trend has continuously decreased for the third adjustment. If the sharpness change trend continues to decrease after the third adjustment, then control the focusing motor to turn and move a first preset number of steps, and control the focusing motor to continue moving forward a second number of motor steps; Determine whether the sharpness change trend is continuously decreasing after the second adjustment; If the sharpness change trend continues to decrease after the second adjustment, then control the focusing motor to turn and move a first preset number of steps, and control the focusing motor to continue moving forward a first number of motor steps; Determine whether the sharpness change trend is continuously decreasing after the first adjustment; If the sharpness change trend continues to decrease after the first adjustment number, then control the focusing motor to turn and move a first preset number of steps, and control the focusing motor to continue moving forward the product of the first motor steps and the first adjustment number, so as to reach the position corresponding to the target sharp point; Wherein, the first preset number of steps is the system error of the device to be focused; the second motor step number is equal to the product of the first motor step number and the first constant value; and the third motor step number is equal to the product of the first motor step number and the second constant value.
2. The method of claim 1, wherein, The step of accelerating the initial image based on the SIMD architecture to obtain the target image corresponding to the initial image includes: The initial image is decoded to obtain a decoded image; The target image is obtained by performing grayscale processing on the decoded image based on the SIMD architecture.
3. The method of claim 2, wherein, The focusing device includes a graphics processor, and the decoding process of the initial image to obtain a decoded image includes: Create an image decoding buffer area; In the image decoding buffer area, the graphics processor is invoked to decode the initial image; If the decoding is successful and the number of decoding attempts is less than the preset number, the decoded image is output.
4. The method of claim 2, wherein, The step of performing grayscale processing on the decoded image based on the SIMD architecture to obtain the target image includes: The decoded image is divided into pixel groups to obtain N pixel groups; where each pixel group includes several pixels, and N is an integer greater than zero. The target image is obtained by extracting the target components from the N pixel groups based on the SIMD architecture.
5. The method according to claim 4, characterized in that, The step of extracting target components from the N pixel groups based on the SIMD architecture to obtain the target image includes: Get several pixels corresponding to the i-th pixel group; The target component corresponding to each pixel in the i-th pixel group is stored in the preset vector register; Fill the target component corresponding to each pixel in the i-th pixel group into a preset matrix; If i is less than or equal to N-1, then increment i by 1 and return to the step of obtaining the number of pixels corresponding to the i-th pixel group; If i equals N, then the target image is obtained according to the preset matrix; The initial value of i is set to 1.
6. A focusing device, characterized in that, The focusing device includes an acquisition unit, a processing unit, and a focusing unit; wherein... The acquisition unit is configured to acquire the initial image captured by the camera in the device to be focused; The processing unit is configured to perform accelerated processing on the initial image based on a single instruction multiple data (SIMD) architecture to obtain a target image corresponding to the initial image. The focusing unit is configured to perform a sharpness comparison analysis between the target image and the target image of the previous frame to obtain a sharpness change trend, and control the focusing motor to move forward by a third motor step; if the focusing motor reaches the end position, it determines whether the sharpness change trend has continuously decreased by the third adjustment number; if the sharpness change trend has continuously decreased by the third adjustment number, it controls the focusing motor to turn and move by a first preset number of steps, and controls the focusing motor to continue moving forward by a second motor step; it also determines whether the sharpness change trend has continuously decreased by a second adjustment number; if the sharpness change trend has continuously decreased by the second adjustment number, it controls the focusing motor to turn and move by a third preset number of steps. A preset number of steps is set, and the focusing motor is controlled to move forward by a first motor step number. It is determined whether the sharpness change trend continuously decreases by a first adjustment number. If the sharpness change trend continuously decreases by the first adjustment number, the focusing motor is controlled to turn and move by the first preset number of steps, and the focusing motor is controlled to continue moving forward by the product of the first motor step number and the first adjustment number, to reach the position corresponding to the target sharp point. Wherein, the first preset number of steps is the system error of the focusing device; the second motor step number is equal to the product of the first motor step number and a first constant value; and the third motor step number is equal to the product of the first motor step number and a second constant value.
7. An electronic device, characterized in that, The electronic device includes a memory and a processor; wherein... The memory is used to store computer programs that can run on the processor; The processor is configured to perform the method as described in any one of claims 1 to 5 when running the computer program.
8. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by at least one processor, implements the method as described in any one of claims 1 to 5.