CN108021697A - Photographing and question searching method based on terminal equipment and terminal equipment - Google Patents
Photographing and question searching method based on terminal equipment and terminal equipment Download PDFInfo
- Publication number
- CN108021697A CN108021697A CN201711372900.9A CN201711372900A CN108021697A CN 108021697 A CN108021697 A CN 108021697A CN 201711372900 A CN201711372900 A CN 201711372900A CN 108021697 A CN108021697 A CN 108021697A
- Authority
- CN
- China
- Prior art keywords
- topic
- image
- terminal device
- target
- ambient light
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000012545 processing Methods 0.000 claims abstract description 28
- 230000009467 reduction Effects 0.000 claims abstract description 8
- 238000011946 reduction process Methods 0.000 claims description 29
- 238000001514 detection method Methods 0.000 claims description 23
- 238000004891 communication Methods 0.000 claims description 11
- 230000003287 optical effect Effects 0.000 claims description 8
- 230000009466 transformation Effects 0.000 claims description 8
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 15
- 230000006870 function Effects 0.000 description 12
- 238000012015 optical character recognition Methods 0.000 description 12
- 238000003860 storage Methods 0.000 description 9
- 238000009826 distribution Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 230000002093 peripheral effect Effects 0.000 description 4
- 244000078534 Vaccinium myrtillus Species 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 235000017848 Rubus fruticosus Nutrition 0.000 description 1
- 235000003095 Vaccinium corymbosum Nutrition 0.000 description 1
- 235000017537 Vaccinium myrtillus Nutrition 0.000 description 1
- 235000021029 blackberry Nutrition 0.000 description 1
- 235000021014 blueberries Nutrition 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 229910052799 carbon Inorganic materials 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000003702 image correction Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000011002 quantification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/30—Noise filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/81—Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention relates to the technical field of terminal equipment, and discloses a photographing and question searching method based on the terminal equipment and the terminal equipment, wherein the method comprises the following steps: the method comprises the steps that when a camera of terminal equipment is used for shooting a to-be-processed question to obtain an initial question image, the intensity of ambient light is detected; judging whether the intensity of the ambient light is smaller than a preset threshold value or not; when the ambient light intensity is smaller than a preset threshold value, carrying out noise reduction processing and image binarization processing on the initial theme image to obtain a target theme image; searching questions according to the target question image to obtain and display a question searching result matched with the target question image; the embodiment of the invention is used for improving the accuracy of the search questions so as to improve the viscosity of the user and the experience of the user.
Description
Technical field
The present invention relates to terminal device technical field, and in particular to a kind of taking pictures based on terminal device searches topic method and end
End equipment.
Background technology
Many e-education products on the market, which are all supported to take pictures, searches topic function, can pass through the camera pair of terminal device
The topic in papery and be focused and take pictures, completed in terminal device after topic takes pictures to obtain topic image, by topic figure
Topic is searched as uploading to take pictures for completion.
Find in practical applications, when ambient light is dark, or take pictures light skewness when, take pictures out
Image has more noise, directly influences optical character identification (Optical Character Recognition, OCR)
Accuracy rate, so as to influence the accuracy rate for searching topic, reduce the usage experience sense of user.
The content of the invention
The embodiment of the invention discloses a kind of taking pictures based on terminal device to search topic method and terminal device, existing for solving
Have in technology causes image noise to directly influence the technical problem for searching topic accuracy rate too much since ambient light is dark.
First aspect present invention discloses a kind of taking pictures based on terminal device and searches topic method, it may include:
While pending topic is shot using the camera of terminal device to obtain initial topic image, environment is detected
Light intensity;
Judge whether the ambient light intensity is less than predetermined threshold value;
When the ambient light intensity is less than the predetermined threshold value, the initial topic image is carried out noise reduction process and
Image binaryzation processing, obtains target topic image;
Topic result is searched using the target topic image as according to carrying out searching topic, obtain that the target topic image matches
And show.
As an alternative embodiment, method further includes disclosed in first aspect present invention:
When the ambient light intensity is more than or equal to the predetermined threshold value, using the initial topic image as foundation
Carry out searching topic, what the acquisition initial topic image matched searches topic result and show.
As an alternative embodiment, in first aspect present invention, it is described using the target topic image as according to
According to carrying out searching topic, obtain that the target topic image matches searches topic result and shows, including:
OCR identifications are carried out to the target topic image, obtain the identification content of the target topic image;
Send the identification content to cloud server so that the cloud server using the identification content for search inscribe according to
Topic result is searched according to what the search target topic image matched;
Described search that the cloud server returns is received to inscribe result and show.
As an alternative embodiment, in first aspect present invention, it is described that the initial topic image is carried out
Noise reduction process and image binaryzation processing, obtain target topic image, including:
Noise reduction process is carried out to the initial topic image using Gaussian transformation, obtains middle topic image;
The middle topic image is converted into gray level image;
Image binaryzation processing is carried out to the gray level image, obtains the target topic image.
As an alternative embodiment, in first aspect present invention, the camera using terminal device
While pending topic is shot to obtain initial topic image, before detecting ambient light intensity, the method further includes:
The terminal device camera is detected to the pending topic institute by the distance measuring sensor built in terminal device
In the target range of object;
Judge the target range whether within a preset range;
While the pending topic of camera shooting using terminal device is to obtain initial topic image, detection
Ambient light intensity, including:
When the target range is in the preset range, wait to locate using described in the camera shooting of the terminal device
Topic is managed to obtain initial topic image, and the light sensor passed through at the same time built in the terminal device detects ambient light
Intensity.
Second aspect of the present invention discloses a kind of terminal device, it may include:
Detection unit, for obtaining initial topic image in the pending topic of camera shooting using terminal device
Meanwhile detect ambient light intensity;
Judging unit, for judging whether the ambient light intensity is less than predetermined threshold value;
Processing unit, it is right for when the judging unit determines that the ambient light intensity is less than the predetermined threshold value
The initial topic image carries out noise reduction process and image binaryzation processing, obtains target topic image;
Topic unit is searched, for carrying out searching topic by foundation of the target topic image, obtains the target topic image phase
It is matched to search topic result and show.
As an alternative embodiment, terminal device further includes disclosed in second aspect of the present invention:
The topic unit of searching is additionally operable to determine the ambient light intensity more than or equal to described in the judging unit
During predetermined threshold value, carry out searching topic using the initial topic image as foundation, what the acquisition initial topic image matched searches topic
As a result and show.
As an alternative embodiment, in second aspect of the present invention, the topic unit of searching includes:
Recognition unit, for carrying out OCR identifications to the target topic image, obtains the identification of the target topic image
Content;
Communication unit, for sending the identification content to cloud server, so that the cloud server is with the knowledge
Other content is to search topic to search topic result according to what the search target topic image matched;
Described search that the communication unit is additionally operable to receive the cloud server return is inscribed result and is shown.
As an alternative embodiment, in second aspect of the present invention, the processing unit includes:
Noise reduction unit, for carrying out noise reduction process to the initial topic image using Gaussian transformation, obtains middle topic
Image;
Converting unit, for the middle topic image to be converted into gray level image;
Binary conversion treatment unit, for carrying out image binaryzation processing to the gray level image, obtains the target topic
Image.
As an alternative embodiment, in second aspect of the present invention, the terminal device further includes:
Distance measuring unit, in the camera using terminal device shooting pending topic in the detection unit to obtain
While initial topic image, before detecting ambient light intensity, by described in the distance measuring sensor detection built in terminal device
The target range of object where terminal device camera to the pending topic;And judge the target range whether
In preset range;
The detection unit is used to shoot pending topic in the camera using terminal device to obtain initial topic figure
While picture, the mode of detection ambient light intensity is specially:
The detection unit, for when the distance measuring unit determines that the target range is in the preset range, profit
The pending topic is shot to obtain initial topic image with the camera of the terminal device, and passes through the end at the same time
Light sensor detection ambient light intensity built in end equipment.
Third aspect present invention discloses a kind of terminal device, it may include:
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, performs any of first aspect
A kind of part or all of step of method.
Fourth aspect present invention discloses a kind of computer-readable recording medium, the computer-readable recording medium storage
Program code, wherein, said program code includes being used for the part or all of step for any one method for performing first aspect
Rapid instruction.
The aspect of the embodiment of the present invention the 5th discloses a kind of computer program product, when the computer program product is being counted
When being run on calculation machine so that the computer performs the part or all of step of any one method of first aspect.
Compared with prior art, the embodiment of the present invention has the advantages that:
In embodiments of the present invention, pending topic is shot in the camera using terminal device to obtain initial topic figure
While picture, ambient light intensity is detected, judges whether the ambient light intensity is less than predetermined threshold value, it is small in ambient light intensity
When predetermined threshold value, noise reduction process is carried out to initial topic image and image binaryzation is handled, so that target topic image is obtained,
Then carry out searching topic using the target topic image as foundation, what acquisition target topic image matched searches topic result and show.Can
To find out, implement the embodiment of the present invention, noise reduction process and image two-value can be carried out to image when ambient light intensity is insufficient
Change is handled, and is reduced influence of the noise to identification image, so as to improve user's viscosity and the usage experience sense of user, is especially solved
Determined night take pictures search topic effect it is poor the problem of.
Brief description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ability
For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is the flow diagram that taking pictures based on terminal device disclosed by the embodiments of the present invention searches topic method;
Fig. 2 is another flow diagram that taking pictures based on terminal device disclosed by the embodiments of the present invention searches topic method;
Fig. 3 is bell curve schematic diagram disclosed by the embodiments of the present invention;
Fig. 4 is the structure diagram of terminal device disclosed by the embodiments of the present invention;
Fig. 5 is another structure diagram of terminal device disclosed by the embodiments of the present invention;
Fig. 6 is another structure diagram of terminal device disclosed by the embodiments of the present invention;
Fig. 7 is another structure diagram of terminal device disclosed by the embodiments of the present invention;
Fig. 8 is another structure diagram of terminal device disclosed by the embodiments of the present invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.Based on this
Embodiment in invention, the every other reality that those of ordinary skill in the art are obtained without making creative work
Example is applied, belongs to the scope of protection of the invention.
It should be noted that the term " comprising " and " having " of the embodiment of the present invention and their any deformation, it is intended that
Be to cover it is non-exclusive include, for example, containing the process of series of steps or unit, method, system, product or equipment not
Be necessarily limited to those steps or the unit clearly listed, but may include not list clearly or for these processes, side
The intrinsic other steps of method, product or equipment or unit.
The embodiment of the invention discloses a kind of taking pictures based on terminal device to search topic method, and the accurate of topic is searched for improving
Rate, so as to improve user's viscosity and user experience sense.The embodiment of the present invention also discloses a kind of terminal device accordingly.
Terminal device disclosed by the embodiments of the present invention includes but are not limited to smart mobile phone, tablet computer, private tutor's equipment, intelligence
Can wearable device etc., wherein, the operating system of terminal device include but not limited to Android operation system, IOS operating system,
Symbian (Saipan) operating system, Black Berry (blackberry, blueberry) operating system, Windows Phone8 operating systems etc., this
Inventive embodiments do not limit.Camera, including front camera or rear camera etc. are additionally provided with terminal device.Under
Face in conjunction with specific embodiments, will be described in detail technical solution of the present invention from terminal device angle.
Embodiment one
Referring to Fig. 1, Fig. 1 searches the flow signal of topic method for taking pictures based on terminal device disclosed by the embodiments of the present invention
Figure;It may include as shown in Figure 1, a kind of taking pictures based on terminal device searches topic method:
101st, terminal device detects ring while pending topic is shot using camera to obtain initial topic image
Border light intensity.
Wherein, terminal device carries out image preview by camera to pending topic, by image preview accurately to gather
Jiao arrives pending topic, and shooting image preview is to obtain initial topic image, and terminal device equipment detects ambient light at the same time
Line strength.
It is appreciated that can be built-in with light sensor in terminal device, terminal device searches topic and touches instruction receiving
When, the camera in triggering terminal equipment carries out the light sensor detection ambient light in image preview and triggering terminal equipment
Line strength.
102nd, terminal device judges whether the ambient light intensity is less than predetermined threshold value.Wherein, it is small in ambient light intensity
When predetermined threshold value, step 103 is turned to;When ambient light intensity is more than or equal to predetermined threshold value, step 105 is turned to.
Especially, it should be noted that when ambient light intensity is equal to predetermined threshold value, it can turn to and perform step 103,
It can turn to and perform step 105, be only specifically described in embodiments of the present invention exemplified by turning to and performing 105.
By quantification it can put into practice and detect, determine noise control in the reasonable scope minimum when taking pictures
Light intensity, is arranged to predetermined threshold value by the minimum light intensity and preserves.
103rd, terminal device carries out initial topic image noise reduction process and image binaryzation is handled, and obtains target topic figure
Picture.
It is appreciated that terminal device is passed through by carrying out noise reduction process and image binaryzation processing to initial topic image
Correction to blurred picture, by initial topic image noise carry out noise reduction process, reduce noise influence, then to noise reduction after
Picture carry out binary conversion treatment, improve the follow-up accuracy rate for searching topic.
104th, terminal device is searched using target topic image as according to carrying out searching topic, obtain that the target topic image matches
Topic result is simultaneously shown.
105th, terminal device is searched using initial topic image as according to carrying out searching topic, obtain that the initial topic image matches
Topic result is simultaneously shown.
In embodiments of the present invention, pending topic is shot in the camera using terminal device to obtain initial topic figure
While picture, ambient light intensity is detected, judges whether the ambient light intensity is less than predetermined threshold value, it is small in ambient light intensity
When predetermined threshold value, noise reduction process is carried out to initial topic image and image binaryzation is handled, so that target topic image is obtained,
Then carry out searching topic using the target topic image as foundation, what acquisition target topic image matched searches topic result and show.Can
To find out, implement the embodiment of the present invention, noise reduction process and image two-value can be carried out to image when ambient light intensity is insufficient
Change handle, reduce noise to identify image influence, especially solve the problems, such as night take pictures search topic effect it is poor, so as to carry
High user's viscosity and the usage experience sense of user.
Embodiment two
Referring to Fig. 2, Fig. 2 is another flow that taking pictures based on terminal device disclosed by the embodiments of the present invention searches topic method
Schematic diagram;It may include as shown in Fig. 2, a kind of taking pictures based on terminal device searches topic method:
201st, terminal device detects ring while pending topic is shot using camera to obtain initial topic image
Border light intensity.
In some enforceable modes, terminal device is arrived by built-in distance measuring sensor detection terminal equipment camera
The target range of object where pending topic;And judge the target range whether within a preset range;In the target range
When within a preset range, pending topic is shot using the camera of terminal device to obtain initial topic image, and at the same time
Ambient light intensity is detected by the light sensor built in terminal device.By the embodiment, it can prevent user from grasping by mistake
Make.
In other enforceable modes, terminal device receive search topic and touch instruction when, pass through built-in ranging
Target range of the sensor detection terminal equipment camera to object where pending topic;And judge that the target range is
It is no within a preset range;The target range within a preset range when, utilize the camera of terminal device to shoot pending topic
To obtain initial topic image, and ambient light intensity is detected by the light sensor built in terminal device at the same time.
In other enforceable modes, terminal device gathers the learning parameter on user, which includes
Learning time section and study place, create to start to take pictures according to the learning parameter and search the entry condition of topic function;In terminal device
Under holding state, after the entry condition is detected, pending topic is shot to obtain initial topic image using camera, with
And ambient light intensity is detected at the same time., can be automatically in systems from standby shape when meeting entry condition by the embodiment
Start to take pictures in state and search topic function, reduce Booting sequence, greatly improve to take pictures and search the operating efficiency of topic.
202nd, terminal device judges whether the ambient light intensity is less than predetermined threshold value.Wherein, it is small in ambient light intensity
When predetermined threshold value, step 203 is turned to;When ambient light intensity is more than or equal to predetermined threshold value, step 207 is turned to.
Especially, it should be noted that when ambient light intensity is equal to predetermined threshold value, it can turn to and perform step 203,
It can turn to and perform step 207, be only specifically described in embodiments of the present invention exemplified by turning to and performing 207.
203rd, terminal device carries out noise reduction process using Gaussian transformation to initial topic image, obtains middle topic image.
It should be noted that Gaussian transformation carries out noise reduction process using Gaussian density function to initial topic image.Tool
Body, built-in Gaussian density function, is less than default threshold in the ambient light intensity for shooting initial topic image in terminal device
During value, noise reduction process is carried out to initial topic image using Gaussian density function, obtains middle topic image.
Wherein, the formula of Gaussian density function is as follows:
Wherein, x represents the pixel in initial topic image, and f (x) represents the pixel value of pixel, and μ is normal distribution
Desired value, σ are standard deviation, and normal distribution curve is bell-like, are referred to as bell curve.Referring to Fig. 3, Fig. 3 is implemented for the present invention
Bell curve schematic diagram disclosed in example;From figure 3, it can be seen that initially in some region in topic image, pixel
Pixel value is in normal distribution.Two nearer pixels of distance, its pixel value should be closer, if some pixel pixel
Value differs larger with the pixel value of peripheral image vegetarian refreshments, it may be determined that the pixel is noise, then will use peripheral image vegetarian refreshments picture
The average value of plain value replaces the pixel value of this pixel, realizes and noise is smoothed, reach to initial topic figure
Purpose as carrying out noise reduction.
204th, the middle topic image is converted into gray level image by terminal device.
205th, terminal device carries out image binaryzation processing to the gray level image, obtains target topic image.
206th, terminal device carries out optical character identification OCR identifications to target topic image, obtains the target topic image
Identification content.
Execution of step 206, turns to step 208.
207th, terminal device carries out optical character identification OCR identifications to initial topic image, obtains the initial topic image
Identification content.
208th, terminal device to cloud server send identification content so that cloud server using the identification content for search inscribe
Topic result is searched according to what search target topic image matched.
209th, terminal device receives searching topic result and showing for cloud server return.
As can be seen that by above-described embodiment, when ambient light intensity is less than predetermined threshold value, Gaussian density function is utilized
Noise reduction process is carried out to initial topic image, middle topic image is obtained, gray processing processing then is carried out to middle topic image,
Gray level image is converted into, then to Binary Sketch of Grey Scale Image processing, so as to obtain target topic image, is then inscribed with the target
Mesh image is that foundation carries out searching topic, and what acquisition target topic image matched searches topic result and show;Noise is reduced to scheme identification
The influence of picture, especially solving the problems, such as to take pictures night, to search topic effect poor, so as to improve making for user's viscosity and user
Use experience sense.When ambient light intensity is more than or equal to predetermined threshold value, initial topic image clearly, easily carries out OCR knowledges
Not, it is used directly for searching topic.
Embodiment three
Referring to Fig. 4, Fig. 4 is the structure diagram of terminal device disclosed by the embodiments of the present invention;It is as shown in figure 4, a kind of
Terminal device may include:
Detection unit 410, for obtaining initial topic figure in the pending topic of camera shooting using terminal device
While picture, ambient light intensity is detected;
Judging unit 420, for judging whether the ambient light intensity is less than predetermined threshold value;
Processing unit 430, for when above-mentioned judging unit 420 determines that the ambient light intensity is less than predetermined threshold value,
Noise reduction process and image binaryzation processing are carried out to the initial topic image, obtain target topic image;
Topic unit 440 is searched, for carrying out searching topic using the target topic image as foundation, target topic image is obtained and matches
Topic of searching result and show.
In embodiments of the present invention, detection unit 410 shoots pending topic to obtain in the camera using terminal device
While obtaining initial topic image, ambient light intensity is detected, it is pre- that judging unit 420 judges whether the ambient light intensity is less than
If threshold value, when ambient light intensity is less than predetermined threshold value, processing unit 430 carries out noise reduction process and figure to initial topic image
As binary conversion treatment, so as to obtain target topic image, then search topic unit 440 and searched by foundation of the target topic image
Topic, what acquisition target topic image matched searches topic result and shows.As can be seen that implement the embodiment of the present invention, can be in ring
When border light intensity is insufficient, noise reduction process is carried out to image and image binaryzation is handled, reduces influence of the noise to identification image,
Especially solve the problems, such as night take pictures search topic effect it is poor, so as to improve user's viscosity and the usage experience sense of user.
In some enforceable modes, above-mentioned topic unit 440 of searching is additionally operable to determine the ambient light in judging unit 420
When line strength is more than or equal to the predetermined threshold value, carries out searching topic by foundation of initial topic image, obtain initial topic figure
What picture matched searches topic result and shows.
Further, above-mentioned topic unit 440 of searching is specifically used for, and determines that the ambient light intensity is big in judging unit 420
When the predetermined threshold value, to initial topic image carry out OCR identifications, obtain identification content, using identify content as
According to carrying out searching topic, searching of obtaining that initial topic image matches is inscribed result and is shown.
Example IV
Referring to Fig. 5, Fig. 5 is another structure diagram of terminal device disclosed by the embodiments of the present invention;End shown in Fig. 5
End equipment is to optimize to obtain on the basis of terminal device shown in Fig. 4, above-mentioned to search in the terminal device shown in Fig. 5
Topic unit 440 includes:
Recognition unit 510, for carrying out optical character identification OCR identifications to target topic image, obtains the target topic
The identification content of image;
Communication unit 520, for sending the identification content to cloud server, so that cloud server is with the identification content
To search topic topic result is searched according to what search target topic image matched;
Above-mentioned communication unit 520 is additionally operable to receive searching topic result and showing for cloud server return.
In some enforceable modes, above-mentioned recognition unit 510 is also particularly useful for definite described in judging unit 420
When ambient light intensity is more than or equal to the predetermined threshold value, to initial topic image carry out OCR identifications, identified in
Hold;And
Above-mentioned communication unit 520 sends the identification content to cloud server, so that cloud server is with the identification content
To search topic topic result is searched according to what search target topic image matched;Communication unit 520 receives searching for cloud server return
Topic result is simultaneously shown.
Embodiment five
Referring to Fig. 6, Fig. 6 is another structure diagram of terminal device disclosed by the embodiments of the present invention;End shown in Fig. 6
End equipment is to optimize to obtain on the basis of terminal device shown in Fig. 4, in the terminal device shown in Fig. 6, above-mentioned place
Reason unit 430 includes:
Noise reduction unit 610, for carrying out noise reduction process to the initial topic image using Gaussian transformation, obtains middle topic
Image;
Converting unit 620, for middle topic image to be converted into gray level image;
Binary conversion treatment unit 630, for carrying out image binaryzation processing to above-mentioned gray level image, obtains target topic figure
Picture.
Noise reduction unit 610 carries out noise reduction process, specifically, gaussian density using Gaussian density function to initial topic image
The formula of function is as follows:
Wherein, x represents the pixel in initial topic image, and f (x) represents the pixel value of pixel, and μ is normal distribution
Desired value, σ are standard deviation, and normal distribution curve is bell-like, are referred to as bell curve.Incorporated by reference to Fig. 3, from figure 3, it can be seen that
In some region in initial topic image, the pixel value of pixel is in normal distribution.Two nearer pixels of distance, its
Pixel value should be closer, if some pixel pixel value differs larger with the pixel value of peripheral image vegetarian refreshments, it may be determined that
The pixel is noise, then the pixel value of this pixel will be replaced using the average value of peripheral image vegetarian refreshments pixel value, it is real
Now noise is smoothed, achievees the purpose that to carry out noise reduction to initial topic image.
Embodiment six
Referring to Fig. 7, Fig. 7 is another structure diagram of terminal device disclosed by the embodiments of the present invention;End shown in Fig. 7
End equipment is to optimize to obtain on the basis of terminal device shown in Fig. 4, and the terminal device shown in Fig. 7 further includes:
Distance measuring unit 710, for shooting pending topic using the camera of terminal device in above-mentioned detection unit 410
While to obtain initial topic image, before detecting ambient light intensity, examined by the distance measuring sensor built in terminal device
Terminal device camera is surveyed to the target range of object where pending topic;And judge the target range whether default
In the range of;
Above-mentioned detection unit 410 is used to shoot pending topic in the camera using terminal device to obtain initial topic
While image, the mode of detection ambient light intensity is specially:
Above-mentioned detection unit 410, for when distance measuring unit 710 determines target range within a preset range, utilizing the end
The camera of end equipment shoots pending topic to obtain initial topic image, and at the same time by the terminal device built in light
Line sensors sense environmental light intensity.
In some enforceable modes, above-mentioned detection unit 410 is used to gather the learning parameter on user, the study
Parameter includes learning time section and study place, is created to start to take pictures according to the learning parameter and searches the entry condition of topic function;
Under terminal device holding state, after the entry condition is detected, pending topic is shot using camera to obtain initial topic
Mesh image, and ambient light intensity is detected at the same time., can automatically in systems when meeting entry condition by the embodiment
Start to take pictures from holding state and search topic function, reduce Booting sequence, greatly improve to take pictures and search the operating efficiency of topic.
Embodiment seven
Referring to Fig. 8, Fig. 8 is another structure diagram of terminal device disclosed by the embodiments of the present invention;End shown in Fig. 8
End equipment may include:At least one processor 810, such as CPU, memory 820, at least one communication bus 830, input unit
840, output device 850.Wherein, communication bus 830 is used for realization the communication connection between these components.Memory 820 can be with
It is high-speed RAM memory or non-labile memory (non-volatile memory), for example, at least a magnetic
Disk storage.Memory 820 optionally can also be at least one storage device for being located remotely from aforementioned processor 810.Wherein,
Processor 810 can combine the described terminal devices of Fig. 4 to Fig. 7, batch processing code be stored in memory 820, and handle
Device 810 calls the program code stored in memory 820, for performing following operation:
While pending topic is shot using the camera of terminal device to obtain initial topic image, environment is detected
Light intensity;
Judge whether the ambient light intensity is less than predetermined threshold value;
When the ambient light intensity is less than the predetermined threshold value, the initial topic image is carried out noise reduction process and
Image binaryzation processing, obtains target topic image;
Topic result is searched using the target topic image as according to carrying out searching topic, obtain that the target topic image matches
And show.
Alternatively, above-mentioned processor 810 can be also used for performing following steps:
When the ambient light intensity is more than or equal to the predetermined threshold value, using the initial topic image as foundation
Carry out searching topic, what the acquisition initial topic image matched searches topic result and show.
Alternatively, above-mentioned processor 810 can be also used for performing following steps:
Optical character identification OCR identifications are carried out to the target topic image, obtain the identification of the target topic image
Content;
Send the identification content to cloud server so that the cloud server using the identification content for search inscribe according to
Topic result is searched according to what the search target topic image matched;
Described search that the cloud server returns is received to inscribe result and show.
Alternatively, above-mentioned processor 810 can be also used for performing following steps:
Noise reduction process is carried out to the initial topic image using Gaussian transformation, obtains middle topic image;
The middle topic image is converted into gray level image;
Image binaryzation processing is carried out to the gray level image, obtains the target topic image.
Alternatively, above-mentioned processor 810 can be also used for performing following steps:
The terminal device camera is detected to the pending topic institute by the distance measuring sensor built in terminal device
In the target range of object;
Judge the target range whether within a preset range;
When the target range is in the preset range, wait to locate using described in the camera shooting of the terminal device
Topic is managed to obtain initial topic image, and the light sensor passed through at the same time built in the terminal device detects ambient light
Intensity.
By above-mentioned terminal device, noise reduction process and image two can be carried out to image when ambient light intensity is insufficient
Value is handled, and is reduced noise to identifying the influence of image, is improved OCR recognition accuracies, is enabled in particular to solve night and is taken pictures and search topic
The problem of effect is poor, so as to improve user's viscosity and the usage experience sense of user.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
To instruct relevant hardware to complete by program, which can be stored in a computer-readable recording medium, storage
Medium include read-only storage (Read-Only Memory, ROM), random access memory (Random Access Memory,
RAM), programmable read only memory (Programmable Read-only Memory, PROM), erasable programmable is read-only deposits
Reservoir (Erasable Programmable Read Only Memory, EPROM), disposable programmable read-only storage (One-
Time Programmable Read-Only Memory, OTPROM), the electronics formula of erasing can make carbon copies read-only storage
(Electrically-Erasable Programmable Read-Only Memory, EEPROM), read-only optical disc (Compact
Disc Read-Only Memory, CD-ROM) or other disk storages, magnetic disk storage, magnetic tape storage or can
For carrying or storing any other computer-readable medium of data.
The above-mentioned unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical location, you can positioned at a place, or can also be distributed to multiple nets
On network unit.Partly or entirely unit therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can be integrated in a processing unit or
Unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated unit
Both it can be realized, can also be realized in the form of SFU software functional unit in the form of hardware.
If above-mentioned integrated unit realized in the form of SFU software functional unit and as independent production marketing or in use,
It can be stored in a retrievable memory of computer.Based on such understanding, technical scheme substantially or
Person says all or part of of the part to contribute to the prior art or the technical solution, can be in the form of software product
Embody, which is stored in a memory, including some requests are with so that a computer is set
Standby (can be personal computer, server or network equipment etc., can be specifically the processor in computer equipment) performs
The part or all of step of each embodiment above method of the present invention.
Topic method is searched to a kind of taking pictures based on terminal device disclosed by the embodiments of the present invention above and terminal device carries out
It is discussed in detail, specific case used herein is set forth the principle of the present invention and embodiment, above example
Explanation be only intended to help understand the present invention method and its core concept;Meanwhile for those of ordinary skill in the art,
According to the thought of the present invention, there will be changes in specific embodiments and applications, in conclusion in this specification
Appearance should not be construed as limiting the invention.
Claims (12)
1. a kind of taking pictures based on terminal device searches topic method, it is characterised in that including:
While pending topic is shot using the camera of terminal device to obtain initial topic image, ambient light is detected
Intensity;
Judge whether the ambient light intensity is less than predetermined threshold value;
When the ambient light intensity is less than the predetermined threshold value, noise reduction process and image are carried out to the initial topic image
Binary conversion treatment, obtains target topic image;
Result is inscribed as searching of according to carrying out searching topic, obtaining that the target topic image matches using the target topic image and is shown
Show.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
When the ambient light intensity is more than or equal to the predetermined threshold value, using the initial topic image as according to progress
Topic is searched, what the acquisition initial topic image matched searches topic result and show.
3. method according to claim 1 or 2, it is characterised in that described using the target topic image as according to progress
Topic is searched, obtain that the target topic image matches searches topic result and shows, including:
Optical character identification OCR identifications are carried out to the target topic image, obtain the identification content of the target topic image;
The identification content is sent to cloud server, so that the cloud server is searched using the identification content as topic foundation is searched
What Suo Suoshu target topic images matched searches topic result;
Described search that the cloud server returns is received to inscribe result and show.
4. according to the method described in claim 1, it is characterized in that, it is described the initial topic image is carried out noise reduction process and
Image binaryzation processing, obtains target topic image, including:
Noise reduction process is carried out to the initial topic image using Gaussian transformation, obtains middle topic image;
The middle topic image is converted into gray level image;
Image binaryzation processing is carried out to the gray level image, obtains the target topic image.
It is 5. according to the method described in claim 1, it is characterized in that, described pending in the camera shooting using terminal device
While topic is to obtain initial topic image, before detecting ambient light intensity, the method further includes:
Thing where detecting the terminal device camera to the pending topic by the distance measuring sensor built in terminal device
The target range of body;
Judge the target range whether within a preset range;
While the pending topic of camera shooting using terminal device is to obtain initial topic image, environment is detected
Light intensity, including:
When the target range is in the preset range, the pending topic is shot using the camera of the terminal device
Mesh is to obtain initial topic image, and by the light sensor built in the terminal device to detect ambient light at the same time strong
Degree.
A kind of 6. terminal device, it is characterised in that including:
Detection unit, for obtaining the same of initial topic image in the pending topic of camera shooting using terminal device
When, detect ambient light intensity;
Judging unit, for judging whether the ambient light intensity is less than predetermined threshold value;
Processing unit, for when the judging unit determines that the ambient light intensity is less than the predetermined threshold value, to described
Initial topic image carries out noise reduction process and image binaryzation processing, obtains target topic image;
Topic unit is searched, for carrying out searching topic by foundation of the target topic image, the target topic image is obtained and matches
Topic of searching result and show.
7. terminal device according to claim 6, it is characterised in that the terminal device further includes:
The topic unit of searching is additionally operable to determine that the ambient light intensity is more than or equal to described preset in the judging unit
During threshold value, carry out searching topic using the initial topic image as foundation, what the acquisition initial topic image matched searches topic result
And show.
8. the terminal device according to claim 6 or 7, it is characterised in that the topic unit of searching includes:
Recognition unit, for carrying out optical character identification OCR identifications to the target topic image, obtains the target topic figure
The identification content of picture;
Communication unit, for sending the identification content to cloud server, so that the cloud server is with the identification
Hold and search topic result according to what the search target topic image matched to search topic;
Described search that the communication unit is additionally operable to receive the cloud server return is inscribed result and is shown.
9. terminal device according to claim 6, it is characterised in that the processing unit includes:
Noise reduction unit, for carrying out noise reduction process to the initial topic image using Gaussian transformation, obtains middle topic image;
Converting unit, for the middle topic image to be converted into gray level image;
Binary conversion treatment unit, for carrying out image binaryzation processing to the gray level image, obtains the target topic image.
10. terminal device according to claim 6, it is characterised in that the terminal device further includes:
Distance measuring unit, for initial to obtain in the pending topic of camera shooting using terminal device in the detection unit
While topic image, before detecting ambient light intensity, the terminal is detected by the distance measuring sensor built in terminal device
The target range of object where equipment camera to the pending topic;And judge the target range whether default
In the range of;
The detection unit is used to shoot pending topic in the camera using terminal device to obtain initial topic image
Meanwhile the mode for detecting ambient light intensity is specially:
The detection unit, for when the distance measuring unit determines that the target range is in the preset range, utilizing institute
The camera for stating terminal device shoots the pending topic to obtain initial topic image, and is set at the same time by the terminal
Standby built-in light sensor detection ambient light intensity.
A kind of 11. terminal device, it is characterised in that including:
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, performs such as claim 1 to right
It is required that 5 any one of them taking pictures based on terminal device searches topic method.
12. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium is used for storage program generation
Code, wherein, said program code causes computer to perform as claim 1 to claim 5 any one of them is based on terminal
Topic method is searched in taking pictures for equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711372900.9A CN108021697B (en) | 2017-12-19 | 2017-12-19 | Photographing and question searching method based on terminal equipment, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711372900.9A CN108021697B (en) | 2017-12-19 | 2017-12-19 | Photographing and question searching method based on terminal equipment, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108021697A true CN108021697A (en) | 2018-05-11 |
CN108021697B CN108021697B (en) | 2020-11-06 |
Family
ID=62074243
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711372900.9A Active CN108021697B (en) | 2017-12-19 | 2017-12-19 | Photographing and question searching method based on terminal equipment, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108021697B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103179464A (en) * | 2011-12-23 | 2013-06-26 | 乐金电子(中国)研究开发中心有限公司 | Method and device for obtaining program information in external input device of television |
CN103491313A (en) * | 2013-10-09 | 2014-01-01 | 安徽三联交通应用技术股份有限公司 | Fill light lamp automatic control method based on video analysis |
CN105100636A (en) * | 2015-08-11 | 2015-11-25 | 广东欧珀移动通信有限公司 | Image processing method and mobile terminal |
CN105975560A (en) * | 2016-04-29 | 2016-09-28 | 广东小天才科技有限公司 | Question searching method and device of intelligent equipment |
CN106303234A (en) * | 2016-08-11 | 2017-01-04 | 广东小天才科技有限公司 | photographing processing method and device |
CN106844474A (en) * | 2016-12-23 | 2017-06-13 | 广东小天才科技有限公司 | Method and device for searching questions by photographing |
CN107451127A (en) * | 2017-07-04 | 2017-12-08 | 广东小天才科技有限公司 | Word translation method and system based on image and mobile device |
-
2017
- 2017-12-19 CN CN201711372900.9A patent/CN108021697B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103179464A (en) * | 2011-12-23 | 2013-06-26 | 乐金电子(中国)研究开发中心有限公司 | Method and device for obtaining program information in external input device of television |
CN103491313A (en) * | 2013-10-09 | 2014-01-01 | 安徽三联交通应用技术股份有限公司 | Fill light lamp automatic control method based on video analysis |
CN105100636A (en) * | 2015-08-11 | 2015-11-25 | 广东欧珀移动通信有限公司 | Image processing method and mobile terminal |
CN105975560A (en) * | 2016-04-29 | 2016-09-28 | 广东小天才科技有限公司 | Question searching method and device of intelligent equipment |
CN106303234A (en) * | 2016-08-11 | 2017-01-04 | 广东小天才科技有限公司 | photographing processing method and device |
CN106844474A (en) * | 2016-12-23 | 2017-06-13 | 广东小天才科技有限公司 | Method and device for searching questions by photographing |
CN107451127A (en) * | 2017-07-04 | 2017-12-08 | 广东小天才科技有限公司 | Word translation method and system based on image and mobile device |
Also Published As
Publication number | Publication date |
---|---|
CN108021697B (en) | 2020-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109376667B (en) | Target detection method and device and electronic equipment | |
CN108446669B (en) | Motion recognition method, motion recognition device and storage medium | |
CN110674696B (en) | Monitoring method, device, system, monitoring equipment and readable storage medium | |
CN108600612B (en) | Photographing method and mobile terminal | |
CN109725699B (en) | Identification code identification method, device and equipment | |
CN103399632A (en) | Gesture control method and mobile terminal | |
CN107944382B (en) | Method for tracking target, device and electronic equipment | |
CN112613475A (en) | Code scanning interface display method and device, mobile terminal and storage medium | |
CN107479710B (en) | Intelligent mirror and control method, device, equipment and storage medium thereof | |
CN108781252B (en) | Image shooting method and device | |
CN112291473B (en) | Focusing method and device and electronic equipment | |
CN108875512B (en) | Face recognition method, device, system, storage medium and electronic equipment | |
CN110298256B (en) | Vein identification method and related device | |
CN110738078A (en) | face recognition method and terminal equipment | |
CN110245607A (en) | Eyeball tracking method and Related product | |
CN114125226A (en) | Image shooting method and device, electronic equipment and readable storage medium | |
CN110291771B (en) | Depth information acquisition method of target object and movable platform | |
CN110677580A (en) | Shooting method, shooting device, storage medium and terminal | |
CN104063041A (en) | Information processing method and electronic equipment | |
CN110580055B (en) | Action track identification method and mobile terminal | |
CN108038485A (en) | Learning content searching method and electronic equipment | |
CN107992872A (en) | Method for carrying out text recognition on picture and mobile terminal | |
CN108021697A (en) | Photographing and question searching method based on terminal equipment and terminal equipment | |
CN112036307A (en) | Image processing method and device, electronic equipment and storage medium | |
US10877641B2 (en) | Image adjustment method, apparatus, device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |