CN106778666B - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN106778666B
CN106778666B CN201611248654.1A CN201611248654A CN106778666B CN 106778666 B CN106778666 B CN 106778666B CN 201611248654 A CN201611248654 A CN 201611248654A CN 106778666 B CN106778666 B CN 106778666B
Authority
CN
China
Prior art keywords
image
client
main line
file information
url
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611248654.1A
Other languages
Chinese (zh)
Other versions
CN106778666A (en
Inventor
孙鹏
李建方
刘琦玉
兰天
冯姗姗
王佳裕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201611248654.1A priority Critical patent/CN106778666B/en
Publication of CN106778666A publication Critical patent/CN106778666A/en
Application granted granted Critical
Publication of CN106778666B publication Critical patent/CN106778666B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/414Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Artificial Intelligence (AREA)
  • Processing Or Creating Images (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for processing an image, wherein the processing method comprises the following steps: receiving an image comprising at least one main line from a client; calling an image recognition engine of the image processing server to perform recognition processing on the image, and recognizing at least one main line in the image; calling a file storage database of the image processing server, wherein file information corresponding to different types of lines is stored in the file storage database respectively; matching each main line with the file information stored in the file storage database to obtain corresponding file information; and returning the file information of each main line to the client. By adopting the image processing method provided by the embodiment of the invention, the user can specifically process the required image information, meanwhile, the transmission efficiency and the development efficiency can be improved, the visual experience of the user is improved, and the user requirements are met.

Description

Image processing method and device
Technical Field
The present invention relates to the field of digital image processing, and in particular, to an image processing method and apparatus.
Background
With the development of computer science technology, digital image processing technology is also being developed. In daily life, images are the main source of information acquired and exchanged by human beings, and therefore, the application of image processing also necessarily involves aspects of human life. However, the image processing technology at present is still not perfect, and people still have many problems in processing images.
In the prior art, the processing operation on the image is still in a stage of comparison basis, the image is regarded as an indistinguishable subject existing, and especially the image recognition can generally only recognize the content of a specific human face or image in the image, which occupies most of the image. However, other information may exist in the image itself, and the existing technical solutions cannot provide enough useful image information for the user, which brings much inconvenience to the user.
Therefore, a method for enabling a user to process an image satisfying his/her needs is now required.
Disclosure of Invention
In view of the above, the present invention has been made to provide an image processing method and a corresponding image processing apparatus that overcome or at least partially solve the above-mentioned problems.
According to an aspect of the embodiments of the present invention, there is provided an image processing method applied to an image processing server, including:
receiving an image comprising at least one main line from a client;
calling an image recognition engine of the image processing server to perform recognition processing on the image, and recognizing at least one main line in the image;
calling a file storage database of the image processing server, wherein file information corresponding to different types of lines is stored in the file storage database respectively;
matching each main line with the file information stored in the file storage database to obtain corresponding file information;
and returning the file information of each main line to the client.
Optionally, when the document information in the document storage database is stored in different grades, matching each main line with the document information stored in the document storage database includes:
performing weighted calculation on each main line according to the classification strategy of the file information of the file storage database to obtain the weight of each main line;
classifying each main line according to the weight of each main line;
and reading corresponding file information from the file information of the level according to the level of each main line.
Optionally, after the image recognition engine of the image processing server is called to perform recognition processing on the image, the method includes:
and uploading the identified and processed image to a map bed of the image processing server, and acquiring the url of the image provided by the map bed.
Optionally, returning the pattern information of each main line to the client includes:
and uniformly packaging the weight of each main line, corresponding file information and url provided by the drawing bed and returning the uniform package to the client.
Optionally, returning the pattern information of each main line to the client includes:
and combining the brief description and the detailed description of each main line bar and returning the brief description and the detailed description to the client, wherein a starting node of the detailed description is provided on the brief description interface, and when the starting node is triggered, the detailed description is displayed on the interface.
Optionally, before invoking an image recognition engine of the image processing server to perform recognition processing on the image, the method further includes:
performing parameter check on the image from the client;
if the check is passed, calling the image recognition engine;
if the check fails, a preset error exception handling mechanism is started.
Optionally, the parameter checking is performed on the image from the client, including at least one of:
performing a validity check on the identity (uid) of the client;
if the image uploaded by the client side is an image, checking whether the image is a valid image;
and if the url of the image is uploaded by the client, checking whether the url is empty, legal or not and whether the url is the url of the image.
Optionally, the performing validity check on the uid of the client includes:
checking whether the uid uploaded by the client is correct;
checking whether the client is a frequency limited user.
Optionally, the client is set as a frequency-limited user by adopting the following means:
the Redis data storage service based on the memory sets the identity of the client as a key, and sets the expiration time and the access frequency.
Optionally, after the image recognition engine of the image processing server is called to perform recognition processing on the image, the method further includes:
and if the image recognition engine fails to recognize the image, starting a preset error exception handling mechanism.
According to another aspect of the embodiments of the present invention, there is provided an image processing apparatus applied to an image processing server, including
The receiving module is suitable for receiving an image comprising at least one main line from a client;
the image recognition engine is suitable for performing recognition processing on the image and recognizing at least one main line in the image;
the file storage database is suitable for respectively storing file information corresponding to different types of lines;
the matching module is suitable for matching each main line with the file information stored in the file storage database to obtain corresponding file information;
and the sending module is suitable for returning the file information of each main line to the client.
Optionally, the matching module is further adapted to:
performing weighted calculation on each main line according to the classification strategy of the file information of the file storage database to obtain the weight of each main line;
classifying each main line according to the weight of each main line;
and reading corresponding file information from the file information of the level according to the level of each main line.
Optionally, the image processing method and apparatus further include:
the image recognition engine is further suitable for uploading the image after recognition processing to a map bed of the image processing server after the image is subjected to recognition processing, and acquiring the url of the image provided by the map bed;
the image bed is suitable for receiving the images uploaded by the image recognition engine and providing the url of the images.
Optionally, the sending module is further adapted to:
and uniformly packaging the weight of each main line, corresponding file information and url provided by the drawing bed and returning the uniform package to the client.
Optionally, the sending module is further adapted to:
and combining the brief description and the detailed description of each main line bar and returning the brief description and the detailed description to the client, wherein a starting node of the detailed description is provided on the brief description interface, and when the starting node is triggered, the detailed description is displayed on the interface.
Optionally, the image processing method and apparatus further include:
the preprocessing module is suitable for calling an image recognition engine of the image processing server to perform parameter check on the image from the client before performing recognition processing on the image;
if the check is passed, calling the image recognition engine;
if the check fails, a preset error exception handling mechanism is started.
Optionally, the preprocessing module is further adapted to perform parameter check on the image from the client in at least one of the following manners:
performing validity check on the uid of the client;
if the image uploaded by the client side is an image, checking whether the image is a valid image;
and if the url of the image is uploaded by the client, checking whether the url is empty, legal or not and whether the url is the url of the image.
Optionally, the pre-processing module is further adapted to:
checking whether the uid uploaded by the client is correct;
checking whether the client is a frequency limited user.
Optionally, the preprocessing module is further adapted to set the client as a frequency-limited user by adopting the following means:
the Redis data storage service based on the memory sets the identity of the client as a key, and sets the expiration time and the access frequency.
Optionally, the image recognition engine is further adapted to, after performing recognition processing on the image, start a preset error exception handling mechanism if the image recognition fails.
The embodiment of the invention improves the image processing method. In the prior art, generally, a user can simply process the whole image information after acquiring the image information. However, when a user needs to use partial image information, the user cannot conveniently perform corresponding processing on the partial image information, and the user requirements cannot be met, which brings inconvenience to the user. Therefore, the embodiment of the invention provides an image processing method for enabling a user to conveniently perform targeted processing on part of information in an image. First, an image processing server receives an image including at least one dominant line from a client. After the image processing server successfully receives the image, calling an image recognition engine of the image processing server to recognize the image, recognizing at least one main line in the image, and further acquiring the recognized main line. After the identified main line is acquired, a file storage database of the image processing server can be called, wherein file information corresponding to different types of lines is stored in the file storage database respectively. The file information provides a comparison basis for the acquired main lines. And further matching each main line with the file information stored in the file storage database to obtain corresponding file information. And finally, returning the file information corresponding to each main line to the client. Therefore, the image processing method provided by the embodiment of the invention is based on the principle that the image usually provides enough information by the main line, analyzes and processes various complicated images, extracts the main line, and is convenient for the targeted acquisition of image information, so that a user can specifically process the required image information. In addition, the method provided by the embodiment of the invention can avoid a plurality of unnecessary steps by specifically operating a certain specific parameter of the image processing server, is more flexible and convenient to operate, and simultaneously provides a more perfect error processing mechanism, thereby greatly reducing the abnormal conditions of the program. Moreover, by adopting the method provided by the invention, the pictures can be properly compressed, the transmission efficiency and the development efficiency are improved, and meanwhile, the file information can be processed in a grading way, so that a large number of complex redundant files are reduced, and the collocation of the file brief and the detailed description greatly improves the page display effect, thereby improving the visual experience of users.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow diagram of a method of processing an image according to one embodiment of the invention;
FIG. 2 is a flow diagram of server interaction, according to one embodiment of the invention;
FIG. 3 is an image with two main lines in the image according to one embodiment of the invention;
FIG. 4 is a first schematic block diagram of an apparatus for processing an image according to an embodiment of the present invention; and
fig. 5 is a second schematic block diagram of an apparatus for processing an image according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the above technical problem, an embodiment of the present invention provides an image processing method to perform targeted processing on information required in an image. In order to conveniently process image information required by a user, the embodiment of the invention provides a processing method of an image shown in fig. 1. Fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention. As shown in fig. 1, the image processing method at least includes steps S102 to S110:
step S102, receiving an image which comprises at least one main line and is from a client;
step S104, calling an image recognition engine of the image processing server to perform recognition processing on the image, and recognizing at least one main line in the image;
step S106, calling a file storage database of the image processing server, wherein file information corresponding to different types of lines is stored in the file storage database respectively;
step S108, matching each main line with the file information stored in the file storage database to obtain corresponding file information;
and step S110, returning the file information of each main line to the client.
The embodiment of the invention improves the image processing method. In the prior art, generally, a user can simply process the whole image information after acquiring the image information. However, when a user needs to use partial image information, the user cannot conveniently perform corresponding processing on the partial image information, and the user requirements cannot be met, which brings inconvenience to the user. Therefore, the embodiment of the invention provides an image processing method for enabling a user to conveniently perform targeted processing on part of information in an image. First, an image processing server receives an image including at least one dominant line from a client. After the image processing server successfully receives the image, calling an image recognition engine of the image processing server to recognize the image, recognizing at least one main line in the image, and further acquiring the recognized main line. After the identified main lines are acquired, a file storage database of the image processing server can be called, wherein file information corresponding to different types of lines is stored in the file storage database respectively, and the file information provides a comparison basis for the acquired main lines. And further matching each main line with the file information stored in the file storage database to obtain corresponding file information. And finally, returning the file information corresponding to each main line to the client. Therefore, the image processing method provided by the embodiment of the invention is based on the principle that the image usually provides enough information by the main line, analyzes and processes various complicated images, extracts the main line, and is convenient for the targeted acquisition of image information, so that a user can specifically process the required image information. Furthermore, the image processing method provided by the embodiment of the invention can disassemble the main lines in the image to be used as the main body for identification, and further obtains the pattern information of each main line, so that more image information can be obtained in the image identification process, the image data quantity obtained by a user is increased, the information obtaining process is more refined, and the information accuracy is ensured.
Specifically, when step S102 is executed, the image processing server receives an image including at least one main line from the client. After the image processing server receives the image, a parameter check may be performed on the image. If the check is passed, step S104 is executed to invoke the image recognition engine, and if the check is not passed, a preset error exception handling mechanism is started. Specifically, the user may be reminded to perform corresponding operations by sending an error alarm notification or popping up an error warning dialog box on a corresponding interface.
When performing parameter check on the acquired image, first, validity check may be performed on the unique identifier (uid) of the client. Specifically, when the validity of the uid of the client is checked, whether the uid uploaded by the client is a correct uid may be checked, and further, whether the client is a frequency-limited user may be also checked. In the embodiment of the present invention, the uid of the client may be set as key, and the expiration time and the access frequency may be set based on the Redis (high-performance key-value database) data storage service of the memory, so as to implement setting the client as a frequency-limited user (for example, access three times in one hour). Secondly, when the parameters of the image are checked, if the image itself is uploaded by the client, whether the image is a valid image can be checked. Further, when the parameter of the image is checked, if the url (uniform resource Locator) of the image is uploaded by the client, it may be checked whether the url is empty, legal, or the url of the image. By adopting the method provided by the invention, the url is used for replacing the image uploading, the image can be properly compressed, the transmission efficiency and the development efficiency are improved, meanwhile, the file information can be graded, a large amount of complex redundant files are reduced, and the collocation of the file brief and the detailed description greatly improves the page display effect, thereby improving the visual experience of the user.
The url replaces the image to be transmitted, and the url is only a storage address, so that the magnitude difference between the url and the image exists, the transmission data is greatly reduced, the requirement on a network transmission path is further reduced, and the image uploading process is quicker. Namely, in the embodiment of the invention, the client and the image processing server directly transmit a text instead of a picture file, so that the data request amount is reduced, and the response is accelerated. Further, because the image is uploaded to the image storage server for storage, the image transmission process is changed into the process that the image processing server reads the image from the image storage server, the image transmission process occurs between the two servers, and in view that the transmission function of the server is far greater than that of the client side, the safety of the image transmission process based on the server is greatly enhanced, and the image read from the image processing server to the image storage server is not easy to be damaged and cannot be opened or distorted due to the problems of data packet loss, packet error and the like in the transmission process.
By adopting the method provided by the invention, the key nodes of the service can be extracted, and the specific control is carried out through the user-defined configuration, so that the corresponding operation is simpler, more convenient and more flexible. If modification is needed, the modification can be realized only by changing parameters in the configuration, and a plurality of unnecessary steps are avoided. Meanwhile, in order to ensure the smooth implementation of the image processing method provided by the embodiment of the invention, the invention also provides a more perfect error processing mechanism, thereby greatly reducing the abnormal conditions of the program.
After the image parameters of the client are checked and set, if the check is passed, step S104 is executed, an image recognition engine of the image processing server is invoked to perform recognition processing on the acquired image, and at least one main line in the image is recognized.
In particular, after the original image from the client is obtained, the steps are cumbersome and difficult to operate due to the original image being too large or the original image having too many mottles or other reasons, so that the processing speed is too slow, which causes inconvenience. Therefore, in order to effectively process the subsequent images, the original image needs to be preprocessed first to obtain a basic image according to the embodiment of the present invention. When the original image is preprocessed, the original image may be converted into a gray-scale image, and then the obtained gray-scale image is subjected to median filtering. Median filtering, a non-linear smoothing technique, sets the gray value of each pixel in an image to be the median of the gray values of all pixels in a certain neighborhood window of the pixel. The method aims to replace the value of one point in a digital image or a digital sequence with the median of each point value in a neighborhood of the point, so that the surrounding pixel value is close to the true value, thereby eliminating isolated noise points, filtering fine lines and miscellaneous lines in the image, protecting the edge information of the image and obtaining a clearer image than before.
After the original image is preprocessed, the edge of each line in the image can be detected by adopting an edge detection algorithm, so that an edge detection algorithm detection result graph is obtained. And further, carrying out self-adaptive contour extraction operation on the detection result graph of the edge detection algorithm to obtain the contour of each line. The self-adaptive contour extraction of the edge detection result image requires to output a binary image, namely an image with only black and white gray scales, wherein one gray scale represents an edge, the other gray scale represents a background, and finally, the edge information needs to be processed more deeply, so that the effect is clearer.
Further, after the line profile of each line is obtained, the obtained line profile of each line may be subjected to screening processing, so as to obtain a line profile that meets the main line standard. When the obtained line profile of each line is subjected to screening processing, the numerical value of the pixel point of each line profile can be calculated. And after the numerical values of the pixel points of each line profile are determined, deleting the line profiles of which the number of the pixel points does not meet the requirement. After the steps, the edge detection algorithm can be correspondingly adjusted according to the ratio of the specific numerical value of the pixel point of each line profile to the total pixel point, and then each line edge in the image is detected again by using a new edge detection algorithm until the line profile meeting the main line standard is obtained. And then determining the area where the main line is located according to the line profile obtained by screening, and further combining the line profiles in the area to obtain the corresponding main line.
After the execution of step S104 is finished, at least one main line in the image may be acquired, and then the acquired image may be uploaded to the image bed of the image processor. The so-called picture bed is specially used for storing pictures. In the embodiment of the present invention, after the image is uploaded to the map bed, the url of the image provided by the map bed may be acquired, and the user may acquire corresponding image information from the url of the image to the map bed. By adopting the method provided by the invention, the picture can be properly compressed, so that the volume of data transmission between interfaces is reduced, and the transmission efficiency and the development efficiency are improved.
Further, step S106 is executed to call a document storage database of the image processing server, wherein document information corresponding to different types of lines is stored in the document storage database respectively. In the embodiment of the invention, the file information of the file storage database can be stored in a grading way.
Specifically, step S108 is executed to match each main line with the document information stored in the document storage database, so as to obtain corresponding document information. In this step, the weighting calculation may be performed on each main line according to the classification strategy of the pattern information of the pattern storage database to obtain the weight of each main line, and the main lines represented by different weights have different levels. Then, each main line is specifically classified according to the weight of each main line, and further, according to the level of each main line, corresponding pattern information is read from the pattern information of the level. For example, the main line length is divided into three types, long, medium and short, the case information corresponding to the long main line is collectively stored, and is defined as high-level, the case information corresponding to the medium-length main line is collectively stored, and is defined as medium-level, and the case information corresponding to the short main line is collectively stored, and is defined as low-level. After the main line is identified, it is first judged which of the three categories, long, medium and short, the main line is searched in the corresponding level of the case information according to the category, so as to reduce the search range and shorten the search time. The method provided by the invention can reduce a large amount of complicated and redundant file information through the hierarchical processing of the file information, save system resources and further better realize a dynamically adjustable file information processing scheme.
After the execution of step S108 is finished, the corresponding level of the case information corresponding to each main line may be obtained in the case storage database. Further, step S110 is executed to return the document information of each main line to the client, so as to provide the user with image information meeting the user' S requirements. Specifically, the weight of each main line, the corresponding pattern information, and the url provided by the graphics bed may be uniformly packaged and returned to the client. More specifically, in the embodiment of the present invention, the brief description and the detailed description of each main line may be returned to the client in combination, wherein the brief description interface may provide a call-up node of the corresponding detailed description, and when the call-up node is triggered, the corresponding detailed description is displayed on the interface. By adopting the method provided by the invention, the brief text and the detailed description are matched, so that the display effect of the page is greatly improved, and the visual experience of the user is improved.
After the execution of the above steps is finished, the user can conveniently perform corresponding processing on the obtained required image information. The image processing method provided by the embodiment of the invention can enable the user to specifically process the required image information, and meanwhile, can also improve the transmission efficiency and the development efficiency, improve the visual experience of the user, meet the requirements of the user and provide convenience for the user.
FIG. 2 illustrates a flow diagram of server interaction, according to one embodiment of the invention. Specifically, referring to fig. 2, the method includes at least steps S201 to S210:
step S201, obtaining an image including at least one main line of a client;
step S202, performing parameter check on the acquired image, judging whether the image parameters are correct, if so, executing step S203, and if not, executing step S204;
step S203, setting the request limit times;
step S204, starting an error exception handling mechanism;
step S205, judging whether the client is a frequency limiting client or not, if so, executing step S204, otherwise, executing step S206;
step S206, judging whether the image recognition engine can correctly recognize the image, if so, executing step S207, otherwise, executing step S204;
step S207, uploading the identified image to a map bed of an image processing server, and acquiring url of the image provided by the map bed;
s208, performing weighted calculation on each acquired main line and performing corresponding hierarchical processing on each main line according to the corresponding weight;
step S209, reading corresponding file information from the file information of the level according to the level of each main line;
step S210, the weight of each main line, the corresponding file information and the url provided by the drawing bed are packaged in a unified way and returned to the client.
With the image processing method shown in fig. 2, there are many different application scenarios in addition to the examples provided above. A specific embodiment is provided to describe the image processing method provided by the embodiment of the present invention in detail.
Example one
This embodiment takes an image in which two main lines exist in one image as an example. FIG. 3 illustrates an image in which two main lines are present in the image according to one embodiment of the invention. As shown in fig. 3, two ruled lines respectively represent a full moon and a crescent moon, a ruled line a represents a full moon, and a ruled line B represents a crescent moon (hereinafter simply referred to as a ruled line A, B). In this example, the client uploads the image itself, and the user wants to be able to obtain and process the information of the two main lines A, B in the image accordingly.
According to the image processing method provided by the invention, firstly, an image comprising two main lines A, B is received from a client. Then, parameter check is performed on the acquired image, in this example, the client uploads the image itself, and therefore, it needs to check whether the image is a valid image. After determining that the image is a valid image, the check identifies the image by invoking an image recognition engine, thereby identifying the two main lines A, B in the image. Then, the images of the two main lines A, B after the recognition processing are uploaded to the chart bed of the image processing server, and the url of the corresponding image provided by the chart bed is acquired. And further, calling a file storage database of the image processing server, wherein file information corresponding to different types of lines is stored in the file storage database respectively. And (3) respectively carrying out weighting calculation on the two main lines A, B to obtain the weight of each main line, and grading the two main lines A, B according to the specific weight. In the embodiment of the present invention, the level of the main line a is higher than that of the main line B, the level of the main line a is set to be high, and the level of the main line B is set to be low. Further, according to the level of the master line A, B, corresponding document information is read from the document information of the corresponding level. The advanced document information stores: the moon symbolizes the full life, the reunion of relatives, the satisfaction of families, the moon of the moon at mid-autumn night symbolizes the reunion, and numerous lyrics masters praise the song as asking oneself to home, relatives and relatives, and lovers to think. The low-level document information stores: the crescent moon is a curved moon which emerges at the beginning of each month of the lunar calendar, when the moon runs between the sun and the earth, the moon faces the earth with its dark side, and rises and falls with the sun, and the crescent moon is the earliest seen eyebrow moon which symbolizes the start of beauty. After matching the corresponding document information according to the level of the main line A, B, uniformly packaging the weight of the main line A, B, the corresponding document information and the corresponding url provided by the graphics bed back to the client. Meanwhile, the brief and detailed descriptions corresponding to the main line A, B are returned to the client in conjunction. At this time, the image information received by the client is very clear and complete, and the user can conveniently acquire the required image information through the client and perform corresponding processing.
The results provided in the above embodiments are merely examples, and the image processing method provided in the embodiments of the present invention can provide the user with the image according to the specific needs thereof through the image processing technology, and the embodiments are not limited thereto.
Therefore, the image processing method provided by the embodiment of the invention is based on the principle that the image usually provides enough information by the main line, analyzes and processes various complicated images, extracts the main line, and is convenient for the targeted acquisition of image information, so that a user can specifically process the required image information. In addition, by adopting the method provided by the embodiment of the invention, the pictures can be properly compressed, the transmission efficiency and the development efficiency are improved, and meanwhile, the file information can be processed in a grading way, so that a large number of complicated redundant files are reduced, and the file brief and the detailed description are matched, so that the page display effect is greatly improved, and the visual experience of a user is further improved.
Based on the same inventive concept, the embodiment of the invention also provides an image processing device. Fig. 4 shows a schematic block diagram of an image processing apparatus according to an embodiment of the present invention. As shown in fig. 4, the image processing apparatus includes at least:
a receiving module 410 adapted to receive an image comprising at least one main line from a client;
an image recognition engine 420, coupled to the receiving module 410, adapted to perform recognition processing on the image to identify at least one main line in the image;
a pattern storage database 430 coupled to the image recognition engine 420 and adapted to store pattern information corresponding to different types of lines, respectively;
the matching module 440 is coupled with the document storage database 430 and is suitable for matching each main line with the document information stored in the document storage database to obtain corresponding document information;
and a sending module 450, coupled to the matching module 440, adapted to return the pattern information of each main line to the client.
In a preferred embodiment, the matching module 440 is further adapted to:
performing weighted calculation on each main line according to a classification strategy of the file information of the file storage database to obtain a weight of each main line;
classifying each main line according to the weight of each main line;
and reading corresponding file information from the file information of the level according to the level of each main line.
In a preferred embodiment, the image processing apparatus further includes:
the image recognition engine 420 is further adapted to upload the image after the image recognition processing to the image processing server, and obtain the url of the image provided by the image processing server;
and the image bed is suitable for receiving the image uploaded by the image recognition engine and providing the url of the image.
In a preferred embodiment, the sending module 450 is further adapted to:
and uniformly packaging the weight of each main line, corresponding file information and url provided by the drawing bed and returning the uniform package to the client.
In a preferred embodiment, the sending module 450 is further adapted to:
and combining the brief description and the detailed description of each main line back to the client, wherein the brief description interface provides a starting node of the detailed description, and when the starting node is triggered, the detailed description is displayed on the interface.
In a preferred embodiment, the image processing apparatus, as shown in fig. 5, further includes:
a preprocessing module 460, coupled to the receiving module 410, and adapted to perform parameter check on the image from the client before invoking an image recognition engine of the image processing server to perform recognition processing on the image;
if the check passes, the image recognition engine 420 is invoked;
if the check fails, a preset error exception handling mechanism is started.
In a preferred embodiment, the pre-processing module 460 is further adapted to perform a parameter check on the image from the client in at least one of the following ways:
checking the validity of the uid of the client;
if the image uploaded by the client is the image, checking whether the image is a valid image;
if the url of the image is uploaded by the client, whether the url is empty, legal or not is checked, and whether the url is the url of the image is judged.
In a preferred embodiment, the pre-processing module 460 is further adapted to:
checking whether the uid uploaded by the client is correct;
it is checked whether the client is a frequency limited user.
In a preferred embodiment, the pre-processing module 460 is further adapted to set the client as a frequency limited user by:
the Redis data storage service based on the memory sets the identity of the client as a key, and sets the expiration time and the access frequency.
In a preferred embodiment, in the image processing apparatus, the image recognition engine 420 is further adapted to start a preset error exception handling mechanism if the image recognition fails after the image recognition processing is performed on the image.
The image processing method and the image processing device provided by the embodiment of the invention can achieve the following beneficial effects:
the embodiment of the invention improves the image processing method. In the prior art, generally, a user can simply process the whole image information after acquiring the image information. However, when a user needs to use partial image information, the user cannot conveniently perform corresponding processing on the partial image information, and the user requirements cannot be met, which brings inconvenience to the user. Therefore, the embodiment of the invention provides an image processing method for enabling a user to conveniently perform targeted processing on part of information in an image. First, an image processing server receives an image including at least one dominant line from a client. After the image processing server successfully receives the image, calling an image recognition engine of the image processing server to recognize the image, recognizing at least one main line in the image, and further acquiring the recognized main line. After the identified main line is acquired, a file storage database of the image processing server can be called, wherein file information corresponding to different types of lines is stored in the file storage database respectively. The file information provides a comparison basis for the acquired main lines. And further matching each main line with the file information stored in the file storage database to obtain corresponding file information. And finally, returning the file information corresponding to each main line to the client. Therefore, the image processing method provided by the embodiment of the invention is based on the principle that the image usually provides enough information by the main line, analyzes and processes various complicated images, extracts the main line, and is convenient for the targeted acquisition of image information, so that a user can specifically process the required image information. In addition, the method provided by the embodiment of the invention can avoid a plurality of unnecessary steps by specifically operating a certain specific parameter of the image processing server, is more flexible and convenient to operate, and simultaneously provides a more perfect error processing mechanism, thereby greatly reducing the abnormal conditions of the program. Moreover, by adopting the method provided by the invention, the pictures can be properly compressed, the transmission efficiency and the development efficiency are improved, and meanwhile, the file information can be processed in a grading way, so that a large number of complex redundant files are reduced, and the collocation of the file brief and the detailed description greatly improves the page display effect, thereby improving the visual experience of users.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in an image processing apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Thus, it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been illustrated and described in detail herein, many other variations or modifications consistent with the principles of the invention may be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Accordingly, the scope of the invention should be understood and interpreted to cover all such other variations or modifications.

Claims (18)

1. An image processing method applied to an image processing server comprises the following steps:
receiving an image comprising at least one main line from a client;
calling an image recognition engine of the image processing server to perform recognition processing on the image, and recognizing at least one main line in the image;
calling a file storage database of the image processing server, wherein file information corresponding to different types of lines is stored in the file storage database respectively;
matching each main line with the file information stored in the file storage database to obtain corresponding file information;
returning the file information of each main line to the client;
when the file information of the file storage database is stored in grades, matching each main line with the file information stored in the file storage database comprises:
performing weighted calculation on each main line according to the classification strategy of the file information of the file storage database to obtain the weight of each main line;
classifying each main line according to the weight of each main line;
and reading corresponding file information from the file information of the level according to the level of each main line.
2. The method of claim 1, wherein invoking an image recognition engine of the image processing server to perform recognition processing on the image comprises:
and uploading the identified and processed image to a map bed of the image processing server, and acquiring the url of the image provided by the map bed.
3. The method of claim 2, wherein returning the pattern information of the respective master lines to the client comprises:
and uniformly packaging the weight of each main line, corresponding file information and url provided by the drawing bed and returning the uniform package to the client.
4. The method of claim 1, wherein returning the pattern information of the respective master lines to the client comprises:
and combining the brief description and the detailed description of each main line bar and returning the brief description and the detailed description to the client, wherein a call-up node of the detailed description is provided on a brief description interface, and when the call-up node is triggered, the detailed description is displayed on the interface.
5. The method according to any one of claims 1-4, wherein before invoking an image recognition engine of the image processing server to perform recognition processing on the image, further comprising:
performing parameter check on the image from the client;
if the check is passed, calling the image recognition engine;
if the check fails, a preset error exception handling mechanism is started.
6. The method of claim 5, wherein the parameter checking of the image from the client comprises at least one of:
carrying out validity check on the identity uid of the client;
if the image uploaded by the client side is an image, checking whether the image is a valid image;
and if the url of the image is uploaded by the client, checking whether the url is empty, legal or not and whether the url is the url of the image.
7. The method according to claim 6, wherein the validity checking of the identity uid of the client comprises:
checking whether the uid uploaded by the client is correct;
checking whether the client is a frequency limited user.
8. The method of claim 7, wherein the client is set as a frequency limited user by:
the Redis data storage service based on the memory sets the identity of the client as a key, and sets the expiration time and the access frequency.
9. The method of claim 1, wherein after invoking an image recognition engine of the image processing server to perform recognition processing on the image, further comprising:
and if the image recognition engine fails to recognize the image, starting a preset error exception handling mechanism.
10. An image processing device applied to an image processing server comprises
The receiving module is suitable for receiving an image comprising at least one main line from a client;
the image recognition engine is suitable for performing recognition processing on the image and recognizing at least one main line in the image;
the file storage database is suitable for respectively storing file information corresponding to different types of lines;
the matching module is suitable for matching each main line with the file information stored in the file storage database to obtain corresponding file information;
the sending module is suitable for returning the file information of each main line to the client;
wherein the matching module is further adapted to:
performing weighted calculation on each main line according to the classification strategy of the file information of the file storage database to obtain the weight of each main line;
classifying each main line according to the weight of each main line;
and reading corresponding file information from the file information of the level according to the level of each main line.
11. The apparatus of claim 10, further comprising:
the image recognition engine is further suitable for uploading the image after recognition processing to a map bed of the image processing server after the image is subjected to recognition processing, and acquiring the url of the image provided by the map bed;
the image bed is suitable for receiving the images uploaded by the image recognition engine and providing the url of the images.
12. The apparatus of claim 11, wherein the transmitting means is further adapted to:
and uniformly packaging the weight of each main line, corresponding file information and url provided by the drawing bed and returning the uniform package to the client.
13. The apparatus of claim 10, wherein the transmitting means is further adapted to:
and combining the brief description and the detailed description of each main line bar and returning the brief description and the detailed description to the client, wherein a call-up node of the detailed description is provided on a brief description interface, and when the call-up node is triggered, the detailed description is displayed on the interface.
14. The apparatus of any of claims 10-13, further comprising:
the preprocessing module is suitable for calling an image recognition engine of the image processing server to perform parameter check on the image from the client before performing recognition processing on the image;
if the check is passed, calling the image recognition engine;
if the check fails, a preset error exception handling mechanism is started.
15. The apparatus of claim 14, wherein the pre-processing module is further adapted to perform a parameter check on the image from the client in at least one of:
carrying out validity check on the identity uid of the client;
if the image uploaded by the client side is an image, checking whether the image is a valid image;
and if the url of the image is uploaded by the client, checking whether the url is empty, legal or not and whether the url is the url of the image.
16. The apparatus of claim 15, wherein the preprocessing module is further adapted to:
checking whether the uid uploaded by the client is correct;
checking whether the client is a frequency limited user.
17. The apparatus of claim 16, wherein the preprocessing module is further adapted to set the client as a frequency limited user by:
the Redis data storage service based on the memory sets the identity of the client as a key, and sets the expiration time and the access frequency.
18. The apparatus of claim 10, wherein the image recognition engine is further adapted to initiate a preset error exception handling mechanism if the image recognition fails after the image recognition processing is performed on the image.
CN201611248654.1A 2016-12-29 2016-12-29 Image processing method and device Active CN106778666B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611248654.1A CN106778666B (en) 2016-12-29 2016-12-29 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611248654.1A CN106778666B (en) 2016-12-29 2016-12-29 Image processing method and device

Publications (2)

Publication Number Publication Date
CN106778666A CN106778666A (en) 2017-05-31
CN106778666B true CN106778666B (en) 2020-06-05

Family

ID=58927739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611248654.1A Active CN106778666B (en) 2016-12-29 2016-12-29 Image processing method and device

Country Status (1)

Country Link
CN (1) CN106778666B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294779A (en) * 2013-05-13 2013-09-11 北京百度网讯科技有限公司 Method and device for acquiring object information
CN103379090A (en) * 2012-04-12 2013-10-30 腾讯科技(北京)有限公司 Open platform access frequency control method and system and frequency server
CN105405101A (en) * 2015-11-12 2016-03-16 上海联影医疗科技有限公司 X-ray image processing method and apparatus
CN106127148A (en) * 2016-06-21 2016-11-16 华南理工大学 A kind of escalator passenger's unusual checking algorithm based on machine vision

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870516B (en) * 2012-12-18 2019-10-25 北京三星通信技术研究有限公司 Retrieve the method for image, paint in real time reminding method and its device
CN103345617B (en) * 2013-06-19 2016-09-07 成都中医药大学 Chinese medicine knows method for distinguishing and system thereof
CN105022811A (en) * 2015-07-06 2015-11-04 深圳市金立通信设备有限公司 Menu generating method and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379090A (en) * 2012-04-12 2013-10-30 腾讯科技(北京)有限公司 Open platform access frequency control method and system and frequency server
CN103294779A (en) * 2013-05-13 2013-09-11 北京百度网讯科技有限公司 Method and device for acquiring object information
CN105405101A (en) * 2015-11-12 2016-03-16 上海联影医疗科技有限公司 X-ray image processing method and apparatus
CN106127148A (en) * 2016-06-21 2016-11-16 华南理工大学 A kind of escalator passenger's unusual checking algorithm based on machine vision

Also Published As

Publication number Publication date
CN106778666A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN110570358A (en) vehicle loss image enhancement method and device based on GAN network
CN108491866B (en) Pornographic picture identification method, electronic device and readable storage medium
CN111008935B (en) Face image enhancement method, device, system and storage medium
CN113569740B (en) Video recognition model training method and device, and video recognition method and device
CN113627411A (en) Super-resolution-based commodity identification and price matching method and system
CN106156794B (en) Character recognition method and device based on character style recognition
CN110781925A (en) Software page classification method and device, electronic equipment and storage medium
CN114359533B (en) Page number identification method based on page text and computer equipment
CN116562991A (en) Commodity big data information identification method and system for meta-space electronic commerce platform
CN110363206B (en) Clustering of data objects, data processing and data identification method
CN115603926A (en) Phishing mail identification method, system, device and storage medium
CN106778666B (en) Image processing method and device
CN110796115B (en) Image detection method and device, electronic equipment and readable storage medium
CN106846351B (en) Image processing method and client
CN108369647A (en) Quality control based on image
CN113888760B (en) Method, device, equipment and medium for monitoring violation information based on software application
CN110209880A (en) Video content retrieval method, Video content retrieval device and storage medium
CN113449506A (en) Data detection method, device and equipment and readable storage medium
CN111078877B (en) Data processing method, training method of text classification model, and text classification method and device
CN113742559A (en) Keyword detection method and device, electronic equipment and storage medium
CN108875770B (en) Pedestrian detection false alarm data labeling method, device, system and storage medium
CN113837257B (en) Target detection method and device
CN112561456B (en) Approval assisting method, device, storage medium and equipment
CN116189291A (en) Video gesture recognition method and device based on deep learning and electronic equipment
CN117475364A (en) Picture detection method, device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant