CN115767280A - Dictionary pen camera parameter adjusting method and device and dictionary pen - Google Patents

Dictionary pen camera parameter adjusting method and device and dictionary pen Download PDF

Info

Publication number
CN115767280A
CN115767280A CN202211712605.4A CN202211712605A CN115767280A CN 115767280 A CN115767280 A CN 115767280A CN 202211712605 A CN202211712605 A CN 202211712605A CN 115767280 A CN115767280 A CN 115767280A
Authority
CN
China
Prior art keywords
camera
image
scanning
parameters
scanning process
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.)
Granted
Application number
CN202211712605.4A
Other languages
Chinese (zh)
Other versions
CN115767280B (en
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.)
Anhui Toycloud Technology Co Ltd
Original Assignee
Anhui Toycloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Toycloud Technology Co Ltd filed Critical Anhui Toycloud Technology Co Ltd
Priority to CN202211712605.4A priority Critical patent/CN115767280B/en
Publication of CN115767280A publication Critical patent/CN115767280A/en
Application granted granted Critical
Publication of CN115767280B publication Critical patent/CN115767280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The application discloses a dictionary pen camera parameter adjusting method, a dictionary pen camera parameter adjusting device and a dictionary pen, and the dictionary pen camera parameter adjusting method considers that the scanning environment of the dictionary pen in the using process is the closest to the scanning environment of the previous scanning process and the next scanning process, so that when the dictionary pen scans at the beginning, the stored camera stable parameters in the last scanning process are used as the initial parameters of the camera, the initial parameters of the camera at the beginning of scanning at the last time can be inherited from the camera stable parameters in the last scanning process, and the image quality acquired by the camera at the beginning of scanning is improved. And determining the target camera parameters when the image quality meets the target image with the set quality requirement in the scanning process, storing the target camera parameters as the camera stable parameters of the scanning process, and using the camera stable parameters as the initial parameters of the camera at the beginning of the next scanning process, thereby realizing that the dictionary pen can acquire the image with higher quality at the beginning stage of each scanning process.

Description

