CN115767280B - 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
CN115767280B
CN115767280B CN202211712605.4A CN202211712605A CN115767280B CN 115767280 B CN115767280 B CN 115767280B CN 202211712605 A CN202211712605 A CN 202211712605A CN 115767280 B CN115767280 B CN 115767280B
Authority
CN
China
Prior art keywords
camera
image
parameters
scanning
contrast
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.)
Active
Application number
CN202211712605.4A
Other languages
Chinese (zh)
Other versions
CN115767280A (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

Landscapes

  • Studio Devices (AREA)

Abstract

The application discloses a method and a device for adjusting parameters of a camera of a dictionary pen and the dictionary pen, and the method and the device consider that the scanning environments of the dictionary pen in the front and back scanning processes are closest in the use process of the dictionary pen, so that when the scanning of the dictionary pen is started, the stored camera stabilizing parameters in the last scanning process are used as initial parameters of the camera, the initial parameters of the camera in the scanning starting stage can inherit the camera stabilizing parameters in the last scanning process, and the quality of images acquired by the camera in the scanning starting stage is improved. And the target camera parameters when the acquired image quality meets the target image with the set quality requirement in the scanning process are determined, and the target camera parameters are stored as camera stability parameters in the scanning process and used as initial parameters of the camera when the next scanning starts, so that the dictionary pen can acquire images with higher quality in the starting 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 method and a device for adjusting parameters of a dictionary pen camera and a dictionary pen.
Background
In recent years, with rapid development of informatization, science and technology, and intelligence, the requirement for the intelligence of electronic products is increasing. Such as an intelligent dictionary pen, which belongs to a portable language data query tool and can be called a touch-and-talk pen, a translation pen, a word pen and the like. Different types of dictionary pens have different functions of word scanning, word searching, translation and the like. The working principle of the dictionary pen is that: and acquiring a text or picture to be detected by using a camera, splicing the acquired video frames into a static image, and finally identifying the content in the image by using an OCR technology. However, the premise of OCR technology is that the image text is clear, which requires that the image text collected by the camera be clear when scanning different media.
In the prior art, two means of fixed exposure and automatic exposure are generally adopted, and for the fixed exposure, fixed exposure parameters are directly used, so that the fixed exposure cannot adapt to the requirements of different scenes, and the problem of underexposure or overexposure can occur. For the automatic exposure parameters, the exposure quantity 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 results in a problem that the exposure is not adapted to cause overexposure or underexposure during a period of time when the dictionary pen starts scanning, as shown in fig. 1, which illustrates an image effect of the dictionary pen photographed by using the existing automatic exposure technology. Therefore, when the scanning is just performed, the exposure parameters of the camera are not adapted, so that overexposure phenomenon occurs on the first few characters of the scanning, and the recognition effect of the text is affected.
Disclosure of Invention
In view of the above problems, the present application is provided to provide a method and an apparatus for adjusting parameters of a camera of a dictionary pen, and the dictionary pen, so as to solve the problem that the existing dictionary pen is easy to be overexposed or underexposed by adopting 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 stabilization parameters in the last scanning process as initial parameters of the camera;
in the process of the current scanning, acquiring each frame of image acquired by a camera until the current scanning is finished, and determining a corresponding target camera parameter when acquiring a target image, wherein the target image is an image with the image quality meeting the set quality requirement acquired in the process of the current scanning;
and storing the target camera parameters as camera stability parameters in the current scanning process, and using the camera stability parameters as initial parameters of the camera at the beginning of the next scanning.
Preferably, the determining the corresponding target camera parameters when the target image is acquired includes:
for each frame of image acquired in the current scanning process, respectively calculating the contrast of each frame of image;
and selecting an image with the largest contrast ratio as a target image, and determining a camera parameter when the camera collects the target image as a target camera parameter.
Preferably, the determining the corresponding target camera parameters when the target image is acquired includes:
in the scanning process, after each frame of image is acquired, calculating the contrast of the current frame of image, and judging whether the contrast of the current frame of image is larger 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 acquired before the current frame of image in the scanning process;
if yes, 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 current scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the current scanning process.
Preferably, the process of calculating the contrast of the image comprises:
acquiring gray values of all pixel points in an image;
and calculating the gray average value of the image based on the gray value of each pixel point in the image, calculating the gray variance of the image based on the gray value of each pixel point 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:
before the scanning starts, judging whether the dictionary pen is used for the first time after being started, if yes, using the set camera parameters as initial parameters when the dictionary pen starts to scan for the first time.
Preferably, the method further comprises:
before the scanning starts, judging whether the dictionary pen is just switched from a dormant state to an awake state, if so, using the camera stabilizing parameter stored last time before dormancy as an initial parameter of the camera.
Preferably, in the current scanning process, each frame of image acquired by the camera is acquired until the current scanning is finished, including:
after the starting work of the camera of the dictionary pen is detected, confirming the start of the scanning, and continuously acquiring each frame of image acquired by the camera;
after the camera is detected to stop working, the end of the scanning is confirmed.
Preferably, the camera parameters include exposure parameters and gain parameters.
A dictionary pen camera parameter adjustment device, comprising:
the initial parameter setting unit is used for using the stored camera stabilization parameters in the last scanning process as initial parameters of the camera when the current scanning starts;
the image processing unit is used for acquiring each frame of image acquired by the camera in the current scanning process until the current scanning is finished, and determining the corresponding target camera parameters when acquiring the target image, wherein the target image is an image with the image quality meeting the set quality requirement acquired in the current scanning process;
and the target camera parameter storage unit is used for storing the target camera parameters as camera stability parameters in the current scanning process and used as initial parameters of the camera at the beginning of the next scanning.
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 configured to execute the program to implement the steps of the dictionary pen camera parameter adjustment method as described above.
By means of the technical scheme, the scanning environments of the dictionary pen in the front and back scanning processes are closest in use, such as the scanning process of scanning the first line text and scanning the second line text, and the scanning medium, external light and other environments are very similar, so that when the dictionary pen starts in the current scanning process, 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 current scanning start stage can be ensured to inherit the camera stability parameters in the last scanning process, and compared with the existing automatic exposure mode, the exposure parameter floating in the scanning start stage is greatly uncontrolled.
In the scanning process, each frame of image acquired by the camera is further acquired, the target camera parameters when the acquired image quality meets the target image with the set quality requirement in the scanning process are determined, and the target camera parameters are stored as the camera stability parameters in the scanning process and used as the initial parameters of the camera when the next scanning starts, so that the next scanning starting stage of the dictionary pen can be ensured, the camera stability parameters in the scanning process can be inherited, and the situation that the dictionary pen can acquire images with higher quality in the starting stage of each scanning process is realized.
Drawings
Various other 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 designate like parts throughout the figures. 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 method for adjusting parameters of a dictionary pen camera according to an embodiment of the present application;
3 a-3 c illustrate text images after scanning three different media under different illumination environments, respectively, using the dictionary pen camera parameter adjustment method of the present application;
FIG. 4 illustrates a schematic view of contrast peaks during a scan;
FIG. 5 is a flowchart of another method for adjusting parameters of a dictionary pen camera according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a dictionary pen camera parameter adjusting device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a dictionary pen according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The application provides a dictionary pen camera parameter adjustment scheme which is used for controlling adjustment of camera parameters in the scanning process of a dictionary pen so as to ensure that the dictionary pen can shoot a scanning image with higher quality.
The scheme of the application can be realized based on the dictionary pen, and the dictionary pen refers generally to electronic equipment capable of collecting images on a medium through a camera, and of course, the dictionary pen can further perform image recognition processing on the collected images to obtain recognition content, and perform subsequent processing such as pronunciation, translation, search and the like on the recognition content.
Next, as described in connection with fig. 2, the dictionary pen camera parameter adjustment method of the present application may include the following steps:
step S100, when the current scanning starts, using the stored camera stabilization parameters in the last scanning process as initial parameters of the camera.
In particular, the one-time scanning process of the dictionary pen can be understood as a process from the beginning of scanning of the content on the medium by the pressing of the dictionary pen to the stopping of the scanning by lifting the dictionary pen. Generally, the dictionary pens are scanned row by row or column by column according to rows or columns, so a scanning process can also be understood as a process of scanning a row or column.
The dictionary pen can scan a variety of media materials, such as screens, books, reflective papers, etc.
When the application detects that the scanning starts, the stored camera stabilization parameters in the last scanning process can be called as the initial parameters of the camera.
It will be appreciated that the parameters of the camera will change during a scan, due to the influence of ambient light and its own factors, but will tend to be a steady state change overall. The camera stabilization parameters stored in the step in the last scanning process can be understood as parameters after the camera parameters tend to be stabilized in the last scanning process of the dictionary pen, and particularly the camera parameters corresponding to the images with the quality meeting the set quality requirements in shooting can be selected through the quality of each image acquired by the camera in the last scanning process and used as the camera stabilization parameters.
Considering that the environments of the dictionary pen in the two scanning processes are closest, such as the two scanning processes of scanning the first line text and scanning the second line text, the environments of scanning media, external light and the like are very similar, when the dictionary pen starts scanning this time, the stored camera stabilizing parameters in the last scanning process are used as the initial parameters of the camera, so that the initial parameters of the camera in the scanning start stage can inherit the camera stabilizing parameters in the last scanning process, and compared with the existing automatic exposure mode, the exposure parameter floating in the scanning start stage is greatly uncontrolled.
Step S110, in the process of the current scanning, acquiring each frame of image acquired by the camera until the current scanning is finished, and determining the corresponding target camera parameters when the target image is acquired.
The target image is an image with the image quality meeting the set quality requirement, which is acquired in the current scanning process.
In the step, each frame of image acquired by a camera in the current scanning process of the dictionary pen is acquired. Further, based on the quality of each frame image, a camera parameter when a target image meeting the set quality requirement is acquired is determined as the target camera parameter.
The set quality requirement may be one or more images with highest image quality or each image with image quality up to a set quality threshold.
Optionally, in this step, after detecting that the camera of the dictionary pen starts working, the scanning is confirmed, each frame of image collected by the camera is continuously obtained, and after detecting that the camera stops working, the scanning is confirmed to be finished.
Step S120, storing the target camera parameters as camera stability parameters in the current scanning process, and using the camera stability parameters as initial parameters of the camera at the beginning of the next scanning.
Specifically, in each scanning process, the target camera parameters obtained in one scanning process are stored as camera stability parameters, so that the camera stability parameters in each scanning process can be obtained and used as initial parameters of the camera at the beginning of the next scanning.
Therefore, the beginning stage of the next scanning of the dictionary pen can be ensured, and the camera stabilizing parameters in the scanning process can be inherited, so that the higher-quality images can be acquired by the dictionary pen in the beginning stage of each scanning process.
Referring to fig. 3 a-3 c, text images scanned on three different media under different illumination environments are illustrated by the dictionary pen camera parameter adjustment method of the present embodiment. Compared with the prior automatic exposure technology, the method has the advantages that the overexposure phenomenon is caused by inadaptation of the camera parameters at the beginning stage of one-time scanning, the overexposure phenomenon or the underexposure phenomenon does not exist in the text image obtained in the whole scanning process after the method is adopted, and 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: the exposure time, the aperture size, the shutter speed, the gain value, the brightness of the lamp beads, the white balance and the like.
In some embodiments of the present application, the process of determining the corresponding target camera parameters when the target image is acquired in step S110 is described.
In the step S110, the process of determining the target camera parameters may be convenient for determining the camera stability parameters in the current scanning process, so as to be used as the initial parameters of the camera when the next scanning starts.
The method for determining the camera stability parameter in the current scanning process can be various, and in this embodiment, an embodiment of determining the camera stability parameter by using the quality of each frame of image collected by the camera is exemplified. Of course, in addition to the above, other means may be used to determine the camera stability parameters, for example, in the current scanning process, the change trend of the camera parameters during the acquisition of each frame of image is analyzed, and the parameters after the camera parameters tend to be set in a stable state are extracted from the trend of the change trend of the camera parameters to be used as the camera stability parameters.
In this embodiment, a method of determining a camera stabilization parameter by using the quality of each frame image acquired by a camera is described as an example:
in an alternative embodiment:
s11, for each frame of image acquired in the scanning process, respectively calculating the contrast of each frame of image.
Specifically, in the dictionary pen scanning process, the contrast of each frame image can be calculated in real time for each frame image acquired. Alternatively, after the end of the present scanning, the contrast may be calculated for each frame of image acquired during the present scanning.
S12, selecting an image with the largest contrast ratio as a target image, and determining a camera parameter when the camera collects the target image as a target camera parameter.
Specifically, the contrast of the image can be used for measuring the quality of the image, the influence of the contrast on the display effect of the image is very critical, and in general, the larger the contrast is, the clearer and more striking the image is, and the more vivid and gorgeous the color is; and the contrast is small, so that the whole picture is gray. Therefore, in this embodiment, an image with the highest contrast is selected as the target image in one scanning process, and the parameters of the camera when the target image is acquired are used as the target camera parameters.
In another alternative embodiment:
the process of determining camera stabilization parameters may include:
s21, in the scanning process, after each frame of image is acquired, calculating the contrast of the current frame of image, judging whether the contrast of the current frame of image is larger than a recorded historical contrast peak value, if so, executing the step S22, and if not, executing the step S23.
The historical contrast peak value is the maximum value of the contrast of each frame image acquired before the current frame image in the scanning process.
S22, updating the contrast of the current frame image to be a new historical contrast peak value.
And S23, keeping the recorded historical contrast peak value unchanged until the current scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the current scanning process.
Referring to fig. 4, a schematic diagram of contrast peaks during a scan is illustrated.
For the above-mentioned steps S11 and S21, the process of calculating the contrast of the image may specifically include:
first, a gray value of each pixel point in an image is obtained.
The width of the image is defined as W, height H,representing pixel points in the image area>Gray values at that point.
Further, gray value based on each pixel point in the imageCalculating the gray average value M of the image and based on gray values of pixels in the image +.>And calculating an image gray level variance D by using the gray level mean value M of the image, and taking the image gray level variance D as the contrast of the image.
In some embodiments of the present application, another method for adjusting parameters of a dictionary pen camera is described, and in conjunction with the description of 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 yes, executing step S210, and if not, executing step S220.
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 started, the camera stabilizing parameter in the last scanning process may not be stored, or even if the camera stabilizing parameter in the last scanning process is stored, the scanning environment of the last scanning process and the scanning environment of the current scanning process cannot be determined to be similar, so that the preset camera parameter can be directly adopted as the initial parameter when the dictionary pen is scanned for the first time at the moment. The camera parameters set in advance here may be default parameters of the system, and may also be parameters set by a user.
If it is determined that the current scan is not the first use after the dictionary pen is turned on, the following step S220 may be executed to determine the sleep state of the dictionary pen. Of course, if the influence of the dictionary pen sleep state is not considered, the process may directly proceed to step S240.
Step S220, judging whether the dictionary pen just switches from the sleep state to the wake state, if so, executing step S230, otherwise, executing step S240.
Specifically, if the dictionary pen does not work after the fixed time passes after the dictionary pen is started, the dictionary pen can enter a dormant state and is switched from the dormant state to an awake state after the set condition is met. If it is determined that the dictionary pen just switches from the sleep state to the wake state before the start of the present scan, for example, the time when the dictionary pen is awakened does not exceed the set time threshold, the scan environment after the dictionary pen is awakened and before the dictionary pen is awakened may be very similar, so the following step S230 may be executed.
Step S230, the camera stabilization parameters stored last time before dormancy are used as initial parameters of the camera.
Step S240, when the current scanning starts, the stored camera stabilization parameter in the last scanning process is used as the initial parameter 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 state, it is indicated that the dictionary pen is in the continuous scanning process after being started, and the dictionary pen is not in sleep in the middle, so that the stored camera stability parameter in the last scanning process can be used as the initial parameter of the camera.
Step S250, in the process of the current scanning, acquiring each frame of image acquired by the camera until the current scanning is finished, and determining the corresponding target camera parameters when the target image is acquired.
Step S260, storing the target camera parameters as camera stabilization parameters in the current scanning process, for use as initial parameters of the camera at the beginning of the next scanning.
The steps S240-S260 correspond to the steps S100-S120 in the foregoing embodiment one by one, and are described in detail with reference to the foregoing description, and are not repeated here.
In addition, 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 removed in the flow illustrated in fig. 5, that is, the first use after the dictionary pen is started is not considered in the present scanning, and the method is directly performed from step S220.
Compared with the method for adjusting the camera parameters of the dictionary pen described in the foregoing embodiment, the method for setting the camera initial parameters of the dictionary pen in the present scanning process in different working states of the dictionary pen is further added in this embodiment, that is, when the dictionary pen is in the first use state after being started, the set camera parameters can be directly used as the initial parameters of the camera at the beginning of the present scanning, and when the dictionary pen is just switched from the sleep state to the wake state, the camera parameters which are preferably stored once before the sleep can be used as the initial parameters of the camera at the beginning of the present scanning.
The dictionary pen camera parameter adjusting device provided by the embodiment of the application is described below, and the dictionary pen camera parameter adjusting device described below and the dictionary pen camera parameter adjusting method described above can be correspondingly referred to each other.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a dictionary pen camera parameter adjusting device according to an embodiment of the present application.
As shown in fig. 6, the apparatus may include:
an initial parameter setting unit 11, configured to use, when the current scanning starts, the stored camera stability parameter in the previous scanning process as an initial parameter of the camera;
the image processing unit 12 is configured to acquire each frame of image acquired by the camera during the current scanning process until the current scanning is finished, and determine a corresponding target camera parameter when acquiring a target image, where the target image is an image whose image quality acquired during the current scanning process meets a set quality requirement;
and the target camera parameter storage unit 13 is used for storing the target camera parameter as a camera stability parameter in the current scanning process and is used as an initial parameter of the camera at the beginning of the next scanning.
Optionally, the process of acquiring each frame of image acquired by the camera until the current scanning is finished by the image processing unit in the current scanning process may include:
after the starting work of the camera of the dictionary pen is detected, confirming the start of the scanning, and continuously acquiring each frame of image acquired by the camera;
after the camera is detected to stop working, the end of the scanning is confirmed.
Optionally, the embodiment of the present application introduces two different implementation manners of the corresponding target camera parameters when the image processing unit determines to collect the target image, where the two different implementation manners are as follows:
a first implementation may include:
for each frame of image acquired in the current scanning process, respectively calculating the contrast of each frame of image;
and selecting an image with the largest contrast ratio as a target image, and determining a camera parameter when the camera collects the target image as a target camera parameter.
A second implementation may include:
in the scanning process, after each frame of image is acquired, calculating the contrast of the current frame of image, and judging whether the contrast of the current frame of image is larger 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 acquired before the current frame of image in the scanning process;
if yes, 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 current scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the current scanning process.
Optionally, the process of calculating the contrast of the image by the image processing unit may include:
acquiring gray values of all pixel points in an image;
and calculating the gray average value of the image based on the gray value of each pixel point in the image, calculating the gray variance of the image based on the gray value of each pixel point 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:
the starting state judging unit is used for judging whether the dictionary pen is used for the first time after starting before the scanning starts, and if yes, the set camera parameters are directly used as initial parameters when the first scanning starts.
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 starts, and if so, the camera stabilizing parameter stored last time before dormancy is used as the initial parameter of the camera.
The dictionary pen camera parameter adjusting device provided by the embodiment of the application can be applied to dictionary pens. Alternatively, fig. 7 shows a hardware structure block diagram of the dictionary pen, and referring to fig. 7, the hardware structure 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 the communication with each other through the communication bus 4;
processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present application, etc.;
the memory 3 may comprise a high-speed RAM memory, and may further comprise a non-volatile memory (non-volatile memory) or the like, such as at least one magnetic disk memory;
the camera is used for collecting images;
wherein the memory stores a program, the processor is operable to invoke the program stored in the memory, the program operable to:
when the scanning starts, using the stored camera stabilization parameters in the last scanning process as initial parameters of the camera;
in the process of the current scanning, acquiring each frame of image acquired by a camera until the current scanning is finished, and determining a corresponding target camera parameter when acquiring a target image, wherein the target image is an image with the image quality meeting the set quality requirement acquired in the process of the current scanning;
and storing the target camera parameters as camera stability parameters in the current scanning process, and using the camera stability parameters as initial parameters of the camera at the beginning of the next scanning.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
The embodiment of the present application also provides a storage medium storing a program adapted to be executed by a processor, the program being configured to:
when the scanning starts, using the stored camera stabilization parameters in the last scanning process as initial parameters of the camera;
in the process of the current scanning, acquiring each frame of image acquired by a camera until the current scanning is finished, and determining a corresponding target camera parameter when acquiring a target image, wherein the target image is an image with the image quality meeting the set quality requirement acquired in the process of the current scanning;
and storing the target camera parameters as camera stability parameters in the current scanning process, and using the camera stability parameters as initial parameters of the camera at the beginning of the next scanning.
Alternatively, the refinement function and the extension function of the program may be described with reference to the above.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same 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 (8)

1. The dictionary pen camera parameter adjusting method is characterized by comprising the following steps of:
when the scanning starts, using the stored camera stabilization parameters in the last scanning process as initial parameters of the camera; the stored camera stabilization parameters in the last scanning process are parameters after the camera parameters tend to be stabilized in the last scanning process of the dictionary pen;
in the process of the current scanning, acquiring each frame of image acquired by a camera until the current scanning is finished, and determining a corresponding target camera parameter when acquiring a target image, wherein the target image is an image with the image quality meeting a set quality requirement acquired in the process of the current scanning, and the set quality requirement is one or more images with highest image quality;
storing the target camera parameters as camera stability parameters in the current scanning process, wherein the camera stability parameters are used as initial parameters of a camera at the beginning of the next scanning;
the determining the corresponding target camera parameters when the target image is acquired comprises the following steps:
in the scanning process, after each frame of image is acquired, calculating the contrast of the current frame of image, and judging whether the contrast of the current frame of image is larger 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 acquired before the current frame of image in the scanning process;
if yes, 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 current scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the current scanning process.
2. The method of claim 1, wherein the process of calculating the contrast of the image comprises:
acquiring gray values of all pixel points in an image;
and calculating the gray average value of the image based on the gray value of each pixel point in the image, calculating the gray variance of the image based on the gray value of each pixel point 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.
3. The method as recited in claim 1, further comprising:
before the scanning starts, judging whether the dictionary pen is used for the first time after being started, if yes, using the set camera parameters as initial parameters when the dictionary pen starts to scan for the first time.
4. The method as recited in claim 1, further comprising:
before the scanning starts, judging whether the dictionary pen is just switched from a dormant state to an awake state, if so, using the camera stabilizing parameter stored last time before dormancy as an initial parameter of the camera.
5. The method according to claim 1, wherein, during the present scanning, each frame of image acquired by the camera is acquired until the present scanning is finished, including:
after the starting work of the camera of the dictionary pen is detected, confirming the start of the scanning, and continuously acquiring each frame of image acquired by the camera;
after the camera is detected to stop working, the end of the scanning is confirmed.
6. The method of any of claims 1, 3-5, wherein the camera parameters include exposure parameters and gain parameters.
7. A dictionary pen camera parameter adjustment device, comprising:
the initial parameter setting unit is used for using the stored camera stabilization parameters in the last scanning process as initial parameters of the camera when the current scanning starts; the stored camera stabilization parameters in the last scanning process are parameters after the camera parameters tend to be stabilized in the last scanning process of the dictionary pen;
the image processing unit is used for acquiring each frame of image acquired by the camera in the current scanning process until the current scanning is finished, and determining corresponding target camera parameters when acquiring target images, wherein the target images are images with the image quality meeting the set quality requirement, and the set quality requirement is one or more images with the highest image quality;
the target camera parameter storage unit is used for storing the target camera parameters as camera stability parameters in the current scanning process and is used as initial parameters of the camera at the beginning of the next scanning;
the determining the corresponding target camera parameters when the target image is acquired comprises the following steps:
in the scanning process, after each frame of image is acquired, calculating the contrast of the current frame of image, and judging whether the contrast of the current frame of image is larger 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 acquired before the current frame of image in the scanning process;
if yes, 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 current scanning is finished, and taking the recorded historical contrast peak value as a target camera parameter in the current scanning process.
8. 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 configured to execute the program to implement the steps of the dictionary pen camera parameter adjustment method according to any one of claims 1 to 6.
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 CN115767280A (en) 2023-03-07
CN115767280B true 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 (5)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184829A (en) * 2016-08-29 2021-01-05 华为技术有限公司 Method and device for adjusting scanning state

Patent Citations (5)

* 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
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
CN115767280A (en) 2023-03-07

Similar Documents

Publication Publication Date Title
WO2020038072A1 (en) Exposure control method and device, and electronic device
US8290291B2 (en) Digital photographing apparatus and method of controlling the same
JP4834725B2 (en) Method and apparatus for incorporating iris color in red-eye correction
CN101013470B (en) Face importance level determining apparatus and method, and image pickup apparatus
JP5088118B2 (en) Focus adjustment device
CN109194882B (en) Image processing method, image processing device, electronic equipment and storage medium
US8089536B2 (en) Image processing apparatus, image processing method, and program
CN106454077B (en) Shooting method, shooting device and terminal
US20090295931A1 (en) Digital photography apparatus and method for storing consecutive images according to a motion of an object
CN102478743A (en) Photographic device and control method thereof
JP2005303991A (en) Imaging device, imaging method, and imaging program
JP2009089084A (en) Image processing apparatus, imaging apparatus, and image processing method
WO2021169686A1 (en) Photo capture control method and apparatus and computer readable storage medium
JP5166860B2 (en) Image processing apparatus and method, and imaging apparatus
JP2007316599A (en) Display control device and display control program
US20140111638A1 (en) Capturing Images after Sufficient Stabilization of a Device
US20060103741A1 (en) Image capturing apparatus
US10271029B2 (en) Image pickup apparatus and method of controlling an image pickup apparatus
US20080024644A1 (en) System for and method of taking image
CN115767280B (en) Dictionary pen camera parameter adjusting method and device and dictionary pen
JP2007258925A (en) Imaging apparatus, and method of acquiring image
JP2003244620A (en) Image processing method and apparatus, and program
JPWO2018150961A1 (en) Imaging apparatus, control method thereof, and operation program
JP2007265149A (en) Image processor, image processing method and imaging device
JP3985005B2 (en) IMAGING DEVICE, IMAGE PROCESSING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM FOR CAUSING COMPUTER TO EXECUTE THE CONTROL METHOD

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