WO2016107037A1 - 图片分类方法及装置 - Google Patents

图片分类方法及装置 Download PDF

Info

Publication number
WO2016107037A1
WO2016107037A1 PCT/CN2015/078114 CN2015078114W WO2016107037A1 WO 2016107037 A1 WO2016107037 A1 WO 2016107037A1 CN 2015078114 W CN2015078114 W CN 2015078114W WO 2016107037 A1 WO2016107037 A1 WO 2016107037A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
module
text
information
sample
Prior art date
Application number
PCT/CN2015/078114
Other languages
English (en)
French (fr)
Inventor
张涛
龙飞
陈志军
Original Assignee
小米科技有限责任公司
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 小米科技有限责任公司 filed Critical 小米科技有限责任公司
Priority to MX2015009736A priority Critical patent/MX360492B/es
Priority to KR1020157026988A priority patent/KR101734860B1/ko
Priority to JP2016567116A priority patent/JP2017509090A/ja
Priority to BR112015019383A priority patent/BR112015019383A2/pt
Priority to RU2015133980A priority patent/RU2643464C2/ru
Priority to US14/932,561 priority patent/US9779294B2/en
Publication of WO2016107037A1 publication Critical patent/WO2016107037A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks

Definitions

  • the present disclosure relates to the field of picture processing technologies, and in particular, to a picture classification method and apparatus.
  • the terminal Since the terminal displays the picture according to the storage time of the picture, if the text picture that the user needs to view is separated by a non-text picture, the viewing efficiency is lowered.
  • the present disclosure provides a picture classification method and device.
  • a picture classification method including:
  • the method further includes:
  • the picture belongs to a text picture class, obtaining valid time information and current time information of the text information in the picture;
  • the picture is deleted.
  • the obtaining the valid time information and the current time information of the text information in the picture includes:
  • the deleting the image includes:
  • the method further includes:
  • Each of the classified pictures is added to the folded picture set corresponding to the category, and the folded picture set is displayed.
  • the displaying the folded picture set includes:
  • the determining, according to the feature information of the picture, the category to which the picture belongs including:
  • Determining the feature information according to a support vector machine SVM model where the SVM model is obtained by training a sample picture, where the sample picture includes a text picture and a non-text picture;
  • the classification to which the picture belongs is determined according to the determination result.
  • the method further includes:
  • the SVM model is obtained according to the type of the sample picture and the histogram.
  • the feature information is a gabor feature value or a gradient direction value.
  • a picture classification apparatus including:
  • a picture acquisition module configured to obtain a picture to be classified
  • a class determining module configured to determine, according to feature information of the picture acquired by the picture acquiring module
  • the category to which the picture belongs, the category includes a text picture class and a non-text picture class;
  • a picture classification module configured to classify the pictures according to the categories determined by the category determination module.
  • the device further includes:
  • the information acquiring module is configured to acquire valid time information and current time information of the text information in the picture when the picture belongs to the text picture class;
  • the duration detecting module is configured to detect, according to the valid time information acquired by the information acquiring module and the current time information, whether the picture is overdue for a first predetermined duration;
  • the picture deletion module is configured to delete the picture when the duration detecting module detects that the picture is overdue for a first predetermined duration.
  • the information acquiring module is configured to read the valid time information from the characters recorded in the picture, or receive the input valid time information when storing the picture; Current time information.
  • the picture deletion module includes:
  • the first deletion sub-module is configured to generate and display prompt information, receive a deletion instruction triggered by the user according to the prompt information, and delete the picture according to the deletion instruction, where the prompt information is used to prompt the picture to expire; or ,
  • a second deletion sub-module configured to transfer the image to a reclaim cache, and obtain a storage duration of the image in the reclaim cache, and if the storage duration is greater than a second predetermined duration, deleting the image, Or receiving an empty instruction to clear the recycle buffer, and deleting the picture according to the clear instruction.
  • the device further includes:
  • a first display module configured to add each of the classified pictures to a folder corresponding to the category and display the folder;
  • the second display module is configured to add each of the classified pictures to the folded picture set corresponding to the category, and display the folded picture set.
  • the second display module includes:
  • a picture extraction sub-module configured to extract a representative picture of the best quality in the folded picture set, or extract a representative picture with the closest storage time in the folded picture set;
  • a picture display submodule configured to display a representative picture of the folded picture set extracted by the picture extraction submodule, ignoring displaying other pictures in the folded picture set; or displaying a representative picture of the folded picture set and other The edge portion of the picture.
  • the category determining module includes:
  • a feature extraction submodule configured to extract feature information of each pixel in the picture
  • a feature determination module configured to extract the extracted from the feature extraction submodule according to a support vector machine SVM model The feature information is determined, and the SVM model is obtained by training a sample picture, where the sample picture includes a text picture and a non-text picture;
  • the classification determination sub-module is configured to determine a classification to which the picture belongs according to the determination result determined by the feature determination module.
  • the device further includes:
  • a resolution normalization module configured to normalize a resolution of the sample picture to a predetermined resolution
  • a feature extraction module configured to extract feature information of each pixel in the sample image normalized by the resolution normalization module
  • a histogram statistics module configured to count a histogram of the feature information in each sample picture partition, where the sample picture partition is obtained by performing area division on the sample picture;
  • a model determining module configured to obtain the SVM model according to the type of the sample picture and the histogram obtained by the histogram statistics module.
  • the feature information is a gabor feature value or a gradient direction value.
  • a picture classification apparatus including:
  • a memory for storing processor executable instructions
  • processor is configured to:
  • the pictures are sorted according to the categories.
  • the category By obtaining the picture to be classified; determining the category to which the picture belongs according to the feature information of the picture, the category includes a text picture class and a non-text picture class; classifying the picture according to the category, and performing the picture according to the text picture class and the non-text picture class.
  • the classification makes the pictures in the text picture class all text pictures, which solves the problem that when the terminal displays the pictures according to the storage time, the non-text pictures are separated between the text pictures, resulting in low efficiency of viewing, and the effect of improving the viewing efficiency is achieved.
  • FIG. 1 is a flowchart of a picture classification method according to an exemplary embodiment.
  • FIG. 2A is a flowchart of a picture classification method according to another exemplary embodiment.
  • 2B is a schematic diagram of a text picture shown in accordance with another exemplary embodiment.
  • 2C is a schematic diagram of a first histogram of a sample picture, shown according to another exemplary embodiment.
  • 2D is a schematic diagram of a second histogram of a sample picture, shown according to another exemplary embodiment.
  • 2E is a schematic diagram showing the display of a first picture classification according to another exemplary embodiment.
  • FIG. 2F is a schematic diagram showing display of a second picture classification according to another exemplary embodiment.
  • 2G is a schematic diagram showing the display of a folded picture set, according to another exemplary embodiment.
  • FIG. 2H is a schematic diagram showing setting of effective time information according to another exemplary embodiment.
  • FIG. 3 is a block diagram of a picture classification apparatus according to an exemplary embodiment.
  • FIG. 4 is a block diagram of a picture classification apparatus according to an exemplary embodiment.
  • FIG. 5 is a block diagram of an apparatus for picture classification, according to an exemplary embodiment.
  • FIG. 1 is a flowchart of a picture classification method according to an exemplary embodiment.
  • the picture classification method is applied to a terminal. As shown in FIG. 1 , the picture classification method includes the following steps.
  • step 101 a picture to be classified is obtained.
  • the category to which the picture belongs is determined according to the feature information of the picture, and the category includes a text picture class and a non-text picture class.
  • step 103 the pictures are sorted according to the category.
  • the image classification method provided by the present disclosure obtains a picture to be classified by using the feature information of the picture, and the category includes a text picture class and a non-text picture class; the picture is classified according to the category, The picture can be classified according to the text picture class and the non-text picture class, so that the pictures in the text picture class are all text pictures, which solves the problem that when the terminal displays the picture according to the storage time, the non-text picture is separated between the text pictures, resulting in viewing.
  • the problem of low efficiency has achieved the effect of improving viewing efficiency.
  • FIG. 2A is a flowchart of a picture classification method according to another exemplary embodiment.
  • the picture classification method is applied to a terminal. As shown in FIG. 2A, the picture classification method includes the following steps.
  • step 201 a picture to be classified is obtained.
  • a picture is a picture stored in a terminal and can include a text picture and a non-text picture.
  • the text image refers to the image containing the text information in the image
  • the non-text image refers to the image other than the text image.
  • FIG. 2B is a text picture obtained by the user after shooting a notification.
  • the text picture includes the title of "Notice”, "The owners of x Park, the line maintenance will be carried out on November 26, 2014, please prepare in advance” and the notice publisher of "x Property Announcement”.
  • the category to which the picture belongs is determined according to the feature information of the picture, and the category includes a text picture class and a non-text picture class.
  • the terminal can determine the category to which the picture belongs according to the character information and the feature information of the graphic information, and the feature information can be a gabor feature value or a gradient direction value.
  • the category information of the picture is determined according to the feature information of the picture, including:
  • the feature information is determined, and the SVM model is obtained by training the sample picture, and the sample picture includes a text picture and a non-text picture;
  • the feature information is extracted, since the text is composed of strokes such as horizontal, vertical, ⁇ , ⁇ , etc., when the feature information is a gabor feature value, the coarseness of the text can be subdivided into five levels, and the direction of the stroke is divided into five. 8 levels, calculate a 40-dimensional gabor feature value for each pixel in the picture; when the feature information is a gradient direction value, calculate the gradient direction value of the pixel point according to the coordinates of each pixel point in the picture .
  • the terminal may also acquire the SVM model, and input the extracted feature information into the SVM model, and determine, by the SVM model, the category of the image according to the feature information, and output the determination result.
  • the determination result is used to indicate that the picture is a text picture, or the determination result is used to indicate that the picture is a non-text picture.
  • the terminal may first acquire the SVM model, and then determine the category of the image according to the SVM model and the feature information.
  • the terminal can acquire the SVM model. For example, when the processing capability of the terminal is strong, the terminal can train the sample picture to obtain the SVM model. Or, when the processing capability of the terminal is weak, the terminal can obtain the SVM model from the server, where the SVM model is the server Obtained after training.
  • the terminal may not acquire the SVM model, but send the feature information to the server, where the server determines the category of the image according to the SVM model and the feature information. The terminal receives the category fed back by the server, and the SVM model is obtained after the server trains the sample picture.
  • the method for training the SVM model according to the sample picture is taken as an example.
  • the image classification method provided in this embodiment further includes:
  • the terminal needs to obtain the first number of text pictures and the second number of non-text pictures, and determine the text picture and the non-text picture as the sample picture.
  • the more the number of sample pictures the more accurate the SVM model obtained by training.
  • the more processing resources are consumed to train the SVM model therefore, the number of sample pictures can be selected according to actual needs.
  • the first quantity can be 50,000 and the second quantity can be 100,000.
  • the resolution of each sample picture acquired by the terminal is different, resulting in different numbers of pixels included in the same sample picture partition, so that the calculated histogram is inaccurate, and therefore, the terminal needs to distinguish the sample picture.
  • the rate is normalized to a predetermined resolution.
  • the predetermined resolution may be set by the terminal.
  • the predetermined resolution may be 300*300 DPI (Dots Per Inch, a pixel per inch), and may be other values, which is not limited in this embodiment.
  • the terminal extracts the feature information of the normalized sample picture, obtains the gabor feature value of each pixel point or obtains the gradient direction value of each pixel point.
  • the terminal can perform statistics on the feature information of a sample picture to obtain a histogram, which is used to represent the distribution of the feature information in the sample picture.
  • the feature information in this embodiment is a gabor feature value or a gradient direction value. Since the gabor feature value and the gradient direction value are not easily visualized in the drawing, the feature information is the gray value of the pixel and the sample.
  • the resolutions of picture a and sample picture b are the same as an example to illustrate the statistical process of the histogram. Referring to the schematic diagram of the first histogram of the sample picture shown in FIG. 2C, it is assumed that the upper half of the sample picture a is composed of black pixels, the lower part is composed of white pixels, and each of the sample pictures b is two. Black pixels are separated by a white pixel.
  • the area of the interval [0, 63] in the histogram of the graph a is 0.5.
  • the area of the interval (191, 255) is 0.5.
  • the area of the interval [0, 63] is 0.5, and the area of the interval (191, 255) is 0.5. That is, the sample picture a
  • the histogram is the same as the histogram of the sample picture b, and the sample picture a is not the same as the sample picture b. It can be seen that the more the statistical feature information is, the more similar the distribution of the feature information is.
  • the terminal can perform zone on the sample picture.
  • the domain is divided, and the sample picture partition is obtained, and then the histogram of the feature information in the sample picture partition is counted.
  • the area of the sample picture is divided into four sample picture partitions.
  • the area of the first sample picture partition in the sample picture a is [0, 63]
  • the interval in the second sample picture partition is [0].
  • , 63] has an area of 1
  • the third sample picture partition has an area of (192, 255) of 1
  • the fourth sample picture partition has an area of (192, 255) of 1.
  • the sample picture b In the histogram, the area of the interval [0, 63] in each sample picture partition is 0.5, and the area of the interval (192, 255) is 0.5. Please refer to the second histogram of the sample picture shown in FIG. 2D. Schematic, that is, the histogram of the sample picture a is different from the histogram of the sample picture b.
  • sample picture partitions may be determined according to requirements, which is not limited in this embodiment.
  • the feature information is a gradient direction value as an example. If it is necessary to divide 360° into nine intervals, the interval of the histogram may be [0, 40], (40, 80), (80, 120). ], (120,160], (160,200], (200,240], (240,280], (280,320], (320,360], if the coordinates of a certain pixel point are (5,5) ), calculate the gradient direction value of the pixel Make sure that the pixel belongs to the interval (40, 80).
  • the terminal generates a vector according to each histogram, and then serializes the vectors of all sample picture partitions in each sample picture in a predetermined order to obtain a vector of the sample picture. Since the terminal knows the category of each sample picture, the terminal can train the SVM model according to the category of the sample picture and the vector of the sample picture.
  • the vectors of the four sample picture partitions of the sample picture a are [1, 0], [1, 0], [0, 1], [0, 1], respectively
  • the vector of the sample picture a is [1, 0 , 1,0,0,1,0,1]
  • the vectors of the four sample picture partitions of sample picture b are [0.5, 0.5], [0.5, 0.5], [0.5, 0.5], [0.5, 0.5], respectively.
  • the vector of the sample picture b is [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5].
  • step 203 the pictures are sorted by category.
  • the terminal can add a category label to the picture to implement classification. For example, after determining that the picture a is a text picture, a label of the “text picture” is set for the picture a; after determining that the picture b is a non-text picture, a label of “non-text picture” is set for the picture b.
  • the terminal may also set a label only for the text picture, and after determining that the picture b is a non-text picture, the picture b is not set to be different from the picture a in which the tag is set. or,
  • the terminal can move the picture to the corresponding category to implement classification. For example, the terminal sets a text picture class and a non-text picture class, and after determining that the picture a is a text picture, moves the picture a into the text picture class; after determining that the picture b is a non-text picture, moving the picture b to the non-text In the picture class.
  • the terminal needs to display the classified picture, and step 204 is performed.
  • the terminal needs to display the picture according to the category. That is, the terminal displays the text picture as a category, and displays the non-text picture as another category to ensure that the text picture is not spaced apart. Text images to improve the efficiency of viewing text images.
  • step 204 each of the classified pictures is added to the folder corresponding to the category, and the folder is displayed; or, each of the classified pictures is added to the folded picture set corresponding to the category, and the folded picture is displayed. set.
  • the terminal can create a folder of a text picture class and a folder of a non-text picture class, add a text picture to a folder of a text picture class, and add a non-text picture to a file of a non-text picture class.
  • the folder the two folders are displayed.
  • the terminal receives the opening command triggered by the user clicking a certain folder, the terminal displays the picture in the folder, please refer to the first type shown in FIG. 2E.
  • FIG. 2E A schematic diagram showing the picture classification.
  • the terminal may add the text picture to the folded picture set of the text picture class, add the non-text picture to the folded picture set of the non-text picture class, and display the two folded picture sets at the terminal.
  • the terminal displays the picture in the folded picture set. Please refer to the display diagram of the second picture classification shown in FIG. 2F.
  • the display of the folded picture set including:
  • the terminal may select a default picture from the pictures other than the folded picture set, and use the picture as a representative picture of the folded picture set, or the terminal may also select a picture from the folded picture set, and the picture may be selected.
  • the terminal may select a default picture from the pictures other than the folded picture set, and use the picture as a representative picture of the folded picture set, or the terminal may also select a picture from the folded picture set, and the picture may be selected.
  • the user can intuitively determine the category of the picture included in the folded picture set.
  • the terminal may arbitrarily select one picture from the folded picture set as the representative picture, or select the best quality picture as the representative picture from the folded picture set to improve the user's recognition of the picture. You can also select the picture with the closest storage time as the representative picture from the folded picture set to improve the real-time performance of the folded picture set.
  • the terminal may display only the representative picture, and ignore other pictures in the folded picture set; or, the terminal may display the edge of the representative picture and other pictures.
  • the terminal may display only the representative picture, and ignore other pictures in the folded picture set; or, the terminal may display the edge of the representative picture and other pictures.
  • Figure 2F please refer to Figure 2F.
  • the terminal may also display selection information of “displaying pictures according to the folder” and “displaying pictures according to the folded picture set”, and determining the display manner of the classification of the pictures according to the user's selection.
  • the terminal can also manage the pictures in the text picture class according to the user's operation. For example, the terminal may receive a deletion instruction of the user for the overdue picture, and delete the picture according to the deletion instruction.
  • the overdue picture refers to the picture in which the text information in the picture is invalid.
  • the picture shown in Figure 2B the picture The effective time of Chinese text information is November 26, 2014, to remind the user to prepare for line maintenance on the same day. After the current time exceeds the effective time, the picture loses the prompt value to the user because the line maintenance has ended. , became a picture of the overdue.
  • the terminal can also detect the overdue picture and delete the overdue picture. At this time, steps 205 to 207 are performed.
  • step 205 if the picture belongs to the text picture class, the valid time information and the current time information of the text information in the picture are obtained.
  • the terminal can obtain valid time information from the picture; the terminal also obtains current time information from the system, and processes the picture according to the valid time information and the current time information.
  • the valid time information is used to indicate that the text information in the picture has a deadline for prompting the value of the user. For example, the effective time information in Figure 2B is November 26, 2014.
  • the valid time information and current time information of the text information in the picture are obtained, including:
  • the terminal can extract text information from the picture by OCR (Optical Character Recognition) and other methods, and then according to keywords such as "year”, “month”, “day”, “hour”, “minute”, “second” Time information is extracted from the text information, and the time information is determined as valid time information. or,
  • the terminal When storing the picture, the terminal displays an input box for setting the valid time information to the user, receives the time information input by the user in the input box, and determines the time information as the valid time information.
  • the input box of “set effective time information” is displayed in the interface, and if the time information input by the user is “2014 11 On the 26th of the month, the terminal determines the time information received as the valid time information.
  • step 206 it is detected whether the picture is overdue for the first predetermined duration based on the valid time information and the current time information.
  • the terminal compares the current time indicated by the current time information with the effective time indicated by the valid time information, and compares the obtained difference with the first predetermined duration. If the difference is greater than the first predetermined duration, the terminal determines that the picture is over the first predetermined duration, and performs step 206; if the terminal compares the difference to be less than the first predetermined duration, it determines that the picture does not expire for the first predetermined duration, and ends. Comparison process.
  • the first predetermined duration is a positive number, which can be set and modified by the terminal.
  • step 207 if it is detected that the picture is overdue for the first predetermined duration, the picture is deleted.
  • the terminal may directly delete the picture that exceeds the first predetermined duration to save the storage space of the terminal.
  • the terminal may also prompt before deleting the picture.
  • the terminal may generate a prompt message after detecting the first predetermined duration of the image, and display the prompt information. After the user views the prompt information, if the user decides to delete the image, the terminal may trigger the delete command. The terminal deletes the picture according to the received deletion instruction.
  • the prompt information may be “x image has expired xx days, please delete”.
  • the terminal may transfer the image to the recycling cache after detecting the first predetermined duration of the image, and time the storage time of the image in the recycling cache.
  • the terminal deletes the picture.
  • the second predetermined duration is 7 days. If the image is stored in the recycle buffer for more than 7 days, the terminal deletes the image.
  • the recycling cache can be a recycle bin in the terminal.
  • the user can recover the picture in the reclaimed cache, thereby avoiding the problem of directly deleting the important information caused by the picture when the picture is an important picture, so as to improve the accuracy of the picture deletion.
  • the terminal After the terminal transfers the image to the reclaiming cache, it can also detect whether the user-triggered emptying instruction for the reclaiming cache is received. If the terminal detects that the clearing instruction is received, the image is deleted.
  • the image classification method provided by the present disclosure obtains a picture to be classified by using the feature information of the picture, and the category includes a text picture class and a non-text picture class; the picture is classified according to the category, The picture can be classified according to the text picture class and the non-text picture class, so that the pictures in the text picture class are all text pictures, which solves the problem that when the terminal displays the picture according to the storage time, the non-text picture is separated between the text pictures, resulting in viewing.
  • the problem of low efficiency has achieved the effect of improving viewing efficiency.
  • each of the classified pictures is added to the folder corresponding to the category, and the folder is displayed; or, each of the classified pictures is added to the folded picture set corresponding to the category, and the folded picture set is displayed.
  • the picture is deleted, and the overdue picture can be automatically deleted, thereby saving the storage space of the terminal. .
  • FIG. 3 is a block diagram of a picture classification apparatus, which is applied to a terminal, as shown in FIG. 3, the picture classification apparatus includes: a picture acquisition module 301, a category determination module 302, and a picture classification apparatus, according to an exemplary embodiment. Picture points Class module 303.
  • the image obtaining module 301 is configured to acquire a picture to be classified
  • the category determining module 302 is configured to determine, according to the feature information of the image acquired by the image obtaining module 301, the category to which the image belongs, and the category includes a text image class and a non-text image class;
  • the picture classification module 303 is configured to classify pictures according to categories determined by the category determination module 302.
  • the picture classification device obtains a picture to be classified by using the feature information of the picture, and the category includes a text picture class and a non-text picture class; the picture is classified according to the category, The picture can be classified according to the text picture class and the non-text picture class, so that the pictures in the text picture class are all text pictures, which solves the problem that when the terminal displays the picture according to the storage time, the non-text picture is separated between the text pictures, resulting in viewing.
  • the problem of low efficiency has achieved the effect of improving viewing efficiency.
  • FIG. 4 is a block diagram of a picture classification apparatus, which is applied to a terminal.
  • the picture classification apparatus includes: a picture acquisition module 401, a category determination module 402, and a picture classification apparatus according to an exemplary embodiment.
  • the picture obtaining module 401 is configured to acquire a picture to be classified
  • the category determining module 402 is configured to determine, according to the feature information of the image acquired by the image obtaining module 401, the category to which the image belongs, and the category includes a text image class and a non-text image class;
  • the picture classification module 403 is configured to classify pictures according to categories determined by the category determination module 402.
  • the image classification device further includes: an information acquisition module 404, a duration detection module 405, and a picture deletion module 406;
  • the information obtaining module 404 is configured to obtain valid time information and current time information of the text information in the picture when the picture belongs to the text picture class;
  • the duration detecting module 405 is configured to detect, according to the valid time information acquired by the information acquiring module 403 and the current time information, whether the picture expires for a first predetermined duration;
  • the picture deletion module 406 is configured to delete the picture when the duration detecting module 405 detects that the picture is overdue for the first predetermined duration.
  • the information obtaining module 404 is configured to read the valid time information from the characters recorded in the picture, or receive the input valid time information when the picture is stored; and acquire the current time information.
  • the picture deletion module 406 includes: a first deletion submodule 4061 or a second deletion submodule 4062;
  • the first deletion sub-module 4061 is configured to generate and display prompt information, receive a deletion instruction triggered by the user according to the prompt information, and delete the image according to the deletion instruction, and the prompt information is used to prompt the image to expire; or
  • the second deletion sub-module 4062 is configured to transfer the image to the recycling cache to obtain the storage duration of the image in the recycling cache. If the storage duration is greater than the second predetermined duration, the image is deleted, or the emptying of the recycling buffer is cleared. Command, delete the picture according to the empty command.
  • the image classification device further includes: a first display module 407 or a second display module 408;
  • the first display module 407 is configured to add each of the classified pictures to a folder corresponding to the category, and display the folder; or
  • the second display module 408 is configured to add each of the classified pictures to the folded picture set corresponding to the category, and display the folded picture set.
  • the second display module 408 includes: a picture extraction sub-module 4081 and a picture display sub-module 4082;
  • the picture extraction sub-module 4081 is configured to extract a representative picture with the best quality in the folded picture set, or extract a representative picture with the closest storage time in the folded picture set;
  • the picture display sub-module 4082 is configured to display a representative picture of the folded picture set extracted by the picture extraction sub-module 4081, ignoring displaying other pictures in the folded picture set; or displaying a representative picture of the folded picture set and edge portions of other pictures.
  • the category determining module 402 includes: a feature extracting submodule 4021, a feature determining module 4022, and a category determining submodule 4023;
  • the feature extraction sub-module 4021 is configured to extract feature information of each pixel in the picture
  • the feature determining module 4022 is configured to determine the feature information extracted by the feature extraction sub-module 4021 according to the SVM model, and the SVM model is obtained by training the sample image, and the sample image includes a text picture and a non-text picture;
  • the classification determination sub-module 4023 is configured to determine the classification to which the picture belongs based on the determination result determined by the feature determination module 4022.
  • the image classification device further includes: a resolution normalization module 409, a feature extraction module 410, a histogram statistics module 411, and a model determination module 412;
  • the resolution normalization module 409 is configured to normalize the resolution of the sample picture to a predetermined resolution
  • the feature extraction module 410 is configured to extract feature information of each pixel in the sample image normalized by the resolution normalization module 409;
  • the histogram statistics module 411 is configured to count a histogram of feature information in each sample picture partition, and the sample picture partition is obtained by performing area division on the sample picture;
  • the model determination module 412 is configured to obtain a histogram according to the type of the sample picture and the histogram statistics module 411. The figure gets the SVM model.
  • the feature information is a gabor feature value or a gradient direction value.
  • the picture classification device obtains a picture to be classified by using the feature information of the picture, and the category includes a text picture class and a non-text picture class; the picture is classified according to the category, The picture can be classified according to the text picture class and the non-text picture class, so that the pictures in the text picture class are all text pictures, which solves the problem that when the terminal displays the picture according to the storage time, the non-text picture is separated between the text pictures, resulting in viewing.
  • the problem of low efficiency has achieved the effect of improving viewing efficiency.
  • each of the classified pictures is added to the folder corresponding to the category, and the folder is displayed; or, each of the classified pictures is added to the folded picture set corresponding to the category, and the folded picture set is displayed.
  • An exemplary embodiment of the present disclosure provides a picture classification apparatus, which can implement a picture classification method provided by the present disclosure, where the picture classification apparatus includes: a processor, a memory for storing processor executable instructions;
  • processor is configured to:
  • the category includes a text picture class and a non-text picture class
  • FIG. 5 is a block diagram of a picture classification device 500, according to an exemplary embodiment.
  • device 500 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • apparatus 500 can include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, And a communication component 516.
  • Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 502 can include one or more processors 518 to execute instructions, To complete all or part of the steps of the above method.
  • processing component 502 can include one or more modules to facilitate interaction between component 502 and other components.
  • processing component 502 can include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
  • Memory 504 is configured to store various types of data to support operation at device 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 504 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Electrically erasable programmable read only memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 506 provides power to various components of device 500.
  • Power component 506 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 500.
  • the multimedia component 508 includes a screen between the device 500 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 508 includes a front camera and/or a rear camera. When the device 500 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 510 is configured to output and/or input an audio signal.
  • audio component 510 includes a microphone (MIC) that is configured to receive an external audio signal when device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 504 or transmitted via communication component 516.
  • audio component 510 also includes a speaker for outputting an audio signal.
  • the I/O interface 512 provides an interface between the processing component 502 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 514 includes one or more sensors for providing device 500 with various aspects of status assessment.
  • sensor assembly 514 can detect an open/closed state of device 500, a relative positioning of components, such as the display and keypad of device 500, and sensor component 514 can also detect a change in position of one component of device 500 or device 500. The presence or absence of user contact with device 500, device 500 orientation or acceleration/deceleration, and temperature variation of device 500.
  • Sensor assembly 514 can include a proximity sensor configured to detect without any physical contact Measure the presence of nearby objects.
  • Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD picture sensor, for use in imaging applications.
  • the sensor component 514 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 516 is configured to facilitate wired or wireless communication between device 500 and other devices.
  • the device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • communication component 516 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 516 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 504 comprising instructions executable by processor 518 of apparatus 500 to perform the above method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Library & Information Science (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Image Analysis (AREA)

Abstract

本公开关于一种图片分类方法及装置,属于图片处理技术领域。所述方法包括:获取待分类的图片;根据所述图片的特征信息确定所述图片所属的类别,所述类别包括文字图片类和非文字图片类;将所述图片按照所述类别进行分类。本公开可解决终端按照存储时间显示图片时,在文字图片之间会间隔非文字图片,导致查看效率低的问题,达到了提高查看效率的效果。

Description

图片分类方法及装置
相关申请的交叉引用
本申请基于申请号为201410851146.7、申请日为2014年12月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及图片处理技术领域,特别涉及一种图片分类方法及装置。
背景技术
人们在上课或参加活动时,通常需要记录一些重要的文字信息,比如,课堂重点内容、活动规则、活动联系人等,用户可以使用带有照相功能的终端对文字信息进行拍摄,以便后续查看。
由于终端是按照图片的存储时间显示图片的,若用户需要查看的文字图片之间间隔了非文字图片,会降低查看效率。
发明内容
为解决终端按照存储时间显示图片时,在文字图片之间会间隔非文字图片,导致查看效率低的问题,本公开提供了一种图片分类方法及装置。
根据本公开实施例的第一方面,提供一种图片分类方法,包括:
获取待分类的图片;
根据所述图片的特征信息确定所述图片所属的类别,所述类别包括文字图片类和非文字图片类;
将所述图片按照所述类别进行分类。
可选的,所述方法,还包括:
若所述图片属于文字图片类,则获取所述图片中文字信息的有效时间信息和当前时间信息;
根据所述有效时间信息和所述当前时间信息检测所述图片是否超期第一预定时长;
若检测出所述图片超期第一预定时长,则删除所述图片。
可选的,所述获取所述图片中文字信息的有效时间信息和当前时间信息,包括:
从所述图片所记载的文字中读取所述有效时间信息,或,在存储所述图片时,接收输 入的所述有效时间信息;
获取所述当前时间信息。
可选的,所述删除所述图片,包括:
生成并显示提示信息,接收用户根据所述提示信息触发的删除指令,根据所述删除指令删除所述图片,所述提示信息用于提示所述图片超期;或,
将所述图片转移到回收缓存中,获取所述图片在所述回收缓存中的存储时长,若所述存储时长大于第二预定时长,则删除所述图片,或,接收清空所述回收缓存的清空指令,根据所述清空指令删除所述图片。
可选的,所述方法,还包括:
将分类后的每张图片添加到与所述类别对应的文件夹中,并显示所述文件夹;或,
将分类后的每张图片添加到与所述类别对应的折叠图片集中,并显示所述折叠图片集。
可选的,所述显示所述折叠图片集,包括:
提取所述折叠图片集中质量最好的代表图片,或,提取所述折叠图片集中存储时间最近的代表图片;
显示所述折叠图片集的代表图片,忽略显示所述折叠图片集中的其它图片;或,显示所述折叠图片集的代表图片以及其它图片的边缘部分。
可选的,所述根据所述图片的特征信息确定所述图片所属的类别,包括:
对所述图片中每个像素点的特征信息进行提取;
根据支持向量机SVM模型对所述特征信息进行判定,所述SVM模型是对样本图片进行训练后得到的,所述样本图片包括文字图片和非文字图片;
根据判定结果确定所述图片所属的分类。
可选的,所述方法,还包括:
将所述样本图片的分辨率归一化到预定分辨率;
对归一化后的所述样本图片中每个像素点的特征信息进行提取;
统计每个样本图片分区中所述特征信息的直方图,所述样本图片分区是对所述样本图片进行区域划分后得到的;
根据所述样本图片的类型和所述直方图得到所述SVM模型。
可选的,所述特征信息为gabor特征值或梯度方向值。
根据本公开实施例的第二方面,提供一种图片分类装置,包括:
图片获取模块,被配置为获取待分类的图片;
类别确定模块,被配置为根据所述图片获取模块获取到的所述图片的特征信息确定所 述图片所属的类别,所述类别包括文字图片类和非文字图片类;
图片分类模块,被配置为将所述图片按照所述类别确定模块确定的所述类别进行分类。
可选的,所述装置,还包括:
信息获取模块,被配置为在所述图片属于文字图片类时,获取所述图片中文字信息的有效时间信息和当前时间信息;
时长检测模块,被配置为根据所述信息获取模块获取到的所述有效时间信息和所述当前时间信息检测所述图片是否超期第一预定时长;
图片删除模块,被配置为在所述时长检测模块检测出所述图片超期第一预定时长时,删除所述图片。
可选的,所述信息获取模块,被配置为从所述图片所记载的文字中读取所述有效时间信息,或,在存储所述图片时,接收输入的所述有效时间信息;获取所述当前时间信息。
可选的,所述图片删除模块,包括:
第一删除子模块,被配置为生成并显示提示信息,接收用户根据所述提示信息触发的删除指令,根据所述删除指令删除所述图片,所述提示信息用于提示所述图片超期;或,
第二删除子模块,被配置为将所述图片转移到回收缓存中,获取所述图片在所述回收缓存中的存储时长,若所述存储时长大于第二预定时长,则删除所述图片,或,接收清空所述回收缓存的清空指令,根据所述清空指令删除所述图片。
可选的,所述装置,还包括:
第一显示模块,被配置为将分类后的每张图片添加到与所述类别对应的文件夹中,并显示所述文件夹;或,
第二显示模块,被配置为将分类后的每张图片添加到与所述类别对应的折叠图片集中,并显示所述折叠图片集。
可选的,所述第二显示模块,包括:
图片提取子模块,被配置为提取所述折叠图片集中质量最好的代表图片,或,提取所述折叠图片集中存储时间最近的代表图片;
图片显示子模块,被配置为显示所述图片提取子模块提取的所述折叠图片集的代表图片,忽略显示所述折叠图片集中的其它图片;或,显示所述折叠图片集的代表图片以及其它图片的边缘部分。
可选的,所述类别确定模块,包括:
特征提取子模块,被配置为对所述图片中每个像素点的特征信息进行提取;
特征判定模块,被配置为根据支持向量机SVM模型对所述特征提取子模块提取的所述 特征信息进行判定,所述SVM模型是对样本图片进行训练后得到的,所述样本图片包括文字图片和非文字图片;
分类确定子模块,被配置为根据所述特征判定模块判定的判定结果确定所述图片所属的分类。
可选的,所述装置,还包括:
分辨率归一化模块,被配置为将所述样本图片的分辨率归一化到预定分辨率;
特征提取模块,被配置为对所述分辨率归一化模块归一化后的所述样本图片中每个像素点的特征信息进行提取;
直方图统计模块,被配置为统计每个样本图片分区中所述特征信息的直方图,所述样本图片分区是对所述样本图片进行区域划分后得到的;
模型确定模块,被配置为根据所述样本图片的类型和所述直方图统计模块得到的所述直方图得到所述SVM模型。
可选的,所述特征信息为gabor特征值或梯度方向值。
根据本公开实施例的第三方面,提供一种图片分类装置,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:
获取待分类的图片;
根据所述图片的特征信息确定所述图片所属的类别,所述类别包括文字图片类和非文字图片类;
将所述图片按照所述类别进行分类。
本公开的实施例提供的技术方案可以包括以下有益效果:
通过获取待分类的图片;根据图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类;将图片按照该类别进行分类,可以将图片按照文字图片类和非文字图片类进行分类,使得文字图片类中的图片都是文字图片,解决了终端按照存储时间显示图片时,在文字图片之间会间隔非文字图片,导致查看效率低的问题,达到了提高查看效率的效果。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本公开说明书的一部分,示出了符合本公开的实施 例,并与说明书一起用于解释本公开的原理。
图1是根据一示例性实施例示出的一种图片分类方法的流程图。
图2A是根据另一示例性实施例示出的一种图片分类方法的流程图。
图2B是根据另一示例性实施例示出的文字图片的示意图。
图2C是根据另一示例性实施例示出的样本图片的第一种直方图的示意图。
图2D是根据另一示例性实施例示出的样本图片的第二种直方图的示意图。
图2E是根据另一示例性实施例示出的第一种图片分类的显示示意图。
图2F是根据另一示例性实施例示出的第二种图片分类的显示示意图。
图2G是根据另一示例性实施例示出的折叠图片集的显示示意图。
图2H是根据另一示例性实施例示出的有效时间信息的设置示意图。
图3是根据一示例性实施例示出的一种图片分类装置的框图。
图4是根据一示例性实施例示出的一种图片分类装置的框图。
图5是根据一示例性实施例示出的一种用于图片分类的装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种图片分类方法的流程图,该图片分类方法应用于终端中,如图1所示,该图片分类方法包括以下步骤。
在步骤101中,获取待分类的图片。
在步骤102中,根据图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类。
在步骤103中,将图片按照该类别进行分类。
综上所述,本公开提供的图片分类方法,通过获取待分类的图片;根据图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类;将图片按照该类别进行分类,可以将图片按照文字图片类和非文字图片类进行分类,使得文字图片类中的图片都是文字图片,解决了终端按照存储时间显示图片时,在文字图片之间会间隔非文字图片,导致查看效率低的问题,达到了提高查看效率的效果。
图2A是根据另一示例性实施例示出的一种图片分类方法的流程图,该图片分类方法应用于终端中,如图2A所示,该图片分类方法包括如下步骤。
在步骤201中,获取待分类的图片。
图片是终端中存储的图片,可以包括文字图片和非文字图片。其中,文字图片是指图片中包含文字信息的图片,非文字图片是指除文字图片之外的图片。
请参考图2B所示的文字图片的示意图,图2B是用户对一则通知进行拍摄后得到的一张文字图片。文字图片包括“通知”的标题、“各位x园业主,2014年11月26日将进行线路检修,请大家提前做好准备”的内容以及“x物业宣”的通知发布者。
在步骤202中,根据图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类。
由于文字图片中包含文字信息,非文字图片中包含图形信息,因此,终端可以根据文字信息和图形信息的特征信息来确定图片所属的类别,该特征信息可以为gabor特征值或梯度方向值。
其中,根据图片的特征信息确定图片所属的类别,包括:
1)对图片中每个像素点的特征信息进行提取;
2)根据SVM(Support Vector Machine,支持向量机)模型对特征信息进行判定,SVM模型是对样本图片进行训练后得到的,样本图片包括文字图片和非文字图片;
3)根据判定结果确定图片所属的分类。
在提取特征信息时,由于文字是由横、竖、撇、捺等笔画构成的,因此,当特征信息是gabor特征值时,可以将文字的粗细分为5个等级,将笔画的方向分为8个等级,对图片中的每个像素点计算出一个40维的gabor特征值;当特征信息是梯度方向值时,根据图片中的每个像素点的坐标,计算该像素点的梯度方向值。
终端还可以获取SVM模型,并将提取的特征信息输入到该SVM模型中,由该SVM模型根据特征信息对图片的类别进行判定,并输出判定结果。其中,判定结果用于指示该图片是文字图片,或,判定结果用于指示该图片是非文字图片。
终端可以先获取SVM模型,再根据SVM模型和特征信息确定图片的类别。其中,终端获取SVM模型的方法有很多种。比如,当终端处理能力较强时,终端可以对样本图片进行训练,得到SVM模型;或,当终端处理能力较弱时,终端可以从服务器中获取SVM模型,该SVM模型是服务器对样本图片进行训练后得到的。可选的,终端也可以不获取SVM模型,而是将特征信息发送给服务器,由服务器根据SVM模型和特征信息确定图片的类别, 终端接收服务器反馈的类别,该SVM模型是服务器对样本图片进行训练后得到的。
本实施例以终端根据样本图片训练SVM模型为例进行说明,则本实施例提供的图片分类方法,还包括:
1)将样本图片的分辨率归一化到预定分辨率;
2)对归一化后的样本图片中每个像素点的特征信息进行提取;
3)统计每个样本图片分区中特征信息的直方图,样本图片分区是对样本图片进行区域划分后得到的;
4)根据样本图片的类型和直方图得到SVM模型。
第一,终端需要获取第一数量的文字图片和第二数量的非文字图片,将文字图片和非文字图片确定为样本图片。其中,样本图片的数量越多,训练得到的SVM模型越精确,此时,训练SVM模型所要消耗的处理资源也越多,因此,可以根据实际需要选取样本图片的数量。比如,第一数量可以是5万,第二数量可以是10万。
第二,终端获取到的每张样本图片的分辨率不同,导致相同的样本图片分区内包括的像素点的个数不同,使得统计出的直方图不准确,因此,终端需要将样本图片的分辨率归一化到预定分辨率。其中,预定分辨率可以是终端设置的,比如,预定分辨率可以是300*300DPI(Dots Per Inch,每英寸的像素点),也可以是其它数值,本实施例不作限定。
第三,终端对归一化后的样本图片的特征信息进行提取,得到每个像素点的gabor特征值或得到每个像素点的梯度方向值。
第四,终端可以对一张样本图片的特征信息进行统计,得到一个直方图,该直方图用于表示样本图片中特征信息的分布情况。
本实施例中的特征信息为gabor特征值或梯度方向值,由于gabor特征值和梯度方向值不便于在附图中直观表示,因此,本实施例以特征信息是像素点的灰度值且样本图片a和样本图片b的分辨率相同为例对直方图的统计过程进行举例说明。请参考图2C所示的样本图片的第一种直方图的示意图,假设样本图片a的上半部分由黑色的像素点组成,下半部分由白色的像素点组成,样本图片b中每两个黑色的像素点中间隔一个白色的像素点。假设直方图中的区间为[0,63]、(63,127]、(127,191]和(191,255],则图a的直方图中,区间为[0,63]的面积为0.5,区间为(191,255]的面积为0.5。图b的直方图中,区间为[0,63]的面积为0.5,区间为(191,255]的面积为0.5。即,样本图片a的直方图和样本图片b的直方图相同,而样本图片a与样本图片b并不相同。可见,当统计的特征信息越多时,特征信息的分布越相似。
为了避免由于特征信息多造成的特征信息分布相似的问题,终端可以对样本图片进行区 域划分,得到样本图片分区,再对样本图片分区中特征信息的直方图进行统计。假设将样本图片等面积分成4个样本图片分区,此时,样本图片a中第一个样本图片分区中区间为[0,63]的面积为1,第二个样本图片分区中区间为[0,63]的面积为1,第三个样本图片分区中区间为(192,255]的面积为1,第四个样本图片分区中区间为(192,255]的面积为1。样本图片b的直方图中,每个样本图片分区中区间为[0,63]的面积为0.5,区间为(192,255]的面积为0.5,请参考图2D所示的样本图片的第二种直方图的示意图。即,样本图片a的直方图和样本图片b的直方图不同。
需要说明的是,上述以将样本图片划分成2*2的样本图片分区进行了举例说明,在实际实现时,可以根据需要确定样本图片分区数,本实施例不作限定。
在统计直方图之前,还需要确定直方图的区间。本实施例以特征信息是梯度方向值为例进行举例说明,假设需要将360°划分为9个区间,则直方图的区间可以是[0,40]、(40,80]、(80,120]、(120,160]、(160,200]、(200,240]、(240,280]、(280,320]、(320,360],若某一个像素点的坐标为(5,5),计算得到该像素点的梯度方向值
Figure PCTCN2015078114-appb-000001
确定该像素点属于区间(40,80]。
第五,终端根据每个直方图生成一个向量,再将每张样本图片中所有样本图片分区的向量按照预定顺序进行串接,得到该样本图片的向量。由于终端已知每张样本图片的类别,因此,终端可以根据样本图片的类别和该样本图片的向量训练出SVM模型。
比如,样本图片a的四个样本图片分区的向量分别是[1,0]、[1,0]、[0,1]、[0,1],则样本图片a的向量是[1,0,1,0,0,1,0,1];样本图片b的四个样本图片分区的向量分别是[0.5,0.5]、[0.5,0.5]、[0.5,0.5]、[0.5,0.5],则样本图片b的向量是[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]。
在步骤203中,将图片按照类别进行分类。
其中,终端可以对图片添加类别的标签,实现分类。比如,在确定出图片a是文字图片后,对图片a设置“文字图片”的标签;在确定出图片b是非文字图片后,对图片b设置“非文字图片”的标签。终端也可以仅对文字图片设置标签,则在确定出图片b是非文字图片后,不对图片b设置标签,以便和设置了标签的图片a相区别。或,
终端可以将图片移动到对应的类别中,实现分类。比如,终端设置文字图片类和非文字图片类,在确定出图片a是文字图片后,将图片a移动到文字图片类中;在确定出图片b是非文字图片后,将图片b移动到非文字图片类中。
在一种实现方式中,终端需要对分类后的图片进行显示,此时执行步骤204。其中,无论终端采用哪种分类方式,终端都需要将图片按照类别进行显示。即,终端将文字图片作为一个分类进行显示,将非文字图片作为另一个分类进行显示,以保证文字图片中不会间隔非 文字图片,从而提高对文字图片的查看效率。
在步骤204中,将分类后的每张图片添加到与类别对应的文件夹中,并显示文件夹;或,将分类后的每张图片添加到与类别对应的折叠图片集中,并显示折叠图片集。
根据第一种显示方式,终端可以创建文字图片类的文件夹和非文字图片类的文件夹,将文字图片添加到文字图片类的文件夹中,将非文字图片添加到非文字图片类的文件夹中,并对这两个文件夹进行显示,在终端接收到用户点击某一个文件夹触发的打开指令时,终端对该文件夹内的图片进行显示,请参考图2E所示的第一种图片分类的显示示意图。
根据第二种显示方式,终端可以对文字图片添加到文字图片类的折叠图片集中,将非文字图片添加到非文字图片类的折叠图片集中,并对这两个折叠图片集进行显示,在终端接收到用户点击某一个折叠图片集触发的打开指令时,终端对该折叠图片集内的图片进行显示,请参考图2F所示的第二种图片分类的显示示意图。
其中,显示折叠图片集,包括:
1)提取折叠图片集中质量最好的代表图片,或,提取折叠图片集中存储时间最近的代表图片;
2)显示折叠图片集的代表图片,忽略显示折叠图片集中的其它图片;或,显示折叠图片集的代表图片以及其它图片的边缘部分。
在显示折叠图片集时,终端可以从折叠图片集以外的图片中选取默认的图片,将该图片作为折叠图片集的代表图片,或,终端还可以从折叠图片集中选取一张图片,将该图片作为折叠图片集的代表图片,以便用户能够直观地确定出该折叠图片集所包括的图片的类别。
其中,从折叠图片集中选取代表图片时,终端可以从折叠图片集中任意选取一张图片作为代表图片,也可以从折叠图片集中选取质量最好的图片作为代表图片,以提高用户对图片的辨识度,也可以从折叠图片集中选取存储时间最近的图片作为代表图片,以提高折叠图片集的实时性。
请参考图2G所示的折叠图片集的显示示意图,在选取出代表图片后,终端可以只显示该代表图片,忽略显示折叠图片集中的其它图片;或,终端可以显示代表图片以及其它图片的边缘部分,请参考图2F。
需要说明的是,在显示图片分类之前,终端还可以显示“按照文件夹显示图片”和“按照折叠图片集显示图片”的选择信息,并根据用户的选择确定对图片的分类的显示方式。
在对图片进行分类显示后,终端还可以根据用户的操作对文字图片类中的图片进行管理。比如,终端可以接收用户对超期的图片的删除指令,根据删除指令删除该图片。其中,超期的图片是指图片中的文字信息失效的图片。仍然以图2B所示的图片进行说明,该图片 中文字信息的有效时间是2014年11月26日,以提示用户在当天做好线路检修的准备,在当前时间超过该有效时间后,由于线路检修已经结束,该图片失去了对用户的提示价值,成为了超期的图片。
由于用户逐个删除超期的图片需要消耗的时间较长,因此,终端还可以检测出超期的图片,并对该超期的图片进行删除,此时执行步骤205至207。
在步骤205中,若图片属于文字图片类,则获取图片中文字信息的有效时间信息和当前时间信息。
终端可以从图片中获取有效时间信息;终端还从系统中获取当前时间信息,根据有效时间信息和当前时间信息对图片进行处理。其中,有效时间信息用于指示图片中的文字信息具有对用户的提示价值的截止时间。比如,图2B中的有效时间信息是2014年11月26日。
其中,获取图片中文字信息的有效时间信息和当前时间信息,包括:
1)从图片所记载的文字中读取有效时间信息,或,在存储图片时,接收输入的有效时间信息;
2)获取当前时间信息。
终端可以通过OCR(Optical Character Recognition,光学字符识别)等方法从图片中提取文字信息,再根据“年”、“月”、“日”、“时”、“分”、“秒”等关键词从文字信息中提取时间信息,将该时间信息确定为有效时间信息。或,
在存储图片时,终端向用户显示设置有效时间信息的输入框,接收用户在该输入框中输入的时间信息,将该时间信息确定为有效时间信息。请参考图2H所示的有效时间信息的设置示意图,在用户拍摄图2B所示的通知后,在界面中显示“设置有效时间信息”的输入框,若用户输入的时间信息是“2014年11月26日”,终端将接收到的时间信息确定为有效时间信息。
在步骤206中,根据有效时间信息和当前时间信息检测图片是否超期第一预定时长。
终端将当前时间信息所指示的当前时间减去有效时间信息所指示的有效时间,将得到的差值和第一预定时长进行比较。若终端比较出差值大于第一预定时长,则确定该图片超期第一预定时长,执行步骤206;若终端比较出差值小于第一预定时长,则确定该图片没有超期第一预定时长,结束比较流程。其中,第一预定时长为正数,可以由终端设置和修改。
在步骤207中,若检测出图片超期第一预定时长,则删除图片。
本实施例中,终端可以直接对超期第一预定时长的图片进行删除,以节省终端的存储空间。可选的,为了避免在用户不知情的情况下删除图片,造成重要图片丢失的问题,终端还可以在删除图片之前进行提示。
此时,删除图片,包括:
1)生成并显示提示信息,接收用户根据提示信息触发的删除指令,根据删除指令删除图片,提示信息用于提示图片超期;或,
2)将图片转移到回收缓存中,获取图片在回收缓存中的存储时长,若存储时长大于第二预定时长,则删除图片,或,接收清空回收缓存的清空指令,根据清空指令删除图片。
根据第一种删除方式,终端可以在检测出图片超期第一预定时长后,生成提示信息,并对提示信息进行显示,用户在查看到提示信息后,若决定删除该图片,则触发删除指令,终端根据接收到的删除指令删除该图片。其中,提示信息可以是“x图片已超期xx天,请删除”。
根据第二种删除方式,终端可以在检测出图片超期第一预定时长后,将图片转移到回收缓存中,并对图片在回收缓存中的存储时长进行计时。当计时得到的存储时长大于第二预定时长后,终端对该图片进行删除。比如,第二预定时长是7天,若图片在回收缓存中的存储时长超过7天,终端对该图片进行删除。其中,回收缓存可以是终端中的回收站。
由于在第二预定时长期间,用户可以对回收缓存中的图片进行恢复,避免了在该图片是重要图片时,直接删除该图片造成的重要信息丢失的问题,以提高图片删除的准确性。
在终端将图片转移到回收缓存之后,还可以检测是否接收到用户触发的对回收缓存的清空指令,若终端检测出接收到该清空指令,则对该图片进行删除。
综上所述,本公开提供的图片分类方法,通过获取待分类的图片;根据图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类;将图片按照该类别进行分类,可以将图片按照文字图片类和非文字图片类进行分类,使得文字图片类中的图片都是文字图片,解决了终端按照存储时间显示图片时,在文字图片之间会间隔非文字图片,导致查看效率低的问题,达到了提高查看效率的效果。
另外,通过将分类后的每张图片添加到与类别对应的文件夹中,并显示文件夹;或,将分类后的每张图片添加到与类别对应的折叠图片集中,并显示折叠图片集,提供了多种对不同类别的图片的显示方式,可以提高显示的多样性。
另外,通过根据有效时间信息和当前时间信息检测图片是否超期第一预定时长,若检测出图片超期第一预定时长,则删除图片,可以自动对超期的图片进行删除,从而节省了终端的存储空间。
图3是根据一示例性实施例示出的一种图片分类装置的框图,该图片分类装置应用于终端中,如图3所示,该图片分类装置包括:图片获取模块301、类别确定模块302和图片分 类模块303。
该图片获取模块301,被配置为获取待分类的图片;
该类别确定模块302,被配置为根据图片获取模块301获取到的图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类;
该图片分类模块303,被配置为将图片按照类别确定模块302确定的类别进行分类。
综上所述,本公开提供的图片分类装置,通过获取待分类的图片;根据图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类;将图片按照该类别进行分类,可以将图片按照文字图片类和非文字图片类进行分类,使得文字图片类中的图片都是文字图片,解决了终端按照存储时间显示图片时,在文字图片之间会间隔非文字图片,导致查看效率低的问题,达到了提高查看效率的效果。
图4是根据一示例性实施例示出的一种图片分类装置的框图,该图片分类装置应用于终端中,如图4所示,该图片分类装置包括:图片获取模块401、类别确定模块402和图片分类模块403。
该图片获取模块401,被配置为获取待分类的图片;
该类别确定模块402,被配置为根据图片获取模块401获取到的图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类;
该图片分类模块403,被配置为将图片按照类别确定模块402确定的类别进行分类。
可选的,本实施例提供的图片分类装置,还包括:信息获取模块404、时长检测模块405和图片删除模块406;
该信息获取模块404,被配置为在图片属于文字图片类时,获取图片中文字信息的有效时间信息和当前时间信息;
该时长检测模块405,被配置为根据信息获取模块403获取到的有效时间信息和当前时间信息检测图片是否超期第一预定时长;
该图片删除模块406,被配置为在时长检测模块405检测出图片超期第一预定时长时,删除图片。
可选的,信息获取模块404,被配置为从图片所记载的文字中读取有效时间信息,或,在存储图片时,接收输入的有效时间信息;获取当前时间信息。
可选的,图片删除模块406,包括:第一删除子模块4061或第二删除子模块4062;
该第一删除子模块4061,被配置为生成并显示提示信息,接收用户根据提示信息触发的删除指令,根据删除指令删除图片,提示信息用于提示图片超期;或,
该第二删除子模块4062,被配置为将图片转移到回收缓存中,获取图片在回收缓存中的存储时长,若存储时长大于第二预定时长,则删除图片,或,接收清空回收缓存的清空指令,根据清空指令删除图片。
可选的,本实施例提供的图片分类装置,还包括:第一显示模块407或第二显示模块408;
该第一显示模块407,被配置为将分类后的每张图片添加到与类别对应的文件夹中,并显示文件夹;或,
该第二显示模块408,被配置为将分类后的每张图片添加到与类别对应的折叠图片集中,并显示折叠图片集。
可选的,第二显示模块408,包括:图片提取子模块4081和图片显示子模块4082;
该图片提取子模块4081,被配置为提取折叠图片集中质量最好的代表图片,或,提取折叠图片集中存储时间最近的代表图片;
该图片显示子模块4082,被配置为显示图片提取子模块4081提取的折叠图片集的代表图片,忽略显示折叠图片集中的其它图片;或,显示折叠图片集的代表图片以及其它图片的边缘部分。
可选的,类别确定模块402,包括:特征提取子模块4021、特征判定模块4022和分类确定子模块4023;
该特征提取子模块4021,被配置为对图片中每个像素点的特征信息进行提取;
该特征判定模块4022,被配置为根据SVM模型对特征提取子模块4021提取的特征信息进行判定,SVM模型是对样本图片进行训练后得到的,样本图片包括文字图片和非文字图片;
该分类确定子模块4023,被配置为根据特征判定模块4022判定的判定结果确定图片所属的分类。
可选的,本实施例提供的图片分类装置,还包括:分辨率归一化模块409、特征提取模块410、直方图统计模块411和模型确定模块412;
该分辨率归一化模块409,被配置为将样本图片的分辨率归一化到预定分辨率;
该特征提取模块410,被配置为对分辨率归一化模块409归一化后的样本图片中每个像素点的特征信息进行提取;
该直方图统计模块411,被配置为统计每个样本图片分区中特征信息的直方图,样本图片分区是对样本图片进行区域划分后得到的;
该模型确定模块412,被配置为根据样本图片的类型和直方图统计模块411得到的直方 图得到SVM模型。
可选的,特征信息为gabor特征值或梯度方向值。
综上所述,本公开提供的图片分类装置,通过获取待分类的图片;根据图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类;将图片按照该类别进行分类,可以将图片按照文字图片类和非文字图片类进行分类,使得文字图片类中的图片都是文字图片,解决了终端按照存储时间显示图片时,在文字图片之间会间隔非文字图片,导致查看效率低的问题,达到了提高查看效率的效果。
另外,通过将分类后的每张图片添加到与类别对应的文件夹中,并显示文件夹;或,将分类后的每张图片添加到与类别对应的折叠图片集中,并显示折叠图片集,提供了多种对不同类别的图片的显示方式,可以提高显示的多样性。
另外,通过根据有效时间信息和当前时间信息检测图片是否超期第一预定时长,若检测出图片超期第一预定时长,则删除图片,可以自动对超期的图片进行删除,从而节省了终端的存储空间。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本公开一示例性实施例提供了一种图片分类装置,能够实现本公开提供的图片分类方法,该图片分类装置包括:处理器、用于存储处理器可执行指令的存储器;
其中,处理器被配置为:
获取待分类的图片;
根据图片的特征信息确定图片所属的类别,类别包括文字图片类和非文字图片类;
将图片按照该类别进行分类。
图5是根据一示例性实施例示出的一种用于图片分类装置500的框图。例如,装置500可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图5,装置500可以包括以下一个或多个组件:处理组件502,存储器504,电源组件506,多媒体组件508,音频组件510,输入/输出(I/O)的接口512,传感器组件514,以及通信组件516。
处理组件502通常控制装置500的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件502可以包括一个或多个处理器518来执行指令, 以完成上述的方法的全部或部分步骤。此外,处理组件502可以包括一个或多个模块,便于处理组件502和其他组件之间的交互。例如,处理组件502可以包括多媒体模块,以方便多媒体组件508和处理组件502之间的交互。
存储器504被配置为存储各种类型的数据以支持在装置500的操作。这些数据的示例包括用于在装置500上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件506为装置500的各种组件提供电力。电源组件506可以包括电源管理系统,一个或多个电源,及其他与为装置500生成、管理和分配电力相关联的组件。
多媒体组件508包括在所述装置500和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件508包括一个前置摄像头和/或后置摄像头。当装置500处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件510被配置为输出和/或输入音频信号。例如,音频组件510包括一个麦克风(MIC),当装置500处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器504或经由通信组件516发送。在一些实施例中,音频组件510还包括一个扬声器,用于输出音频信号。
I/O接口512为处理组件502和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件514包括一个或多个传感器,用于为装置500提供各个方面的状态评估。例如,传感器组件514可以检测到装置500的打开/关闭状态,组件的相对定位,例如所述组件为装置500的显示器和小键盘,传感器组件514还可以检测装置500或装置500一个组件的位置改变,用户与装置500接触的存在或不存在,装置500方位或加速/减速和装置500的温度变化。传感器组件514可以包括接近传感器,被配置用来在没有任何的物理接触时检 测附近物体的存在。传感器组件514还可以包括光传感器,如CMOS或CCD图片传感器,用于在成像应用中使用。在一些实施例中,该传感器组件514还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件516被配置为便于装置500和其他设备之间有线或无线方式的通信。装置500可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件516经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件516还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置500可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器504,上述指令可由装置500的处理器518执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本领域技术人员在考虑说明书及实践这里的公开的后,将容易想到本的其它实施方案。本申请旨在涵盖本的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本的真正范围和精神由下面的权利要求指出。
应当理解的是,本并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本的范围仅由所附的权利要求来限制。

Claims (19)

  1. 一种图片分类方法,其特征在于,包括:
    获取待分类的图片;
    根据所述图片的特征信息确定所述图片所属的类别,所述类别包括文字图片类和非文字图片类;
    将所述图片按照所述类别进行分类。
  2. 根据权利要求1所述的方法,其特征在于,所述方法,还包括:
    若所述图片属于文字图片类,则获取所述图片中文字信息的有效时间信息和当前时间信息;
    根据所述有效时间信息和所述当前时间信息检测所述图片是否超期第一预定时长;
    若检测出所述图片超期第一预定时长,则删除所述图片。
  3. 根据权利要求2所述的方法,其特征在于,所述获取所述图片中文字信息的有效时间信息和当前时间信息,包括:
    从所述图片所记载的文字中读取所述有效时间信息,或,在存储所述图片时,接收输入的所述有效时间信息;
    获取所述当前时间信息。
  4. 根据权利要求2所述的方法,其特征在于,所述删除所述图片,包括:
    生成并显示提示信息,接收用户根据所述提示信息触发的删除指令,根据所述删除指令删除所述图片,所述提示信息用于提示所述图片超期;或,
    将所述图片转移到回收缓存中,获取所述图片在所述回收缓存中的存储时长,若所述存储时长大于第二预定时长,则删除所述图片,或,接收清空所述回收缓存的清空指令,根据所述清空指令删除所述图片。
  5. 根据权利要求1所述的方法,其特征在于,所述方法,还包括:
    将分类后的每张图片添加到与所述类别对应的文件夹中,并显示所述文件夹;或,
    将分类后的每张图片添加到与所述类别对应的折叠图片集中,并显示所述折叠图片集。
  6. 根据权利要求5所述的方法,其特征在于,所述显示所述折叠图片集,包括:
    提取所述折叠图片集中质量最好的代表图片,或,提取所述折叠图片集中存储时间最近的代表图片;
    显示所述折叠图片集的代表图片,忽略显示所述折叠图片集中的其它图片;或,显示所述折叠图片集的代表图片以及其它图片的边缘部分。
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述根据所述图片的特征信息确定所述图片所属的类别,包括:
    对所述图片中每个像素点的特征信息进行提取;
    根据支持向量机SVM模型对所述特征信息进行判定,所述SVM模型是对样本图片进行训练后得到的,所述样本图片包括文字图片和非文字图片;
    根据判定结果确定所述图片所属的分类。
  8. 根据权利要求7所述的方法,其特征在于,所述方法,还包括:
    将所述样本图片的分辨率归一化到预定分辨率;
    对归一化后的所述样本图片中每个像素点的特征信息进行提取;
    统计每个样本图片分区中所述特征信息的直方图,所述样本图片分区是对所述样本图片进行区域划分后得到的;
    根据所述样本图片的类型和所述直方图得到所述SVM模型。
  9. 根据权利要求1所述的方法,其特征在于,所述特征信息为gabor特征值或梯度方向值。
  10. 一种图片分类装置,其特征在于,包括:
    图片获取模块,被配置为获取待分类的图片;
    类别确定模块,被配置为根据所述图片获取模块获取到的所述图片的特征信息确定所述图片所属的类别,所述类别包括文字图片类和非文字图片类;
    图片分类模块,被配置为将所述图片按照所述类别确定模块确定的所述类别进行分类。
  11. 根据权利要求10所述的装置,其特征在于,所述装置,还包括:
    信息获取模块,被配置为在所述图片属于文字图片类时,获取所述图片中文字信息的 有效时间信息和当前时间信息;
    时长检测模块,被配置为根据所述信息获取模块获取到的所述有效时间信息和所述当前时间信息检测所述图片是否超期第一预定时长;
    图片删除模块,被配置为在所述时长检测模块检测出所述图片超期第一预定时长时,删除所述图片。
  12. 根据权利要求11所述的装置,其特征在于,所述信息获取模块,被配置为从所述图片所记载的文字中读取所述有效时间信息,或,在存储所述图片时,接收输入的所述有效时间信息;获取所述当前时间信息。
  13. 根据权利要求11所述的装置,其特征在于,所述图片删除模块,包括:
    第一删除子模块,被配置为生成并显示提示信息,接收用户根据所述提示信息触发的删除指令,根据所述删除指令删除所述图片,所述提示信息用于提示所述图片超期;或,
    第二删除子模块,被配置为将所述图片转移到回收缓存中,获取所述图片在所述回收缓存中的存储时长,若所述存储时长大于第二预定时长,则删除所述图片,或,接收清空所述回收缓存的清空指令,根据所述清空指令删除所述图片。
  14. 根据权利要求10所述的装置,其特征在于,所述装置,还包括:
    第一显示模块,被配置为将分类后的每张图片添加到与所述类别对应的文件夹中,并显示所述文件夹;或,
    第二显示模块,被配置为将分类后的每张图片添加到与所述类别对应的折叠图片集中,并显示所述折叠图片集。
  15. 根据权利要求14所述的装置,其特征在于,所述第二显示模块,包括:
    图片提取子模块,被配置为提取所述折叠图片集中质量最好的代表图片,或,提取所述折叠图片集中存储时间最近的代表图片;
    图片显示子模块,被配置为显示所述图片提取子模块提取的所述折叠图片集的代表图片,忽略显示所述折叠图片集中的其它图片;或,显示所述折叠图片集的代表图片以及其它图片的边缘部分。
  16. 根据权利要求10至15任一项所述的装置,其特征在于,所述类别确定模块,包 括:
    特征提取子模块,被配置为对所述图片中每个像素点的特征信息进行提取;
    特征判定模块,被配置为根据支持向量机SVM模型对所述特征提取子模块提取的所述特征信息进行判定,所述SVM模型是对样本图片进行训练后得到的,所述样本图片包括文字图片和非文字图片;
    分类确定子模块,被配置为根据所述特征判定模块判定的判定结果确定所述图片所属的分类。
  17. 根据权利要求16所述的装置,其特征在于,所述装置,还包括:
    分辨率归一化模块,被配置为将所述样本图片的分辨率归一化到预定分辨率;
    特征提取模块,被配置为对所述分辨率归一化模块归一化后的所述样本图片中每个像素点的特征信息进行提取;
    直方图统计模块,被配置为统计每个样本图片分区中所述特征信息的直方图,所述样本图片分区是对所述样本图片进行区域划分后得到的;
    模型确定模块,被配置为根据所述样本图片的类型和所述直方图统计模块得到的所述直方图得到所述SVM模型。
  18. 根据权利要求10所述的装置,其特征在于,所述特征信息为gabor特征值或梯度方向值。
  19. 一种图片分类装置,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    获取待分类的图片;
    根据所述图片的特征信息确定所述图片所属的类别,所述类别包括文字图片类和非文字图片类;
    将所述图片按照所述类别进行分类。