Dictionary pen camera parameter adjusting method and device and dictionary pen
Technical Field
The application relates to the technical field of sensors, in particular to a dictionary pen camera parameter adjusting method and device and a dictionary pen.
Background
In recent years, with the rapid development of informatization, science and technology, and intelligence, the demand for the intelligence of electronic products is increasing. For example, the intelligent dictionary pen belongs to a portable language data query tool, and can be called as a point reading pen, a translation pen, a word pen and the like. Different types of dictionary pens have different functions such as word scanning, word searching, translation and the like. The working principle of the dictionary pen is as follows: the method comprises the steps of collecting texts or pictures to be detected by using a camera, splicing collected video frames into static images, and finally recognizing contents in the images by using an OCR technology. However, the OCR recognition technology is premised on clear image text, which requires that the image text collected by the camera is clear when different media are scanned.
The prior art generally adopts two means of fixed exposure and automatic exposure, and for the fixed exposure, the fixed exposure parameters are directly used, so that the requirements of different scenes cannot be met, and the problems of underexposure or overexposure can occur. For the automatic exposure parameter, the exposure amount can be automatically adjusted according to the shooting environment in the scanning process of the camera. However, the exposure adjustment requires a certain time, which causes a problem that the exposure is not suitable to cause overexposure or underexposure easily in a period of time when the dictionary pen starts scanning, as shown in fig. 1, which illustrates an image effect of a dictionary pen taken by using a conventional automatic exposure technology. Therefore, when scanning is carried out, because the exposure parameters of the camera are not suitable, the phenomenon of overexposure of the first few scanned characters is caused, and the recognition effect of the text is influenced.
Disclosure of Invention
In view of the above problems, the present application provides a method and an apparatus for adjusting parameters of a camera of a dictionary pen, and a dictionary pen, so as to solve the problem that an existing dictionary pen is prone to overexposure or underexposure by using a fixed exposure or automatic exposure technology. The specific scheme is as follows:
a dictionary pen camera parameter adjusting method comprises the following steps:
when the scanning starts, using the stored camera stable parameters in the last scanning process as initial parameters of the camera;
in the scanning process, acquiring each frame of image acquired by a camera until the scanning is finished, and determining corresponding target camera parameters when a target image is acquired, wherein the target image is an image of which the image quality acquired in the scanning process meets the set quality requirement;
and storing the target camera parameter as a camera stable parameter of the scanning process, and using the camera stable parameter as an initial parameter of the camera when the next scanning starts.
Preferably, the determining target camera parameters corresponding to the acquisition of the target image includes:
respectively calculating the contrast of each frame of image obtained in the scanning process;
and selecting the image with the maximum contrast as a target image, and determining camera parameters when the camera collects the target image as target camera parameters.
Preferably, the determining target camera parameters corresponding to the acquisition of the target image includes:
in the scanning process, after each frame of image is collected, calculating the contrast of the current frame of image, and judging whether the contrast of the current frame of image is greater than a recorded historical contrast peak value, wherein the historical contrast peak value is the maximum value of the contrast of each frame of image collected before the current frame of image in the scanning process;
if so, recording the contrast of the current frame image as a new historical contrast peak value, otherwise, keeping the recorded historical contrast peak value unchanged until the scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the scanning process.
Preferably, the process of calculating the contrast of an image comprises:
acquiring the gray value of each pixel point in the image;
calculating the gray average value of the image based on the gray values of all pixel points in the image, calculating the gray variance of the image based on the gray values of all pixel points in the image and the gray average value of the image, and taking the gray variance of the image as the contrast of the image.
Preferably, the method further comprises the following steps:
before the scanning is started, whether the dictionary pen is used for the first time after being started is judged, and if yes, the set camera parameters are used as initial parameters when the scanning of the dictionary pen for the first time is started.
Preferably, the method further comprises the following steps:
before the scanning starts, whether the dictionary pen is just switched from a dormant state to an awakening state is judged, and if yes, the camera stable parameters stored last time before dormancy are used as initial parameters of the camera.
Preferably, in the scanning process, acquiring each frame of image collected by the camera until the scanning is finished includes:
confirming the start of the scanning after detecting the start of the camera of the dictionary pen, and continuously acquiring each frame of image collected by the camera;
and confirming that the scanning is finished after the camera stops working.
Preferably, the camera parameters include an exposure parameter and a gain parameter.
A dictionary pen camera parameter adjustment apparatus, comprising:
the initial parameter setting unit is used for using the stored stable parameters of the camera in the last scanning process as the initial parameters of the camera when the current scanning is started;
the image processing unit is used for acquiring each frame of image acquired by the camera in the scanning process until the scanning is finished, and determining a corresponding target camera parameter when a target image is acquired, wherein the target image is an image which is acquired in the scanning process and has the image quality meeting the set quality requirement;
and the target camera parameter storage unit is used for storing the target camera parameters as the camera stable parameters in the scanning process and is used as the initial parameters of the camera when the next scanning is started.
A dictionary pen, comprising: the camera, the memory and the processor are arranged on the pen body;
the camera is used for collecting images;
the memory is used for storing programs;
the processor is used for executing the program and realizing the steps of the dictionary pen camera parameter adjusting method.
By means of the technical scheme, the dictionary pen is considered to be closest to scanning environments of two scanning processes of a front scanning process and a back scanning process in the using process, for example, in the two scanning processes of scanning a first line of text and scanning a second line of text, the scanned environments of media, external light and the like are extremely similar, so that when the dictionary pen starts scanning at this time, the stored camera stability parameters in the last scanning process are used as the initial parameters of the camera, the initial parameters of the camera in the scanning starting stage can be ensured to inherit the camera stability parameters in the last scanning process, compared with the existing automatic exposure mode, the exposure parameters are greatly not controlled in the scanning starting stage, and the image quality acquired by the camera in the scanning starting stage can be ensured by adopting the scheme.
In the scanning process, each frame of image collected by the camera is further obtained, and the target camera parameter when the image quality meets the target image with the set quality requirement in the scanning process is determined and stored as the camera stable parameter of the scanning process and used as the initial parameter of the camera at the beginning of the next scanning process, so that the next scanning starting stage of the dictionary pen can be ensured, the camera stable parameter of the scanning process can still be inherited, and the dictionary pen can collect the image with higher quality at the beginning of the scanning process every time.
Drawings
Various additional advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates an image taken by a dictionary pen using existing auto-exposure techniques;
fig. 2 is a flowchart of a dictionary pen camera parameter adjustment method according to an embodiment of the present disclosure;
3 a-3 c, which respectively illustrate text images scanned on three different media in different light environments by using the method for adjusting camera parameters of a dictionary pen of the present application;
FIG. 4 illustrates a schematic diagram of the contrast peak during one scan;
FIG. 5 is a flowchart of another dictionary pen camera parameter adjustment method provided in the embodiments of the present application;
FIG. 6 is a schematic structural diagram of a dictionary pen camera parameter adjustment apparatus disclosed in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a dictionary pen provided in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application provides a dictionary pen camera parameter adjustment scheme for controlling adjustment of camera parameters in a dictionary pen scanning process, so that a dictionary pen can shoot a scanned image with high quality.
The electronic equipment can acquire images on a medium through the camera, and the dictionary pen can further perform image recognition processing on the acquired images to obtain recognition contents and perform subsequent processing such as pronunciation, translation, search and the like on the recognition contents.
Next, as described in conjunction with fig. 2, the method for adjusting parameters of a dictionary pen camera according to the present application may include the following steps:
and step S100, when the current scanning is started, using the stored stable parameters of the camera in the last scanning process as initial parameters of the camera.
Specifically, the one-time scanning process of the dictionary pen can be understood as a process from when the dictionary pen presses down to scan the contents on the medium to when the dictionary pen lifts up to stop scanning. Generally, the dictionary pen is scanned row by row or column by column, so that a scanning process can be understood as a process of scanning a row or a column.
The medium materials scanned by the dictionary pen can be various, such as a screen, a book, reflective paper and the like.
When the method and the device detect that the scanning starts, the stored stable parameters of the camera in the last scanning process can be called to serve as the initial parameters of the camera.
It can be understood that the parameters of the camera of the dictionary pen are influenced by the ambient light and the factors thereof during one scanning process, so as to change, but the dictionary pen tends to have a stable state change as a whole. The camera stabilization parameters stored in this step in the last scanning process may be understood as parameters after the dictionary pen tends to stabilize the camera parameters in the last scanning process, and specifically, the camera parameters corresponding to the images with the quality meeting the set quality requirement when shooting may be selected as the camera stabilization parameters according to the quality of each image acquired by the camera in the last scanning process.
Considering that the environments of the dictionary pen in the two scanning processes of the front and the back are the closest, for example, in the two scanning processes of scanning the first line of text and scanning the second line of text, the scanned media, external light and other environments are extremely similar, so when the current scanning of the dictionary pen starts, the stored camera stability parameter in the last scanning process is used as the initial parameter of the camera, the initial parameter of the camera in the starting stage of the current scanning can inherit the camera stability parameter in the last scanning process, and compared with the existing automatic exposure mode, the exposure parameter in the starting stage of the scanning is greatly floated and is not controlled, and the image quality collected by the camera in the starting stage of the scanning can be ensured by adopting the scheme of the application.
And step S110, in the scanning process, acquiring each frame of image collected by the camera until the scanning is finished, and determining corresponding target camera parameters when the target image is collected.
The target image is an image which is acquired in the scanning process and has the image quality meeting the set quality requirement.
In this step, each frame of image collected by the camera in the current scanning process of the dictionary pen is obtained. Further, camera parameters when target images meeting the set quality requirements are acquired are determined based on the quality of each frame of image and serve as the target camera parameters.
The set quality requirement may be the image or images with the highest image quality, or the images with image quality reaching a set quality threshold.
Optionally, in this step, the start of the scanning may be confirmed after the start of the camera of the dictionary pen is detected, and each frame of image acquired by the camera is continuously acquired, and the end of the scanning may be confirmed after the stop of the camera is detected.
And step S120, storing the target camera parameter as a camera stable parameter in the current scanning process, wherein the camera stable parameter is used as an initial parameter of a camera when the next scanning starts.
Specifically, in each scanning process, the target camera parameter obtained in one scanning process is stored as a camera stability parameter, that is, the camera stability parameter in each scanning process can be obtained and used as an initial parameter of the camera when the next scanning starts.
Therefore, the camera stable parameters of the scanning process can be inherited at the beginning stage of the next scanning of the dictionary pen, and the dictionary pen can acquire images with high quality at the beginning stage of the scanning process every time.
Referring to fig. 3a to fig. 3c, text images scanned on three different media in different lighting environments by using the method for adjusting camera parameters of a dictionary pen according to the present embodiment are respectively illustrated. As is obvious from comparing fig. 1 and fig. 3a to fig. 3c, compared with the existing automatic exposure technology, the overexposure phenomenon is caused at the initial stage of one-time scanning because the camera parameters are not suitable, and the text image obtained in the whole scanning process after the method of the present application has no overexposure or underexposure phenomenon, that is, the quality of the scanned text image is higher.
It should be noted that the camera parameters adjusted in the present application may include exposure parameters and gain parameters, for example: exposure time, aperture size, shutter speed, gain value, lamp bead brightness, white balance and the like.
In some embodiments of the present application, a process of determining a target camera parameter corresponding to the acquisition of the target image in step S110 is described.
The process of determining the target camera parameters in step S110 may facilitate determining the camera stability parameters in the scanning process, so as to be used as the initial parameters of the camera when the next scanning starts.
There are various ways to determine the camera stability parameters in the scanning process, and this embodiment illustrates an implementation way to determine the camera stability parameters by the quality of each frame of image acquired by the camera. In addition, naturally, other means can be used to determine the camera stability parameters, for example, the variation trend of the camera parameters during the acquisition of each frame of image in the scanning process is analyzed, and the parameters of the camera parameters that tend to set a stable state are extracted from the analysis as the camera stability parameters.
In this embodiment, a mode of determining a camera stabilization parameter by using the quality of each frame of image acquired by a camera is described as an example:
in an alternative embodiment:
and S11, respectively calculating the contrast of each frame of image acquired in the scanning process.
Specifically, during the scanning process of the dictionary pen, the contrast of each acquired frame of image can be calculated in real time. Or after the scanning is finished, the contrast ratio may be calculated for each frame of image obtained in the scanning process.
S12, selecting the image with the maximum contrast as a target image, and determining camera parameters when the camera collects the target image as target camera parameters.
Specifically, the contrast of the image can be used for measuring the image quality, the influence of the contrast on the image display effect is very critical, generally, the higher the contrast is, the clearer and more striking the image is, and the more vivid and gorgeous the color is; and the contrast is low, so that the whole picture is gray. Therefore, in this embodiment, an image with the maximum contrast in one scanning process is selected as a target image, and parameters of a camera when the target image is acquired are used as parameters of the target camera.
In another alternative embodiment:
the process of determining camera stabilization parameters may include:
s21, in the scanning process, after each frame of image is collected, calculating the contrast of the current frame of image, and judging whether the contrast of the current frame of image is greater than the recorded historical contrast peak value, if so, executing a step S22, and if not, executing a step S23.
The historical contrast peak value is the maximum value of the contrast of each frame image collected before the current frame image in the scanning process.
And S22, updating the contrast of the current frame image into a new historical contrast peak value.
And S23, keeping the recorded historical contrast peak value unchanged until the scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the scanning process.
Referring to fig. 4, a schematic diagram of the contrast peak during one scan is illustrated.
The process of calculating the contrast of the image in step S11 and step S21 may specifically include:
firstly, the gray value of each pixel point in the image is obtained.
The width of the image is defined as W, the height H,
Figure DEST_PATH_IMAGE002
representing pixels in an image region
Figure 625347DEST_PATH_IMAGE003
The gray value of (d).
Further, based on the gray value of each pixel point in the image
Figure DEST_PATH_IMAGE002A
Calculating the gray average value M of the image and based on the gray value of each pixel point in the image
Figure DEST_PATH_IMAGE004
And calculating the image gray variance D by using the gray mean value M of the image, and taking the image gray variance D as the contrast of the image.
Figure 276909DEST_PATH_IMAGE005
In some embodiments of the present application, another method for adjusting parameters of a camera of a dictionary pen is introduced, and as shown in fig. 5, the method may include the following steps:
step S200, before the scanning starts, judging whether the dictionary pen is used for the first time after being started, if so, executing step S210, and if not, executing step S220.
And step S210, using the set camera parameters as initial parameters when the first scanning of the dictionary pen is started.
Specifically, if the dictionary pen is used for the first time after being powered on, the camera stability parameter of the last scanning process may not be stored, or even if the camera stability parameter of the last scanning process is stored, whether the scanning environment of the last scanning process is similar to the scanning environment of the current scanning process cannot be determined, so that the preset camera parameter may be directly used as the initial parameter when the dictionary pen starts to scan for the first time. The preset camera parameters may be default parameters of the system, or may be parameters set by the user.
If it is determined that the scanning is not the first time the dictionary pen is used after being powered on, the following step S220 may be executed to determine the sleep state of the dictionary pen. Of course, the process may proceed to step S240 without considering the influence of the sleep state of the dictionary pen.
Step S220, determining whether the dictionary pen has just switched from the sleep state to the wake state, if so, performing step S230, otherwise, performing step S240.
Specifically, if the dictionary pen does not work after a fixed time after being started, the dictionary pen can enter a dormant state and is switched from the dormant state to an awakening state after a set condition is met. If it is determined that the time for the pen to be woken up does not exceed the predetermined time threshold, for example, immediately before the start of the scanning, the scanning environment after the pen is woken up and before the pen is woken up may be very similar to each other in consideration that the pen is not powered off, so that the following step S230 may be performed.
And step S230, using the camera stable parameters stored last time before the dormancy as initial parameters of the camera.
And step S240, when the current scanning is started, using the stored stable parameters of the camera in the last scanning process as initial parameters of the camera.
If it is determined in the step S220 that the dictionary pen is not just switched from the sleep state to the wake-up state, it indicates that the dictionary pen is in the continuous scanning process after being powered on, and does not sleep in the middle, so the stored stable parameters of the camera in the last scanning process can be used as the initial parameters of the camera.
And step S250, in the scanning process, acquiring each frame of image collected by the camera until the scanning is finished, and determining corresponding target camera parameters when the target image is collected.
And step S260, storing the target camera parameter as a camera stable parameter of the scanning process, wherein the camera stable parameter is used as an initial parameter of the camera when the next scanning is started.
The steps S240 to S260 correspond to the steps S100 to S120 in the foregoing embodiment one to one, and reference is made to the foregoing description for details, which are not repeated herein.
It should be noted that, in the flow illustrated in fig. 5, step S200 is further included before step S220, and in other embodiments, step S200 and step S210 may be eliminated in the flow illustrated in fig. 5, that is, the scanning may be directly executed from step S220 without considering whether the scanning is the first use of the dictionary pen after the pen is turned on.
Compared with the method for adjusting the camera parameters of the dictionary pen introduced in the foregoing embodiment, the method for setting the initial parameters of the camera in the scanning process of this time in different working states of the dictionary pen is further added in this embodiment, that is, it is considered that when the dictionary pen is in a first use state after being turned on, the set camera parameters can be directly used as the initial parameters of the camera at the start of this time of scanning, and when the dictionary pen is just switched from a sleep state to a wake-up state, the camera parameters stored at the best time before the sleep can be used as the initial parameters of the camera at the start of this time of scanning.
The dictionary pen camera parameter adjusting device provided in the embodiment of the present application is described below, and the dictionary pen camera parameter adjusting device described below and the dictionary pen camera parameter adjusting method described above may be referred to in correspondence with each other.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a dictionary pen camera parameter adjusting device disclosed in the embodiment of the present application.
As shown in fig. 6, the apparatus may include:
an initial parameter setting unit 11, configured to use the stored camera stable parameter in the last scanning process as an initial parameter of the camera when the current scanning starts;
the image processing unit 12 is configured to acquire each frame of image acquired by the camera in the current scanning process until the current scanning is finished, and determine a target camera parameter corresponding to the acquisition of a target image, where the target image is an image acquired in the current scanning process and has an image quality meeting a set quality requirement;
and a target camera parameter storage unit 13, configured to store the target camera parameter as a camera stability parameter in the current scanning process, and use the camera stability parameter as an initial parameter of a camera when next scanning starts.
Optionally, the acquiring, by the image processing unit, each frame of image acquired by the camera in the scanning process of this time until the scanning is finished may include:
confirming the start of the scanning after detecting the start of the camera of the dictionary pen, and continuously acquiring each frame of image collected by the camera;
and confirming that the scanning is finished after the camera stops working.
Optionally, the embodiment of the present application introduces two different implementation manners of determining, by the image processing unit, a target camera parameter corresponding to the acquired target image, where the two different implementation manners are as follows:
the first implementation manner can include:
respectively calculating the contrast of each frame of image obtained in the scanning process;
and selecting the image with the maximum contrast as a target image, and determining a camera parameter when the camera collects the target image as a target camera parameter.
The second implementation manner may include:
in the scanning process, after each frame of image is collected, calculating the contrast of the current frame of image, and judging whether the contrast of the current frame of image is greater than a recorded historical contrast peak value, wherein the historical contrast peak value is the maximum value of the contrast of each frame of image collected before the current frame of image in the scanning process;
if so, recording the contrast of the current frame image as a new historical contrast peak value, otherwise, keeping the recorded historical contrast peak value unchanged until the scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the scanning process.
Optionally, the process of calculating the contrast of the image by the image processing unit may include:
acquiring the gray value of each pixel point in the image;
calculating the gray average value of the image based on the gray values of all pixel points in the image, calculating the gray variance of the image based on the gray values of all pixel points in the image and the gray average value of the image, and taking the gray variance of the image as the contrast of the image.
Optionally, the apparatus of the present application may further include:
and the starting state judging unit is used for judging whether the dictionary pen is used for the first time after starting before the scanning of the time is started, and if so, the set camera parameters are directly used as initial parameters when the scanning of the dictionary pen for the first time is started.
Optionally, the apparatus of the present application may further include:
and the dormant state judging unit is used for judging whether the dictionary pen is just switched from the dormant state to the awakening state before the scanning is started, and if so, using the camera stable parameter stored last time before the dormancy as the initial parameter of the camera.
The camera parameter adjusting device for the dictionary pen can be applied to the dictionary pen. Alternatively, fig. 7 is a block diagram showing a hardware configuration of the dictionary pen, and referring to fig. 7, the hardware configuration of the dictionary pen may include: the pen comprises a pen body, at least one processor 1 arranged on the pen body, at least one communication interface 2, at least one memory 3, at least one communication bus 4 and a camera 5;
in the embodiment of the application, the number of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is at least one, and the processor 1, the communication interface 2 and the memory 3 complete mutual communication through the communication bus 4;
the processor 1 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement embodiments of the present invention, etc.;
the memory 3 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
the camera is used for collecting images;
wherein the memory stores a program and the processor can call the program stored in the memory, the program for:
when the scanning starts, using the stored stable parameters of the camera in the last scanning process as initial parameters of the camera;
in the scanning process, acquiring each frame of image acquired by a camera until the scanning is finished, and determining a corresponding target camera parameter when the target image is acquired, wherein the target image is an image of which the image quality acquired in the scanning process meets a set quality requirement;
and storing the target camera parameters as camera stable parameters in the scanning process, and using the camera stable parameters as initial parameters of the camera at the beginning of the next scanning.
Alternatively, the detailed function and the extended function of the program may refer to the above description.
An embodiment of the present application further provides a storage medium, where the storage medium may store a program adapted to be executed by a processor, where the program is configured to:
when the scanning starts, using the stored stable parameters of the camera in the last scanning process as initial parameters of the camera;
in the scanning process, acquiring each frame of image acquired by a camera until the scanning is finished, and determining a corresponding target camera parameter when the target image is acquired, wherein the target image is an image of which the image quality acquired in the scanning process meets a set quality requirement;
and storing the target camera parameters as camera stable parameters in the scanning process, and using the camera stable parameters as initial parameters of the camera at the beginning of the next scanning.
Alternatively, the detailed function and the extended function of the program may refer to the above description.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, the embodiments may be combined as needed, and the same and similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A dictionary pen camera parameter adjusting method is characterized by comprising the following steps:
when the scanning starts, using the stored camera stable parameters in the last scanning process as initial parameters of the camera;
in the scanning process, acquiring each frame of image acquired by a camera until the scanning is finished, and determining a corresponding target camera parameter when the target image is acquired, wherein the target image is an image of which the image quality acquired in the scanning process meets a set quality requirement;
and storing the target camera parameter as a camera stable parameter of the scanning process, and using the camera stable parameter as an initial parameter of the camera when the next scanning starts.
2. The method according to claim 1, wherein the determining target camera parameters corresponding to the acquisition of the target image comprises:
respectively calculating the contrast of each frame of image obtained in the scanning process;
and selecting the image with the maximum contrast as a target image, and determining a camera parameter when the camera collects the target image as a target camera parameter.
3. The method according to claim 1, wherein the determining target camera parameters corresponding to the acquisition of the target image comprises:
in the scanning process, after each frame of image is collected, calculating the contrast of the current frame of image, and judging whether the contrast of the current frame of image is greater than a recorded historical contrast peak value or not, wherein the historical contrast peak value is the maximum value of the contrast of each frame of image collected before the current frame of image in the scanning process;
if so, recording the contrast of the current frame image as a new historical contrast peak value, otherwise, keeping the recorded historical contrast peak value unchanged until the scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the scanning process.
4. A method according to claim 2 or 3, wherein the process of calculating the contrast of the image comprises:
acquiring the gray value of each pixel point in the image;
calculating the gray average value of the image based on the gray values of all pixel points in the image, calculating the gray variance of the image based on the gray values of all pixel points in the image and the gray average value of the image, and taking the gray variance of the image as the contrast of the image.
5. The method of claim 1, further comprising:
before the scanning is started, whether the dictionary pen is used for the first time after being started is judged, and if yes, the set camera parameters are used as initial parameters when the scanning of the dictionary pen for the first time is started.
6. The method of claim 1, further comprising:
before the scanning starts, whether the dictionary pen is just switched from a dormant state to an awakening state is judged, and if yes, the camera stable parameters stored last time before dormancy are used as initial parameters of the camera.
7. The method according to claim 1, wherein in the current scanning process, acquiring each frame of image collected by the camera until the current scanning is finished comprises:
confirming the start of the scanning after detecting the start of the camera of the dictionary pen, and continuously acquiring each frame of image collected by the camera;
and confirming the end of the scanning after the camera stops working.
8. The method of any of claims 1-3, 5-7, wherein the camera parameters comprise exposure parameters and gain parameters.
9. The utility model provides a dictionary pen camera parameter adjustment device which characterized in that includes:
the initial parameter setting unit is used for using the stored camera stable parameters in the last scanning process as the initial parameters of the camera when the current scanning is started;
the image processing unit is used for acquiring each frame of image acquired by the camera in the scanning process until the scanning is finished, and determining corresponding target camera parameters when a target image is acquired, wherein the target image is an image of which the image quality acquired in the scanning process meets the set quality requirement;
and the target camera parameter storage unit is used for storing the target camera parameters as the camera stable parameters in the scanning process and is used as the initial parameters of the camera when the next scanning is started.
10. A dictionary pen, comprising: the camera, the memory and the processor are arranged on the pen body;
the camera is used for collecting images;
the memory is used for storing programs;
the processor is used for executing the program and realizing the steps of the dictionary pen camera parameter adjusting method according to any one of claims 1 to 8.
CN202211712605.4A 2022-12-30 2022-12-30 Dictionary pen camera parameter adjusting method and device and dictionary pen Active CN115767280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211712605.4A CN115767280B (en) 2022-12-30 2022-12-30 Dictionary pen camera parameter adjusting method and device and dictionary pen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211712605.4A CN115767280B (en) 2022-12-30 2022-12-30 Dictionary pen camera parameter adjusting method and device and dictionary pen

