CN110070080A - A kind of character detecting method and device, equipment and computer readable storage medium - Google Patents

A kind of character detecting method and device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN110070080A
CN110070080A CN201910184219.4A CN201910184219A CN110070080A CN 110070080 A CN110070080 A CN 110070080A CN 201910184219 A CN201910184219 A CN 201910184219A CN 110070080 A CN110070080 A CN 110070080A
Authority
CN
China
Prior art keywords
image
pixels
block
detected
default
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910184219.4A
Other languages
Chinese (zh)
Inventor
梅嵩
蔡海蛟
冯歆鹏
周骥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunshan Zhaoguan Electronic Technology Co Ltd
Shanghai Zhao Ming Electronic Technology Co Ltd
Original Assignee
Kunshan Zhaoguan Electronic Technology Co Ltd
Shanghai Zhao Ming Electronic 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 Kunshan Zhaoguan Electronic Technology Co Ltd, Shanghai Zhao Ming Electronic Technology Co Ltd filed Critical Kunshan Zhaoguan Electronic Technology Co Ltd
Priority to CN201910184219.4A priority Critical patent/CN110070080A/en
Publication of CN110070080A publication Critical patent/CN110070080A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/107Static hand or arm
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Abstract

This application discloses a kind of character detecting method and devices, this method comprises: obtaining image to be detected of object to be detected, and the image to be detected is converted into the image containing hue information, wherein the pixel in the image with hue information is respectively provided with corresponding tone value;The tone value of pixel is compared with default tone value range, obtains at least one block of pixels being made of pixel of the tone value within the scope of default tone value;Selection meets the block of pixels of preset condition from least one described block of pixels, determines text detection region according to the position of selected block of pixels.Using this method, text detection region can be quickly and accurately identified, removal does not need the region of text detection, improves text detection speed, improves text detection accuracy, improves user experience.Also disclose corresponding equipment and computer readable storage medium.

Description