PCT/CN2015/078114 2014-12-31 2015-04-30 图片分类方法及装置 WO2016107037A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
MX2015009736A MX360492B (es) 2014-12-31 2015-04-30 Metodo y dispositivos para clasificar imagenes.
KR1020157026988A KR101734860B1 (ko) 2014-12-31 2015-04-30 화상들을 분류하기 위한 방법 및 디바이스
JP2016567116A JP2017509090A (ja) 2014-12-31 2015-04-30 画像分類方法及び装置
BR112015019383A BR112015019383A2 (pt) 2014-12-31 2015-04-30 método e dispositivo para classificar imagens paradas
RU2015133980A RU2643464C2 (ru) 2014-12-31 2015-04-30 Способ и устройство для классификации изображений
US14/932,561 US9779294B2 (en) 2014-12-31 2015-11-04 Methods and devices for classifying pictures

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410851146.7 2014-12-31
CN201410851146.7A CN104615656B (zh) 2014-12-31 2014-12-31 图片分类方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/932,561 Continuation US9779294B2 (en) 2014-12-31 2015-11-04 Methods and devices for classifying pictures

Publications (1)

Publication Number Publication Date
WO2016107037A1 true WO2016107037A1 (zh) 2016-07-07

Family

ID=53150100

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/078114 WO2016107037A1 (zh) 2014-12-31 2015-04-30 图片分类方法及装置