Publications (2)

Publication Number Publication Date
CN115767280A true CN115767280A (en) 2023-03-07
CN115767280B CN115767280B (en) 2023-08-22

Family

ID=85347998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211712605.4A Active CN115767280B (en) 2022-12-30 2022-12-30 Dictionary pen camera parameter adjusting method and device and dictionary pen

Country Status (1)

Country Link
CN (1) CN115767280B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107802265A (en) * 2017-10-27 2018-03-16 上海联影医疗科技有限公司 Sweep parameter multiplexing method, apparatus and system
CN108848294A (en) * 2018-08-15 2018-11-20 努比亚技术有限公司 A kind of shooting parameter adjustment method, terminal and computer readable storage medium
CN109413336A (en) * 2018-12-27 2019-03-01 北京旷视科技有限公司 Image pickup method, device, electronic equipment and computer readable storage medium
US20190196180A1 (en) * 2016-08-29 2019-06-27 Huawei Technologies Co., Ltd. Method and Apparatus For Adjusting Scanning Status
CN111914828A (en) * 2020-08-13 2020-11-10 安徽淘云科技有限公司 Image acquisition method and device, scanning pen and storage medium
CN115240197A (en) * 2022-06-22 2022-10-25 科大讯飞股份有限公司 Image quality evaluation method, image quality evaluation device, electronic apparatus, scanning pen, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190196180A1 (en) * 2016-08-29 2019-06-27 Huawei Technologies Co., Ltd. Method and Apparatus For Adjusting Scanning Status
CN107802265A (en) * 2017-10-27 2018-03-16 上海联影医疗科技有限公司 Sweep parameter multiplexing method, apparatus and system
CN108848294A (en) * 2018-08-15 2018-11-20 努比亚技术有限公司 A kind of shooting parameter adjustment method, terminal and computer readable storage medium
CN109413336A (en) * 2018-12-27 2019-03-01 北京旷视科技有限公司 Image pickup method, device, electronic equipment and computer readable storage medium
CN111914828A (en) * 2020-08-13 2020-11-10 安徽淘云科技有限公司 Image acquisition method and device, scanning pen and storage medium
CN115240197A (en) * 2022-06-22 2022-10-25 科大讯飞股份有限公司 Image quality evaluation method, image quality evaluation device, electronic apparatus, scanning pen, and storage medium

Also Published As

Publication number Publication date
CN115767280B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
US8290291B2 (en) Digital photographing apparatus and method of controlling the same
JP4254873B2 (en) Image processing apparatus, image processing method, imaging apparatus, and computer program
WO2020038072A1 (en) Exposure control method and device, and electronic device
JP5136669B2 (en) Image processing apparatus, image processing method, and program
JP4834725B2 (en) Method and apparatus for incorporating iris color in red-eye correction
US8917332B2 (en) Image capturing apparatus, image processing apparatus and method, and program therefor
CN101013470B (en) Face importance level determining apparatus and method, and image pickup apparatus
WO2020038087A1 (en) Method and apparatus for photographic control in super night scene mode and electronic device
EP2083565A2 (en) Image capturing apparatus, control method therefor, and program
CN106454077B (en) Shooting method, shooting device and terminal
US7430066B2 (en) Method and user interface for performing an automatic scan operation for a scanner coupled to a computer system
US20090115864A1 (en) Imaging apparatus, method for controlling the same, and program
JP4535164B2 (en) Imaging apparatus, image processing apparatus, and image analysis method and program therefor
US20050219385A1 (en) Device for preventing red eye, program therefor, and recording medium storing the program
US20090002509A1 (en) Digital camera and method of controlling same
US20120020568A1 (en) Image processor and image processing method
WO2010128579A1 (en) Electron camera, image processing device, and image processing method
CN102478743A (en) Photographic device and control method thereof
US20090231628A1 (en) Image Processing Apparatus, Image Processing Method, Computer Program for Image Processing
JP2009089084A (en) Image processing apparatus, imaging apparatus, and image processing method
US20120098989A1 (en) Imaging apparatus and method of displaying a number of captured images
CN103037157A (en) Image processing device and image processing method
JP2003248822A (en) Device and method for image processing, medium where image processing program is recorded, and the image processing program
CN107147786B (en) Image acquisition control method and device for intelligent terminal
US7438230B2 (en) Image processing apparatus, image processing method, and image processing program

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
GR01 Patent grant
GR01 Patent grant