A kind of character detecting method and device, equipment and computer readable storage medium
Technical field
This application involves text detection technical field more particularly to a kind of character detecting methods and device, equipment and calculating Machine readable storage medium storing program for executing.
Background technique
Currently, there is text detection demand in many application fields, and it is desirable that text detection is not only quickly but also accurate, and And the power consumption of text detection equipment is again low.Text detection technology in the prior art is specifically included that based on traditional computer vision Text detection, and the deep learning text detection based on artificial intelligence.But in practical applications, traditional calculations are based on The text detection mode of machine vision is influenced by factors such as light, noise, background pictures, the accuracy rate of text detection and identification It is very low;And the deep learning text detection mode based on artificial intelligence uses and is based on convolutional neural networks (CNN), although most of In the case of text detection and the accuracy rate of identification it is higher, but its operation is high to hardware resource requirements, the speed of service is relatively slow, power consumption Height, and text detection equipment needs the support of image processing unit (GPU), however mobile phone, intelligent glasses etc. are portable Hardware resource on formula electronic equipment is limited and limited battery capacity, so that deep learning text detection is in portable electronic device The difficulty of upper operation is larger, and user experience is very poor.
The text detection mode that therefore, it is necessary to a kind of speeds of service is fast, low in energy consumption, accuracy rate is high, is particularly suitable for It is run on portable electronic device, passes through default indicant (such as pointer or hand with Indication Characteristics especially suitable for user Refer to, specially tip portion or nail) it is directed toward the case where being desired with the region of Text region.
Summary of the invention
The embodiment of the present application provides one kind and is used for character detecting method and device, equipment and computer readable storage medium, To solve following technical problem in the prior art: existing text detection mode is by factors such as light, noise, background pictures Influence, the accuracy rate of text detection and identification is very low, or to hardware resource requirements, the high, speed of service is relatively slow, power consumption is high.
The embodiment of the present application adopts the following technical solutions:
A kind of character detecting method, comprising:
Image to be detected of object to be detected is obtained, and image to be detected is converted into the image containing hue information, In this there is the pixel in the image of hue information to be respectively provided with corresponding tone value;
The tone value of pixel is compared with default tone value range, is obtained by tone value within the scope of default tone value Pixel composition at least one block of pixels;
Selection meets the block of pixels of preset condition from least one described block of pixels, and the position according to selected block of pixels is true Determine text detection region.
In the present invention, object to be detected can be any object that user is desired with Text region, can by with Family is directed toward using default indicant (such as pointer or finger with Indication Characteristics, specially tip portion or nail), so as to It is accurate to determine the partial region for being desired with Text region.In addition, the resolution ratio of image to be detected can be required here it is lower, It can even is that the preview graph that portable electronic device is shot by camera, it is therefore desirable to carry out the data volume of image procossing It is few, be conducive to improve processing speed.Certainly, the image to be detected be also possible to camera shooting picture photo rather than preview Figure.
Preferably, image to be detected is converted to the image containing hue information can specifically include: will be described to be detected Image is converted to the image in single channel containing hue information, and image to be detected is preferably converted to the image of HSV format, Wherein for the pixel in the image of the HSV format other than being respectively provided with tone value, being also respectively provided with indicates color saturation Intensity value and the brightness value for indicating lightness information.
Preferably, the value range of tone value is 0 to 180, and default tone value may range from 0 to 25.Certainly, here Default tone value range it is related to target user's hand skin color of detection, can according to the specific colour of skin situation of target user into The customized setting of row or by the automatic acquistion of Face Detection training, therefore may be other specific ranges, the present invention couple This is not construed as limiting.
Preferably, the intensity value that the pixel at least one described block of pixels has is being preset within the scope of intensity value, And the brightness value having is in default brightness value scope.
Preferably, the value range of intensity value is 0 to 255, and default intensity value may range from 58 to 173;It is bright The value range of angle value is 0 to 255, and default brightness value scope can be 50 to 255.
Preferably, the block of pixels that selection meets preset condition from least one described block of pixels can be with specifically: from institute It states and selects the maximum block of pixels of area at least one block of pixels.
Preferably, the character detecting method can also include: to be detected from image to be detected comprising default indicant Indicant image-region, the default indicant preferably with Indication Characteristics pointer, tip portion or nail,
Wherein from least one described block of pixels selection meet preset condition block of pixels specifically may is that from it is described to The block of pixels containing the indicant image-region is selected in a few block of pixels.
Preferably, the position of the block of pixels according to selected by determines that text detection region can be with specifically: according to selected picture The position of the indicant image-region in plain block determines the text detection region in image to be detected.
Preferably, from least one described block of pixels selection meet the block of pixels of preset condition after, the method Can also include: obtained again after user removes default indicant object to be detected, have compared with image to be detected Another image to be detected of higher resolution, and determine that text detection region can be specific according to the position of selected block of pixels It is: determines that the region above indicant image-region position is text detection region in described another image to be detected.This hair In bright, by obtaining the image of object to be detected again after user removes finger, so that there is no user's finger in the image Possible word segment is covered, the position of predetermined indicant image-region is recycled, can completely identify indicant The position of image-region and its neighbouring text;The image can use to be detected than determining text detection region before Image has higher resolution ratio, to improve the accuracy of Text region.
In addition, in the present invention, the region above indicant image-region position refers to that ordinate is greater than instruction in image The region of the ordinate of object image regional location, the image-region being not limited solely to right above indicant image-region position, It further include the other image-regions parallel with the image-region right above this, that is to say, that above indicant image-region position Region include in image all ordinates be greater than indicant image-region position ordinate region.
Preferably, indicant image-region of the detection comprising default indicant may include: from image to be detected
Image to be detected is converted into grayscale image, and using the CascadeClassifier function from OpenCV from The default indicant image-region is detected in the grayscale image.
In addition, also providing a kind of text detection device corresponding with above-mentioned character detecting method, comprising:
Image processing module, is used to obtain image to be detected of object to be detected, and image to be detected is converted to and is contained There is the image of hue information, wherein the pixel in the image with hue information is respectively provided with corresponding tone value;
Comparison module is used to for the tone value of pixel being compared with default tone value range, and acquisition is existed by tone value At least one block of pixels of pixel composition within the scope of default tone value;
Determining module is used to select to meet from least one described block of pixels the block of pixels of preset condition, according to institute The position of block of pixels is selected to determine text detection region.
Preferably, image to be detected is converted to the image containing hue information can be with specifically: by the mapping to be checked Picture is converted to the image in single channel containing hue information, and image to be detected is preferably converted to the image of HSV format, Pixel in the image of middle HSV format is also respectively provided with the saturation for indicating color saturation other than being respectively provided with tone value Angle value and the brightness value for indicating lightness information.
Preferably, the value range of tone value is 0 to 180, and default tone value range is 0 to 25.
Preferably, the intensity value that the pixel at least one described block of pixels has is being preset within the scope of intensity value, And the brightness value having is in default brightness value scope.
Preferably, the value range of intensity value is 0 to 255, and default intensity value range is 58 to 173;It is stated clearly The value range of angle value is 0 to 255, and the default brightness value scope is 50 to 255.
Preferably, the block of pixels that selection meets preset condition from least one described block of pixels can be with specifically: from institute It states and selects the maximum block of pixels of area at least one block of pixels.
Preferably, image processing module can be also used for indicant of the detection comprising default indicant from image to be detected Image-region, perform the operation default indicant preferably with Indication Characteristics pointer, tip portion or nail,
The block of pixels that wherein determining module selects to meet from least one described block of pixels preset condition can be with specifically: Determining module selects the block of pixels containing indicant image-region at least one described block of pixels.
Preferably, determining module can be also used for:
According to the position of indicant image-region described in selected block of pixels, the text detection area in image to be detected is determined Domain.
Preferably, image processing module can be also used for: select to meet default item from least one described block of pixels After the block of pixels of part, object to be detected, the tool compared with current image to be detected are obtained again after user removes finger There is another image to be detected of higher resolution;
And the determining module determines that text detection region may include: described another according to the position of selected block of pixels Determine that the region above indicant image-region position is text detection region in one image to be detected.
Preferably, described image processing module detects the indicant figure comprising default indicant from described image to be detected As the step of region may include:
Described image to be detected is converted into grayscale image, and using the CascadeClassifier function of OpenCV from The default indicant image-region is detected in the grayscale image.
In addition, additionally providing a kind of equipment for being used for text detection accordingly, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
Memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one Device is managed to execute, so that at least one described processor is able to carry out:
Image to be detected of object to be detected is obtained, and image to be detected is converted into the image containing hue information, In this there is the pixel in the image of hue information to be respectively provided with corresponding tone value;
The tone value of pixel is compared with default tone value range, is obtained by tone value within the scope of default tone value Pixel composition at least one block of pixels;
Selection meets the block of pixels of preset condition from least one described block of pixels, and the position according to selected block of pixels is true Determine text detection region.
In addition, additionally providing a kind of non-volatile computer readable storage medium storing program for executing for text detection, it is stored thereon with Computer executable instructions, the computer executable instructions are set as the execution when being run by processor:
Image to be detected of object to be detected is obtained, and image to be detected is converted into the image containing hue information, In this there is the pixel in the image of hue information to be respectively provided with corresponding tone value;
The tone value of pixel is compared with default tone value range, is obtained by tone value within the scope of default tone value Pixel composition at least one block of pixels;
Selection meets the block of pixels of preset condition from least one described block of pixels, and the position according to selected block of pixels is true Determine text detection region.
At least one above-mentioned technical solution that the embodiment of the present application uses can reach following the utility model has the advantages that by will be to be checked Altimetric image is converted to such as HSV format of the picture format with hue information, according to hue information and can combine user colour Setting default tone value range and detect user's hand image-region, so as to quickly and accurately identify text detection Region, and can be the image that preview graph etc. has low resolution for detecting image to be detected of hand here, it is significant to drop Image processing data amount before low Text region improves hand and detects speed, fast implements hard recognition and tracking;In addition, knot Indicant (such as pointer, tip portion or nail with Indication Characteristics) image-region detection algorithm is closed, it can be more accurate Ground detects the position of user's hand and finger (such as finger tip), avoids the dry of the background color same or similar with user colour It disturbs, therefore, can prepare to determine that user wishes the character area for detecting and identifying, removal does not need the region of text detection, mentions High text detection speed reduces equipment power dissipation, improves text detection accuracy, improves user experience.Moreover, determining text inspection After surveying region, can re-shoot be subsequently used for carrying out text detection, with the image detected for hand compared with higher The image of resolution ratio, to improve the accuracy of text detection and identification.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the flow diagram according to the character detecting method of one embodiment of the application;
Fig. 2 is the schematic diagram for being used to carry out image to be detected of hand detection according to an example, which is in practical application For cromogram;
Image to be detected, is converted into the schematic diagram of HSV format-pattern by the example according to Fig. 3;
The example according to Fig. 4 obtains the schematic diagram of black white image after carrying out threshold transition to HSV image;
Fig. 5 is that the signal of finger nail (i.e. a kind of default indicant) detection is carried out to image to be detected according to another example Figure, wherein the finger nail that will test is shown with box;
Fig. 6 is to show the schematic diagram of error detection result occur when individually carrying out hand detection using HSV picture format;
Fig. 7 is the schematic diagram according to the text detection device of one embodiment of the application;
Fig. 8 is the schematic diagram according to the text detection equipment of one embodiment of the application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
The scheme of the application is described in detail below.
Fig. 1 is the flow diagram according to the character detecting method of one embodiment of the application.In the process, from equipment angle For degree, executing subject can be one or more portable electronic device, such as smart phone, intelligent eyes etc., more It can be to body and the associated functional module of camera in these equipment;For program angle, executing subject correspondingly may be used It is answered with the program being mounted on these portable electronic devices, such as the application of language translation application, Text region, text casting With etc..
Process in Fig. 1 may comprise steps of S101-S103.
S101: image to be detected of object to be detected is obtained, and image to be detected is converted into the figure containing hue information Picture, wherein there is the pixel in the image of hue information to be respectively provided with corresponding tone value for this.
As shown in Figure 2, image to be detected example of acquired object to be detected is shown, image to be detected can lead to Various modes are crossed to obtain, for example, by camera shoot obtain, can by take pictures obtain or by video recording obtain, certainly to Detection image can also have other sources, such as from other equipment, or be also possible to ready-made image, the present invention to this not It is limited.It should be noted that although the picture due to patent application document the substantive requirements of form and be illustrated as grayscale image, In practical applications, image to be detected should be cromogram.Here object to be detected is that user is desired with Text region Object can be any object, the invention is not limited in this regard.
In this step, image to be detected can be also converted to containing hue information (such as containing single channel hue information) Image, pixel therein is respectively provided with corresponding tone value, identifies to be able to use the hue information in subsequent step The default indicant image section (i.e. block of pixels) of pre-set color is had in the image out, such as is identified with user colour Finger part, as tip portion or nail or it is other have Indication Characteristics (such as with particular color and/or specific shape) Any indicant.The example for the image containing hue information that image to be detected that showing in Fig. 3 will acquire is converted to, Contain hue information in single channel in the example images, this is different from RGB image, and in RGB image, needing will be multiple logical Road, which is spliced, can just obtain hue information (such as crocus is not belonging to any one in three kinds of Essential colour of RGB, therefore Need to splice red and green and obtain crocus), thus can not be extracted from image an individual channel and predetermined color into Row is relatively to identify default indicant.It should be noted that although the Fig. 3 due to patent application document the substantive requirements of form and shown For grayscale image, but in fact, converting the resulting image containing hue information from image to be detected should also be as cromogram.
S102: the tone value of pixel is compared with default tone value range, is obtained by tone value in default tone value At least one block of pixels of pixel composition in range.
In this step, it is preassigned according to the color for the indicant for playing indicative function for presetting tone value range. By the way that the tone value of pixel in image obtained by conversion in step S101 to be compared with default tone value range, this can be derived that Tone value presets at least one block of pixels composed by the pixel within the scope of tone value at this in image, wherein it is described at least one Block of pixels includes default indicant image section.That is, by the step special color can be met from screening in image Adjust the block of pixels of range.Shown in fig. 3 in example, if it is desired to which the Target indication object screened is the finger of people, then will Default tone value range is set as specific human skin color, then after step S102, can screen in example shown in fig. 3 User's hand of right part in image, except of course that except user's hand, step S102 may also can by book cover with people Hand color it is identical or approximate image section filters out.As shown in Figure 4, for having hue information shown in Fig. 3 Image carries out hue threshold and compares to be converted into the image after black white image, wherein by its tone value in image obtained by step S101 The color of pixel within the scope of default tone value is changed to white, and tone value is not preset the pixel within the scope of tone value at this Color be changed to black, it can be seen from the figure that white portion in addition to include user's hand other than, further include other multiple pixels Block, that is to say, that multiple block of pixels including user's hand have been filtered out in step S101.
S103: selection meets the block of pixels of preset condition from least one described block of pixels, according to selected block of pixels Position determines text detection region.Herein, preset condition can be varied, is preset.For example, preset condition can To be the block of pixels comprising preset shape, or the block of pixels of nail etc. comprising identifying.
In the present invention, object to be detected can be any object that user is desired with Text region, can by with Family is directed toward using default indicant (such as pointer or finger with Indication Characteristics, specially tip portion or nail), so as to It is accurate to determine the partial region for being desired with Text region.In addition, the resolution ratio of image to be detected can be required here it is lower, It can even is that the preview graph that portable electronic device is shot by camera, it is therefore desirable to carry out the data volume of image procossing It is few, be conducive to improve processing speed.Certainly, the image to be detected be also possible to camera shooting picture photo rather than preview Figure.
Preferably, image to be detected is converted to the image containing hue information can specifically include: by image to be detected The image of HSV format is converted to, wherein the pixel in the image of the HSV format is also distinguished other than being respectively provided with tone value Brightness value with the intensity value and expression lightness information that indicate color saturation.HSV (tone H, saturation degree S, lightness V) is According to the intuitive nature of color by A.R.Smith in a kind of color space of creation in 1978, also referred to as hexagonal pyramid model.
In HSV image, tone value can be measured with angle, and value range is 0 °~360 °, by the inverse time since red Needle direction calculating, red are 0 °, and green is 120 °, and blue is 240 °, their complementary color is: yellow is 60 °, and cyan is 180 °, Magenta is 300 °.Certainly, the specific value range of tone value can also carry out linear transformation, to adapt to specifically apply, such as It is illustrated so that tone value value range is 0 to 180 as an example in the embodiment of the present invention, the invention is not limited in this regard.Saturation degree S Color is indicated close to the degree of spectrum colour, usual value range is 0%~100%, and value is bigger, and color is more saturated;Certainly, it is saturated The specific value range of degree can also carry out linear transformation, to adapt to specifically apply, such as with saturation in the embodiment of the present invention Angle value value range is illustrated for being 0 to 255, the invention is not limited in this regard.Lightness indicates bright degree, right In light source colour, brightness value is related with the brightness of illuminator;For object color, the transmittance or reflectivity of this value and object have It closes, usual value range is 0% (black) to 100% (white);Certainly, the specific value range of lightness can also linearly be become It changes, is illustrated so that brightness value value range is 0 to 255 as an example to adapt to specifically apply, such as in the embodiment of the present invention, this Invention to this with no restriction.
It will be appreciated by those skilled in the art that the three dimensional representation of HSV iconic model can develop from RGB Cube, It is the examples from RGB image format to HSV image format conversion below such as:
R '=R/255
G '=G/255
B '=B/255
C max=max (R, G, B)
C min=min (R ', G ', B ')
Δ=C max-C min
H is calculated:
S is calculated:
V is calculated:
V=C max
Wherein R, G, B indicate red, the green and blue value of each pixel in RGB image format, and H, S and V indicate HSV figure The tone value of each pixel, intensity value and brightness value in format, value range is respectively 0-360 °, 0-1 and 0-1.
In the present embodiment, the value range of tone value is 0 to 180, and default tone value may range from 0 to 25.When So, here default tone value range is related to target user's hand skin color of detection, can be according to the specific skin of target user Pornographic condition carries out customized setting or by the automatic acquistion of Face Detection training, therefore may be other specific ranges, This is not limited by the present invention.
In addition, when the tone value of each pixel is compared with default tone value range in HSV image, can also will Its corresponding protection scope is compared the intensity value and brightness value of pixel respectively, selects tone value, intensity value and bright The angle value block of pixels that the pixel in corresponding range forms respectively, so that the pixel at least one described block of pixels had Intensity value is within the scope of default intensity value, and the brightness value having is in default brightness value scope.
For example, the value range of intensity value is 0 to 255, and default intensity value may range from 58 to 173;Lightness The value range of value is 0 to 255, and default brightness value scope can be 50 to 255.
In the present embodiment, at least one obtained described block of pixels might not be entirely desired block of pixels, example It such as might not be entirely the block of pixels comprising default indicant, it is therefore necessary to further be screened to it.For example, from institute State at least one block of pixels selection meet the block of pixels of preset condition can be with specifically: at least one described block of pixels Select the maximum block of pixels of area.
In addition, presence and its position by detecting the default indicant in image, are conducive to more accurately detect Target text detection zone out.For example, the character detecting method can also include: to detect from image to be detected comprising default The indicant image-region of indicant, the default indicant preferably with Indication Characteristics pointer, tip portion or nail, But it is also possible to other objects with default specific shape.When detecting default indicant (such as nail), can use The existing available algorithm from OpenCV is realized, for example, by using the CascadeClassifier function in OpenCV (https: //docs.opencv.org/3.2.0/d1/de5/classcv_1_1CascadeClassifie r.html) come real It is existing.Before using the function, needs image to be detected being converted into grayscale image, which is fed as input to the letter Number, and those skilled in the art will recognize that remaining the input parameter for according to specific application and setting the function, such as ScaleFactor (input picture carries out reduced scale, such as value 1.1 in identification every time), minNeighbors are (i.e. Each frame, which needs minimum how many to close on frame, can just determine that it is believable frame, such as value 3), the value of minimum frame (such as value 24 × 24 block of pixels), the value (such as 50 × 50 block of pixels of value) of maximum frame, be enable to detect from the grayscale image Default indicant image-region, wherein any existing mode, this hair can be used when image to be detected is converted into grayscale image It is bright that this is also not limited.
Using the function, by study, can be recognized accurately pointer in image with Indication Characteristics, tip portion or The indicants such as nail portions, so that the present invention can be more quasi- when user indicates target text region by the indicant Really according to the position of the indicant identified (such as shown in label 500 in Fig. 5), determine in image pointed by the indicant Accurate word segment (i.e. target text detection zone), and unnecessary Text region region is eliminated, so that subsequent Text region is more efficient.
On the contrary, it can be seen that carrying out at least one described block of pixels into one in conjunction with default indicant from the example of Fig. 6 Step screening, can be further improved the accuracy of text detection region recognition.As shown in fig. 6, the pixel determined according to tone value Block will include the cabinet image section 600 in the lower right corner in hand images part and image in figure (because of cabinet color and hand Color is close), and since cabinet seems bigger than hand in the picture, so when being selected according to maximum pixel block principle, it can Word segment indicated by cabinet image section can be determined as target text detection zone to identify, so default instruction Object can be conducive to more accurately identify text detection region.
In another example, from least one described block of pixels selection meet the block of pixels of preset condition after, institute The method of stating can also include: obtained again after user removes default indicant object to be detected, with image to be detected phase Determine that text detection region can be with than another image to be detected with higher resolution, and according to the position of selected block of pixels Specifically: determining that the region above indicant image-region position is text detection region in described another image to be detected. In the present invention, by obtaining the image of object to be detected again after user removes finger, so that there is no user in the image Finger covers possible word segment, recycles the position of predetermined indicant image-region, can completely identify and refer to Show object image region position and its neighbouring text;The image can than before for determine text detection region and use to Detection image has higher resolution ratio, to improve the accuracy of Text region.
In addition, in the present invention, the region above indicant image-region position refers to that ordinate is greater than instruction in image The region of the ordinate of object image regional location, the image-region being not limited solely to right above indicant image-region position, It further include the other image-regions parallel with the image-region right above this, that is to say, that above indicant image-region position Region include in image all ordinates be greater than indicant image-region position ordinate region.
It should be noted that above-named some specific examples reflect the thought of application scheme, but it is not Unique form of implementation, the thought based on application scheme can obtain more similar examples.
Based on same thinking, some embodiments of the present application additionally provide the corresponding text detection device of the above method, Equipment and nonvolatile computer storage media.
As shown in fig. 7, showing the schematic diagram of the text detection device according to one embodiment of the application, which includes:
Image processing module 701 is used to obtain image to be detected of object to be detected, and image to be detected is converted to Image containing hue information, wherein the pixel in the image with hue information is respectively provided with corresponding tone value;
Comparison module 702 is used to for the tone value of pixel being compared with default tone value range, obtains by tone value At least one block of pixels of pixel composition within the scope of default tone value;
Determining module 703 is used to select to meet from least one described block of pixels the block of pixels of preset condition, according to The position of selected block of pixels determines text detection region.
Image to be detected is converted to the image containing hue information can be with specifically: image to be detected is converted to HSV The image of format, wherein the pixel in the image of HSV format is also respectively provided with expression color other than being respectively provided with tone value The intensity value of saturation degree and the brightness value for indicating lightness information.
In one example, the value range of tone value is 0 to 180, and default tone value range is 0 to 25.
The intensity value that pixel at least one described block of pixels has is being preset within the scope of intensity value, and have Brightness value is in default brightness value scope.
In one example, the value range of intensity value is 0 to 255, and default intensity value range is 58 to 173;Institute The value range for stating angle value clearly is 0 to 255, and the default brightness value scope is 50 to 255.
The block of pixels that selection meets preset condition from least one described block of pixels can be with specifically: from described at least one The maximum block of pixels of area is selected in a block of pixels.
Image processing module 701 can be also used for instruction object image of the detection comprising default indicant from image to be detected Region, the default indicant can be pointer, tip portion or nail with Indication Characteristics,
Wherein determining module 703 selects the block of pixels for meeting preset condition can be specific from least one described block of pixels Are as follows: determining module 703 is selected at least one described block of pixels containing detected default indicant image-region Block of pixels.
Determining module 703 can be also used for: the position of indicant image-region be preset according to selected block of pixels, really Determine the text detection region in image to be detected.
Image processing module 701 can be also used for: select to meet preset condition from least one described block of pixels After block of pixels, obtained again after user removes finger object to be detected, compared with current image to be detected have more High-resolution another image to be detected;
And determining module 703 determines that text detection region may include: described another according to the position of selected block of pixels Determine that the region above default indicant image-region position is text detection region in one image to be detected.
In addition, image processing module 701 detects the indicant image-region comprising default indicant from image to be detected The step of may include:
Image to be detected is converted into grayscale image, and uses the CascadeClassifier function of OpenCV from the ash Default indicant image-region is detected in degree figure.
At least one above-mentioned technical solution that the embodiment of the present application uses can reach following the utility model has the advantages that by will be to be checked Altimetric image is converted to such as HSV format of the picture format with hue information, according to hue information and can combine user colour Setting default tone value range and detect user's hand image-region, so as to quickly and accurately identify text detection Region, and can be the image that preview graph etc. has low resolution for detecting image to be detected of hand here, it is significant to drop Image processing data amount before low Text region improves hand and detects speed, fast implements hard recognition and tracking;In addition, knot Indicant image-region detection algorithm is closed, can detect the position of user's hand and finger (such as finger tip) more accurately, The interference of the background color same or similar with user colour is avoided, therefore, can prepare to determine that user wishes to detect and identify Character area, removal do not need the region of text detection, improves text detection speed, reduce equipment power dissipation, improve text inspection Accuracy is surveyed, user experience is improved.Moreover, can re-shoot after determining text detection region and be subsequently used for carrying out text Detection, with the image detected for hand compared with higher resolution image, thus improve text detection and identify Accuracy.
Fig. 8 is according to the schematic diagram of the text detection equipment of one embodiment of the application, which includes:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
Memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one Device is managed to execute, so that at least one described processor is able to carry out:
Image to be detected of object to be detected is obtained, and image to be detected is converted into the image containing hue information, In this there is the pixel in the image of hue information to be respectively provided with corresponding tone value;
The tone value of pixel is compared with default tone value range, is obtained by tone value within the scope of default tone value Pixel composition at least one block of pixels;
Selection meets the block of pixels of preset condition from least one described block of pixels, and the position according to selected block of pixels is true Determine text detection region.
According to some embodiments of the present application, provide corresponding with character detecting method described above for text detection Nonvolatile computer storage media, be stored thereon with computer executable instructions, which is set as The execution when being run by processor:
Image to be detected of object to be detected is obtained, and image to be detected is converted into the image containing hue information, In this there is the pixel in the image of hue information to be respectively provided with corresponding tone value;
The tone value of pixel is compared with default tone value range, is obtained by tone value within the scope of default tone value Pixel composition at least one block of pixels;
Selection meets the block of pixels of preset condition from least one described block of pixels, and the position according to selected block of pixels is true Determine text detection region.
Various embodiments are described in a progressive manner in the application, same and similar part between each embodiment It may refer to each other, each embodiment focuses on the differences from other embodiments.Especially for device, set For standby and computer readable storage medium embodiment, since it is substantially similar to the method embodiment, so its description carries out Simplify, related place can be found in the part explanation of embodiment of the method.
Device, equipment and computer readable storage medium provided by the embodiments of the present application and method be it is one-to-one, because This, device, equipment and computer readable storage medium also have the similar advantageous effects of corresponding method, due to upper Face is described in detail the advantageous effects of method, and therefore, which is not described herein again, and device, equipment and computer can Read the advantageous effects of storage medium.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (22)

1. a kind of character detecting method characterized by comprising
Image to be detected of object to be detected is obtained, and image to be detected is converted into the image containing hue information, wherein institute It states the pixel in the image with hue information and is respectively provided with corresponding tone value;
The tone value of the pixel is compared with default tone value range, is obtained by tone value in the default tone value model At least one block of pixels of pixel composition in enclosing;
Selection meets the block of pixels of preset condition from least one described block of pixels, determines text according to the position of selected block of pixels Word detection zone.
2. character detecting method as described in claim 1, which is characterized in that described to be converted to image to be detected containing tone The image of information includes: that described image to be detected is converted to image in single channel containing hue information, preferably by institute The image that image to be detected is converted to HSV format is stated, wherein the pixel in the image of the HSV format is described in addition to being respectively provided with Except tone value, also it is respectively provided with the intensity value for indicating color saturation and indicates the brightness value of lightness information.
3. character detecting method as claimed in claim 2, which is characterized in that the value range of the tone value is 0 to 180, And the default tone value range is 0 to 25.
4. character detecting method as claimed in any one of claims 1-3, which is characterized in that at least one described block of pixels The intensity value that has of pixel within the scope of default intensity value, and the brightness value having is in default brightness value scope.
5. character detecting method as claimed in claim 4, which is characterized in that the value range of the intensity value be 0 to 255, and the default intensity value range is 58 to 173;The value range of the brightness value be 0 to 255, and it is described preset it is bright Angle value range is 50 to 255.
6. character detecting method according to any one of claims 1 to 5, which is characterized in that from least one described block of pixels The block of pixels that middle selection meets preset condition includes: the selection maximum block of pixels of area at least one described block of pixels.
7. character detecting method according to any one of claims 1 to 5, which is characterized in that further include: from described to be detected Indicant image-region of the detection comprising default indicant, finger of the default indicant preferably with Indication Characteristics in image Needle, tip portion or nail,
It includes: from least one described pixel that wherein selection, which meets the block of pixels of preset condition, from least one described block of pixels The block of pixels for containing the indicant image-region is selected in block.
8. character detecting method as claimed in claim 7, which is characterized in that the position of the block of pixels according to selected by determines text Word detection zone includes:
According to the position of indicant image-region described in selected block of pixels, the text detection region in image to be detected is determined.
9. character detecting method as claimed in claim 7, which is characterized in that in the selector from least one described block of pixels After the block of pixels for closing preset condition, the method also includes:
Obtained again after user removes the default indicant object to be detected, compared with described image to be detected Another image to be detected with higher resolution, and the position of the block of pixels according to selected by determines that text detection region is wrapped It includes: determining that the region above indicant image-region position is text detection region in described another image to be detected.
10. character detecting method as claimed in any one of claims 7-9, which is characterized in that from described image to be detected Detection includes that the indicant image-region of default indicant includes:
Described image to be detected is converted into grayscale image, and using CascadeClassifier function from the grayscale image Detect the default indicant image-region.
11. a kind of text detection device characterized by comprising
Image processing module is used to obtain image to be detected of object to be detected, and image to be detected is converted to containing coloured The image of information is adjusted, wherein the pixel in the image with hue information is respectively provided with corresponding tone value;
Comparison module is used to for the tone value of the pixel being compared with default tone value range, and acquisition is existed by tone value At least one block of pixels of pixel composition within the scope of the default tone value;
Determining module is used to select to meet from least one described block of pixels the block of pixels of preset condition, according to selected picture The position of plain block determines text detection region.
12. text detection device as claimed in claim 11, which is characterized in that described to be converted to image to be detected containing coloured The image for adjusting information includes: that described image to be detected is converted to image in single channel containing hue information, preferably will Described image to be detected is converted to the image of HSV format, wherein the pixel in the image of the HSV format is in addition to being respectively provided with It states except tone value, be also respectively provided with the intensity value for indicating color saturation and indicate the brightness value of lightness information.
13. text detection device as claimed in claim 12, which is characterized in that the value range of the tone value be 0 to 180, and the default tone value range is 0 to 25.
14. the text detection device as described in any one of claim 11-13, which is characterized in that at least one described pixel The intensity value that pixel in block has is within the scope of default intensity value, and the brightness value having is in default brightness value scope It is interior.
15. text detection device as claimed in claim 14, which is characterized in that the value range of the intensity value be 0 to 255, and the default intensity value range is 58 to 173;The value range of the brightness value be 0 to 255, and it is described preset it is bright Angle value range is 50 to 255.
16. the text detection device as described in any one of claim 11-15, which is characterized in that from least one described picture It includes: the selection maximum pixel of area at least one described block of pixels that selection, which meets the block of pixels of preset condition, in plain block Block.
17. the text detection device as described in any one of claim 11-15, which is characterized in that described image processing module It is also used to detect the indicant image-region comprising the default indicant, the default indicant from described image to be detected Preferably with the pointer, tip portion or nail of Indication Characteristics,
It includes: described true that wherein the determining module selects the block of pixels for meeting preset condition from least one described block of pixels Cover half block selects the block of pixels containing the indicant image-region at least one described block of pixels.
18. text detection device as claimed in claim 17, which is characterized in that the determining module is used for:
According to the position of indicant image-region described in selected block of pixels, the text detection region in image to be detected is determined.
19. text detection device as claimed in claim 17, which is characterized in that described image processing module is also used to: from After selection meets the block of pixels of preset condition at least one described block of pixels, after user removes the default indicant Obtain again the object to be detected, compared with described image to be detected with higher resolution another image to be detected;
And the determining module determines that text detection region includes: described another to be detected according to the position of selected block of pixels Determine that the region above indicant image-region position is text detection region in image.
20. the text detection device as described in any one of claim 17-19, which is characterized in that described image processing module Indicant image-region of the detection comprising default indicant includes: from described image to be detected
Described image to be detected is converted into grayscale image, and using CascadeClassifier function from the grayscale image Detect the default indicant image-region.
21. a kind of equipment for text detection characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one Device is managed to execute, so that at least one described processor is able to carry out:
Image to be detected of object to be detected is obtained, and image to be detected is converted into the image containing hue information, wherein institute It states the pixel in the image with hue information and is respectively provided with corresponding tone value;
The tone value of the pixel is compared with default tone value range, is obtained by tone value in the default tone value model At least one block of pixels of pixel composition in enclosing;
Selection meets the block of pixels of preset condition from least one described block of pixels, determines text according to the position of selected block of pixels Word detection zone.
22. a kind of non-volatile computer readable storage medium storing program for executing for text detection is stored thereon with the executable finger of computer It enables, which is characterized in that the computer executable instructions are set as the execution when being run by processor:
Image to be detected of object to be detected is obtained, and image to be detected is converted into the image containing hue information, wherein institute It states the pixel in the image with hue information and is respectively provided with corresponding tone value;
The tone value of the pixel is compared with default tone value range, is obtained by tone value in the default tone value model At least one block of pixels of pixel composition in enclosing;
Selection meets the block of pixels of preset condition from least one described block of pixels, determines text according to the position of selected block of pixels Word detection zone.
CN201910184219.4A 2019-03-12 2019-03-12 A kind of character detecting method and device, equipment and computer readable storage medium Pending CN110070080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910184219.4A CN110070080A (en) 2019-03-12 2019-03-12 A kind of character detecting method and device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910184219.4A CN110070080A (en) 2019-03-12 2019-03-12 A kind of character detecting method and device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110070080A true CN110070080A (en) 2019-07-30

Family

ID=67365189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910184219.4A Pending CN110070080A (en) 2019-03-12 2019-03-12 A kind of character detecting method and device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110070080A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111383054A (en) * 2020-03-10 2020-07-07 中国联合网络通信集团有限公司 Advertisement checking method and device
CN111445466A (en) * 2020-04-01 2020-07-24 济南浪潮高新科技投资发展有限公司 Bolt anti-screwing-leakage detection method and device and medium
CN111711758A (en) * 2020-06-29 2020-09-25 广东小天才科技有限公司 Multi-pointing test question shooting method and device, electronic equipment and storage medium
CN112580594A (en) * 2020-12-29 2021-03-30 浙江大华技术股份有限公司 Document identification method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169540A (en) * 2011-03-28 2011-08-31 汉王科技股份有限公司 Camera-based point reading positioning method and device
CN107424125A (en) * 2017-04-14 2017-12-01 深圳市金立通信设备有限公司 A kind of image weakening method and terminal
CN108875694A (en) * 2018-07-04 2018-11-23 百度在线网络技术(北京)有限公司 Speech output method and device
CN109325464A (en) * 2018-10-16 2019-02-12 上海翎腾智能科技有限公司 A kind of finger point reading character recognition method and interpretation method based on artificial intelligence

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169540A (en) * 2011-03-28 2011-08-31 汉王科技股份有限公司 Camera-based point reading positioning method and device
CN107424125A (en) * 2017-04-14 2017-12-01 深圳市金立通信设备有限公司 A kind of image weakening method and terminal
CN108875694A (en) * 2018-07-04 2018-11-23 百度在线网络技术(北京)有限公司 Speech output method and device
CN109325464A (en) * 2018-10-16 2019-02-12 上海翎腾智能科技有限公司 A kind of finger point reading character recognition method and interpretation method based on artificial intelligence

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RAINBOW想要OFFER: ""opencv的cascade分类器源码分析"", 《CSDN》 *
廖宁放等: "《数字图文图像颜色管理系统概论》", 31 May 2009, 北京理工大学出版社 *
高志强等: "《深度学习:从入门到实战》", 30 June 2018, 中国铁道出版社 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111383054A (en) * 2020-03-10 2020-07-07 中国联合网络通信集团有限公司 Advertisement checking method and device
CN111445466A (en) * 2020-04-01 2020-07-24 济南浪潮高新科技投资发展有限公司 Bolt anti-screwing-leakage detection method and device and medium
CN111445466B (en) * 2020-04-01 2023-05-05 山东浪潮科学研究院有限公司 Bolt anti-leakage screwing detection method, equipment and medium
CN111711758A (en) * 2020-06-29 2020-09-25 广东小天才科技有限公司 Multi-pointing test question shooting method and device, electronic equipment and storage medium
CN111711758B (en) * 2020-06-29 2021-06-18 广东小天才科技有限公司 Multi-pointing test question shooting method and device, electronic equipment and storage medium
CN112580594A (en) * 2020-12-29 2021-03-30 浙江大华技术股份有限公司 Document identification method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110070080A (en) A kind of character detecting method and device, equipment and computer readable storage medium
US11457138B2 (en) Method and device for image processing, method for training object detection model
US9292911B2 (en) Automatic image adjustment parameter correction
CN103646392B (en) Backlighting detecting and equipment
CN108322646A (en) Image processing method, device, storage medium and electronic equipment
CN102576456B (en) The luminance digital image of use range information is adjusted
CN110473185A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN103617432A (en) Method and device for recognizing scenes
CN110191291A (en) Image processing method and device based on multiple image
CN110290289A (en) Image denoising method, device, electronic equipment and storage medium
CN104182721A (en) Image processing system and image processing method capable of improving face identification rate
JP2007047965A (en) Method and device for detecting object of digital image, and program
CN107103606A (en) A kind of image-recognizing method and device
CN103098078A (en) Smile detection systems and methods
JP2013140428A (en) Edge detection device, edge detection program, and edge detection method
CN108322651A (en) Image pickup method and device, electronic equipment, computer readable storage medium
CN109005369A (en) Exposal control method, device, electronic equipment and computer readable storage medium
CN108564558A (en) Wide dynamic images processing method, device, equipment and storage medium
Yan et al. Optimization research on deep learning and temporal segmentation algorithm of video shot in basketball games
CN102333174A (en) Video image processing method and device for the same
US20160140748A1 (en) Automated animation for presentation of images
US20190205689A1 (en) Method and device for processing image, electronic device and medium
CN109191398A (en) Image processing method, device, computer readable storage medium and electronic equipment
CN102447913B (en) Color migration processing method and system
KR20180080618A (en) Method and apparatus for realistic rendering based augmented reality

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