Country Status (8)

Country Link
EP (1) EP3040884B1 (zh)
JP (1) JP2017509090A (zh)
KR (1) KR101734860B1 (zh)
CN (1) CN104615656B (zh)
BR (1) BR112015019383A2 (zh)
MX (1) MX360492B (zh)
RU (1) RU2643464C2 (zh)
WO (1) WO2016107037A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113268621A (zh) * 2020-02-17 2021-08-17 百度在线网络技术(北京)有限公司 图片排序方法、装置、电子设备及存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989330A (zh) * 2015-02-03 2016-10-05 阿里巴巴集团控股有限公司 一种图片检测方法及设备
CN106445493A (zh) * 2016-08-11 2017-02-22 广东欧珀移动通信有限公司 一种锁屏图片播放的方法及相关设备
CN106815598B (zh) * 2016-12-15 2020-09-11 歌尔科技有限公司 一种360度全景图片的识别方法和装置
CN106649850A (zh) * 2016-12-30 2017-05-10 宇龙计算机通信科技(深圳)有限公司 一种数据自动删除方法及装置
CN109523281A (zh) * 2018-11-26 2019-03-26 北京拓世寰宇网络技术有限公司 一种确定房源图片类别的方法及装置
CN111414472A (zh) * 2018-12-18 2020-07-14 北京奇虎科技有限公司 基于光学字符识别的图片检测方法、装置及电子设备
CN110414519B (zh) * 2019-06-27 2023-11-14 众安信息技术服务有限公司 一种图片文字的识别方法及其识别装置、存储介质
KR102422962B1 (ko) * 2021-07-26 2022-07-20 주식회사 크라우드웍스 다중 인공지능 모델의 연속 처리 구조에 기반한 이미지 자동 분류 및 처리 방법, 그리고 이를 실행시키기 위해 컴퓨터 판독가능 기록매체에 저장된 컴퓨터 프로그램

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020168105A1 (en) * 2001-03-28 2002-11-14 Sharp Laboratories Of America, Inc. Method and apparatus for adaptive compression of scanned documents
CN101848354A (zh) * 2009-03-27 2010-09-29 奥林巴斯映像株式会社 图像再现装置以及图像显示控制方法
CN102253935A (zh) * 2010-05-18 2011-11-23 鸿富锦精密工业(深圳)有限公司 相片分类系统及方法
CN103412753A (zh) * 2013-08-12 2013-11-27 宇龙计算机通信科技(深圳)有限公司 图片删除方法及装置
CN103856686A (zh) * 2012-11-29 2014-06-11 京瓷办公信息系统株式会社 图像处理装置、图像形成装置及图像处理方法

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08320819A (ja) * 1995-05-25 1996-12-03 Ricoh Co Ltd 文書管理装置
JP2002169417A (ja) * 2000-12-04 2002-06-14 Ricoh Co Ltd 画像形成装置
JP3622913B2 (ja) * 2002-03-25 2005-02-23 ソニー株式会社 情報画像利用システム、情報画像管理装置、情報画像管理方法、ユーザ情報画像、及び、プログラム、記録媒体
JP2004013575A (ja) * 2002-06-07 2004-01-15 Konica Minolta Holdings Inc 画像処理装置、画像処理方法、及びプログラム
JP4056915B2 (ja) * 2003-03-25 2008-03-05 富士フイルム株式会社 画像表示方法及びプリント注文受付装置並びにプリント注文受付システム
RU2254610C2 (ru) * 2003-09-04 2005-06-20 Государственное научное учреждение научно-исследовательский институт "СПЕЦВУЗАВТОМАТИКА" Способ автоматической классификации документов
JP2005322084A (ja) * 2004-05-10 2005-11-17 Fuji Xerox Co Ltd 文書管理装置および方法
JP4352264B2 (ja) * 2005-03-29 2009-10-28 セイコーエプソン株式会社 画像処理装置、画像処理方法および画像処理プログラム
JP2009110477A (ja) * 2007-11-01 2009-05-21 Fujitsu Ltd ファイル管理装置及びファイル管理プログラム
JP2009123020A (ja) * 2007-11-15 2009-06-04 Canon Inc 情報処理装置、情報処理方法、プログラム及び記憶媒体
US20100306283A1 (en) * 2009-01-28 2010-12-02 Digitiliti, Inc. Information object creation for a distributed computing system
KR101566196B1 (ko) * 2009-03-02 2015-11-05 삼성전자주식회사 히스토그램 분석을 이용한 영상 분류 방법 및 장치, 이를 이용한 문자 인식 방법 및 장치
JP2011028378A (ja) * 2009-07-22 2011-02-10 Fuji Xerox Co Ltd 情報処理装置、承認支援システム及びプログラム
JP2012038214A (ja) * 2010-08-10 2012-02-23 Toshiba Tec Corp 読取装置およびプログラム
JP5278396B2 (ja) * 2010-09-27 2013-09-04 ブラザー工業株式会社 画像形成制御プログラム、画像形成制御方法および画像処理装置
JP2012088992A (ja) * 2010-10-21 2012-05-10 Nec Saitama Ltd 文書情報管理装置及びその処理方法とプログラム、携帯端末
JP2012155506A (ja) * 2011-01-26 2012-08-16 Panasonic Corp 情報端末、及び画面部品選択方法
US9916538B2 (en) * 2012-09-15 2018-03-13 Z Advanced Computing, Inc. Method and system for feature detection

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020168105A1 (en) * 2001-03-28 2002-11-14 Sharp Laboratories Of America, Inc. Method and apparatus for adaptive compression of scanned documents
CN101848354A (zh) * 2009-03-27 2010-09-29 奥林巴斯映像株式会社 图像再现装置以及图像显示控制方法
CN102253935A (zh) * 2010-05-18 2011-11-23 鸿富锦精密工业(深圳)有限公司 相片分类系统及方法
CN103856686A (zh) * 2012-11-29 2014-06-11 京瓷办公信息系统株式会社 图像处理装置、图像形成装置及图像处理方法
CN103412753A (zh) * 2013-08-12 2013-11-27 宇龙计算机通信科技(深圳)有限公司 图片删除方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113268621A (zh) * 2020-02-17 2021-08-17 百度在线网络技术(北京)有限公司 图片排序方法、装置、电子设备及存储介质
CN113268621B (zh) * 2020-02-17 2024-04-30 百度在线网络技术(北京)有限公司 图片排序方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
RU2015133980A (ru) 2017-02-17
MX360492B (es) 2018-11-06
RU2643464C2 (ru) 2018-02-01
CN104615656A (zh) 2015-05-13
CN104615656B (zh) 2018-07-31
JP2017509090A (ja) 2017-03-30
KR20160092484A (ko) 2016-08-04
MX2015009736A (es) 2016-08-17
KR101734860B1 (ko) 2017-05-12
EP3040884A1 (en) 2016-07-06
BR112015019383A2 (pt) 2017-07-18
EP3040884B1 (en) 2019-10-09

Similar Documents

Publication Publication Date Title
WO2016107037A1 (zh) 图片分类方法及装置
EP3125135B1 (en) Picture processing method and device
KR101864759B1 (ko) 영역 인식 방법 및 장치
CN106776890B (zh) 视频播放进度的调整方法及装置
US9779294B2 (en) Methods and devices for classifying pictures
WO2017071063A1 (zh) 区域识别方法及装置
RU2664003C2 (ru) Способ и устройство для определения ассоциированного пользователя
WO2017071064A1 (zh) 区域提取方法、模型训练方法及装置
WO2017071061A1 (zh) 区域识别方法及装置
CN110619350B (zh) 图像检测方法、装置及存储介质
CN104463103B (zh) 图像处理方法及装置
JP6474393B2 (ja) 顔アルバムに基づく音楽再生方法、装置および端末デバイス
WO2018228422A1 (zh) 一种发出预警信息的方法、装置及系统
CN110569835B (zh) 一种图像识别方法、装置和电子设备
KR102545408B1 (ko) 차폐된 이미지 검출 방법, 장치 및 매체
CN106095876B (zh) 图像处理方法及装置
US11699276B2 (en) Character recognition method and apparatus, electronic device, and storage medium
CN108491535B (zh) 信息的分类存储方法及装置
CN107122801B (zh) 图像分类的方法和装置
US11417028B2 (en) Image processing method and apparatus, and storage medium
CN112784858B (zh) 一种图像数据的处理方法、装置及电子设备
CN115565196A (zh) 影像处理方法、装置和设备
CN113110814A (zh) 一种屏幕显示数据处理的方法、装置及存储介质
CN114973204A (zh) 目标检测方法、装置、设备、存储介质及产品
CN114598923A (zh) 视频文字清除方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: MX/A/2015/009736

Country of ref document: MX

ENP Entry into the national phase

Ref document number: 2015133980

Country of ref document: RU

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2016567116

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20157026988

Country of ref document: KR

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15874730

Country of ref document: EP

Kind code of ref document: A1

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112015019383

Country of ref document: BR

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 112015019383

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20150812

122 Ep: pct application non-entry in european phase

Ref document number: 15874730

Country of ref document: EP

Kind code of ref document: A1