CN110490852A - Search method, device, computer-readable medium and the electronic equipment of target object - Google Patents

Search method, device, computer-readable medium and the electronic equipment of target object Download PDF

Info

Publication number
CN110490852A
CN110490852A CN201910742168.2A CN201910742168A CN110490852A CN 110490852 A CN110490852 A CN 110490852A CN 201910742168 A CN201910742168 A CN 201910742168A CN 110490852 A CN110490852 A CN 110490852A
Authority
CN
China
Prior art keywords
picture
target object
information
pictures
retrieved
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910742168.2A
Other languages
Chinese (zh)
Inventor
王伟
曾凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910742168.2A priority Critical patent/CN110490852A/en
Publication of CN110490852A publication Critical patent/CN110490852A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Embodiments herein provides search method, device, computer-readable medium and the electronic equipment of a kind of target object, is related to the technical fields such as the computer vision of artificial intelligence.The search method of the target object includes: the picture that acquisition includes object to be retrieved, and obtains the information for the target object that the needs that user inputs are retrieved;Processing is split to the picture and obtains multiple sub-pictures, includes at least one object to be retrieved in each sub-pictures therein;Identify the information for the object to be retrieved for including in each sub-pictures;According to the information for the object to be retrieved for including in the information of the target object and each sub-pictures recognized, determine in the picture whether include the target object.The technical solution of the embodiment of the present application can shorten the retrieval duration of target object, improve the recall precision of target object.

Description

Search method, device, computer-readable medium and the electronic equipment of target object
Technical field
This application involves computer and fields of communication technology, search method, dress in particular to a kind of target object It sets, computer-readable medium and electronic equipment.
Background technique
The article that needs are found in numerous articles is very time-consuming and laborious work, for example finds and need in library Books when, since books place the too intensive and huge books for causing to be difficult to quickly and easily to find needs of books amount, because How this shortens the duration for finding article, and the efficiency for improving item retrieval becomes technical problem urgently to be resolved.
Summary of the invention
Embodiments herein provides search method, device, computer-readable medium and the electronics of a kind of target object Equipment, and then the retrieval duration of target object can be shortened at least to a certain extent, improve the recall precision of target object.
Other characteristics and advantages of the application will be apparent from by the following detailed description, or partially by the application Practice and acquistion.
According to the one aspect of the embodiment of the present application, a kind of search method of target object is provided, comprising: acquisition includes The information for the target object that the needs for having the picture of object to be retrieved, and obtaining user's input are retrieved;The picture is divided It cuts processing and obtains multiple sub-pictures, include at least one object to be retrieved in each sub-pictures therein;It identifies described each The information for the object to be retrieved for including in sub-pictures;According to the information of the target object and each sub-pictures recognized In include object to be retrieved information, determine in the picture whether include the target object.
According to the one aspect of the embodiment of the present application, a kind of retrieval device of target object is provided, comprising: obtain single Member, for obtain include object to be retrieved picture, and the information of target object that the needs for obtaining user's input are retrieved;Point Unit is cut, multiple sub-pictures is obtained for being split processing to the picture, includes at least in each sub-pictures therein One object to be retrieved;Recognition unit, the information for the object to be retrieved for including in each sub-pictures for identification;Processing is single Member, for the letter according to the object to be retrieved for including in the information of the target object and each sub-pictures recognized Breath, determines in the picture whether include the target object.
In some embodiments of the present application, aforementioned schemes are based on, if the processing unit is configured that the target object Information and the information of any object to be retrieved recognized match, it is determined that include the target pair in the picture As.
In some embodiments of the present application, aforementioned schemes are based on, the processing unit is also used to: if it is determined that the picture In include the target object, then the position of the target object is marked in the picture.
In some embodiments of the present application, aforementioned schemes are based on, the cutting unit includes: edge detection unit, is used In carrying out edge detection process to the picture, to detect the edge between each object to be retrieved for including in the picture Line;Execution unit is obtained for being split processing to the picture based on the edge line between each object to be retrieved The multiple sub-pictures.
In some embodiments of the present application, aforementioned schemes are based on, the edge detection unit is configured that the picture Gray processing is carried out to handle to obtain gray level image;Calculate the gradient value and gradient direction of each pixel in the gray level image; The pixel on the edge line is determined according to the gradient value of each pixel, and according to each pixel Gradient direction determines the trend of the edge line;According to the trend of pixel and the edge line on the edge line, Determine the edge line between each object to be retrieved for including in the picture.
In some embodiments of the present application, be based on aforementioned schemes, the acquiring unit be configured that acquisition include to After the picture for retrieving object, the picture is stored into database, and obtain the storage address of the picture;The segmentation Unit is configured that the storage address based on the picture transfers picture segmentation service and is split processing to the picture and obtains institute State multiple sub-pictures.
In some embodiments of the present application, be based on aforementioned schemes, the cutting unit be configured that the picture into After row dividing processing obtains the multiple sub-pictures, the multiple sub-pictures are stored into the database, and obtain institute State the storage address of multiple sub-pictures;The identification cell configuration are as follows: the storage address based on the multiple sub-pictures transfers letter Breath identification service identifies the information for the object to be retrieved for including in each sub-pictures.
In some embodiments of the present application, it is based on aforementioned schemes, the identification cell configuration are as follows: know by optical character Other technology identifies the information for the object to be retrieved for including in each sub-pictures.
In some embodiments of the present application, aforementioned schemes are based on, the acquiring unit, which is configured that, obtains user's input Text information includes the information of the target object in the text information;Or the speech retrieval instruction of user's input is obtained, The speech retrieval instruction is identified to get the information of the target object.
In some embodiments of the present application, aforementioned schemes are based on, the processing unit is also used to: if it is determined that the picture In do not include the target object, then return retrieval failure prompt information.
In some embodiments of the present application, aforementioned schemes are based on, the object to be retrieved includes books;The segmentation is single Member is configured that based on the segmentation strategy in each sub-pictures including a books, is the multiple subgraph by the picture segmentation Piece.
In some embodiments of the present application, aforementioned schemes are based on, the information of the target object includes target books Identification information;The identification cell configuration are as follows: the identification information for the books for including in identification each sub-pictures;The processing If unit is configured that the identification information of the identification information and any books recognized of the target books matches, it is determined that It include the target books in the picture.
According to the one aspect of the embodiment of the present application, a kind of computer-readable medium is provided, computer is stored thereon with Program realizes the search method such as above-mentioned target object as described in the examples when the computer program is executed by processor.
According to the one aspect of the embodiment of the present application, a kind of electronic equipment is provided, comprising: one or more processors; Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors When row, so that one or more of processors realize the search method such as above-mentioned target object as described in the examples.
In the technical solution provided by some embodiments of the present application, by include object to be retrieved picture into Row dividing processing obtains multiple sub-pictures, the information for the object to be retrieved for including in each sub-pictures is identified, to examine as needed The information for the object to be retrieved for including in the information of the target object of rope and each sub-pictures recognized determine in picture whether Include target object, makes it possible to by being split to the picture comprising object to be retrieved, identifying processing is come to target pair As being retrieved, and then be conducive to shorten the retrieval duration of target object, improve the recall precision of target object.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The application can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the application Example, and together with specification it is used to explain the principle of the application.It should be evident that the accompanying drawings in the following description is only the application Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 is shown can be using the schematic diagram of the exemplary system architecture of the technical solution of the embodiment of the present application;
Fig. 2 shows the flow charts according to the search method of the target object of one embodiment of the application;
Fig. 3 shows being split processing to picture and obtain the stream of multiple sub-pictures according to one embodiment of the application Cheng Tu;
Fig. 4 shows the flow chart that edge detection process is carried out to picture of one embodiment according to the application;
Fig. 5 shows the structure chart of the Books Retrieve System of one embodiment according to the application;
Fig. 6 shows the flow chart of the book retrieval method according to one embodiment of the application;
Fig. 7 shows the block diagram of the retrieval device of the target object of one embodiment according to the application;
Fig. 8 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present application.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the application will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to provide and fully understand to embodiments herein.However, It will be appreciated by persons skilled in the art that the technical solution of the application can be practiced without one or more in specific detail, Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation to avoid fuzzy the application various aspects.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
Artificial intelligence (Artificial Intelligence, AI) is to utilize digital computer or digital computer control Machine simulation, extension and the intelligence for extending people of system, perception environment obtain knowledge and the reason using Knowledge Acquirement optimum By, method, technology and application system.In other words, artificial intelligence is a complex art of computer science, it attempts to understand The essence of intelligence, and produce a kind of new intelligence machine that can be made a response in such a way that human intelligence is similar.Artificial intelligence The design principle and implementation method for namely studying various intelligence machines make machine have the function of perception, reasoning and decision.
Artificial intelligence technology is an interdisciplinary study, is related to that field is extensive, and the technology of existing hardware view also has software layer The technology in face.With artificial intelligence technology research and progress, research and application is unfolded in multiple fields in artificial intelligence technology, such as Common smart home, intelligent wearable device, virtual assistant, intelligent sound box, intelligent marketing, unmanned, automatic Pilot, nobody Machine, robot, intelligent medical, intelligent customer service etc., it is believed that with the development of technology, artificial intelligence technology will obtain in more fields To application, and play more and more important value.
Scheme provided by the embodiments of the present application is related to the technologies such as the computer vision of artificial intelligence, especially by being implemented as follows Example is illustrated:
Fig. 1 is shown can be using the schematic diagram of the exemplary system architecture of the technical solution of the embodiment of the present application.
As shown in Figure 1, system architecture may include terminal device (smart phone 101 as shown in fig. 1, tablet computer 102 With one of portable computer 103 or a variety of, naturally it is also possible to be desktop computer etc.), network 104 and server 105.Network 104 between terminal device and server 105 to provide the medium of communication link.Network 104 may include each Kind connection type, such as wired communications links, wireless communication link etc..
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.For example server 105 can be multiple server compositions Server cluster etc..
In one embodiment of the application, terminal device can collect include object to be retrieved picture, such as Can be include more books picture, the information of target object for then retrieving the needs that user inputs and collected The picture is uploaded to server 105 by network 104.Server 105 can carry out the picture after getting the picture Dividing processing obtains multiple sub-pictures, includes at least one object to be retrieved (such as son in each sub-pictures therein Picture may include an object to be retrieved).Then, server 105 can identify include in each sub-pictures to be retrieved right The information of elephant, it is true to be come according to the information for the object to be retrieved for including in the information of target object and each sub-pictures for recognizing It whether include target object in the fixed picture.For example, if the information of target object and any object to be retrieved for recognizing Information matches, it is determined that includes target object in picture.As it can be seen that the technical solution of the embodiment of the present application makes it possible to pass through Picture comprising object to be retrieved is split, identifying processing retrieves target object, be conducive to shorten target pair The retrieval duration of elephant, improves the recall precision of target object.
It should be noted that the search method of target object provided by the embodiment of the present application is generally held by server 105 Row, correspondingly, the retrieval device of target object is generally positioned in server 105.But in the other embodiments of the application In, terminal device can also have similar function with server, thereby executing target object provided by the embodiment of the present application Retrieval scheme.
The realization details of the technical solution of the embodiment of the present application is described in detail below:
Fig. 2 shows the flow chart according to the search method of the target object of one embodiment of the application, the targets pair The search method of elephant can be executed by the equipment with calculation processing function, such as server 105 as shown in Fig. 1 To execute.Referring to shown in Fig. 2, the search method of the target object includes at least step S210 to step S240, be discussed in detail as Under:
In step S210, acquisition includes the picture of object to be retrieved, and the mesh that the needs for obtaining user's input are retrieved Mark the information of object.
It include that the picture of object to be retrieved can be the collected figure of terminal device in one embodiment of the application Piece, for example, user by terminal device shooting include object to be retrieved picture, be then uploaded to server and carry out at retrieval Reason.Optionally, object to be retrieved can be the books on bookshelf, commodity in market etc..
In one embodiment of the application, the information for obtaining the target object that the needs that user inputs are retrieved, which can be, to be obtained The text information of family input is taken, in text information includes the information of target object, for example includes the mesh of retrieval in need It marks on a map the title etc. of book.
In one embodiment of the application, the speech retrieval instruction of user's input can also be obtained, then identifies the language Sound search instruction is to get the information of target object.
With continued reference to shown in Fig. 2, in step S220, processing is split to the picture and obtains multiple sub-pictures, In each sub-pictures in include at least one object to be retrieved.
It, can be based on including in each sub-pictures when being split processing to picture in one embodiment of the application The picture segmentation is multiple sub-pictures by the segmentation strategy of one object to be retrieved.For example, if object to be retrieved is books, So processing can be split to the picture based on the segmentation strategy in a sub-pictures including a books.
In one embodiment of the application, as shown in figure 3, being split processing to picture obtains the mistake of multiple sub-pictures Journey may include steps of S310 and step S320:
In step s310, edge detection process is carried out to picture, to detect include in the picture each to be retrieved Edge line between object.
In embodiments herein, due to include in picture each object to be retrieved between there are gaps, can To detect the edge line between each object to be retrieved for including in picture, and then to come by carrying out edge detection to picture Realize the dividing processing to picture.
In one embodiment of the application, as shown in figure 4, edge detection process is carried out to picture, to detect in picture The process for the edge line between each object to be retrieved for including, may include steps of:
Step S410 carries out gray processing to picture and handles to obtain gray level image.
In one embodiment of the application, it is ash that gray processing processing, which is the color image processing containing brightness and color, Spend the process of image.Optionally, to picture carry out gray processing processing when can using component method, maximum value process, mean value method, The modes such as weighted mean method carry out gray processing processing.For example, can be incited somebody to action if carrying out gray processing processing using component method Gray value of the brightness of three-component (such as R component, G component, B component) in color image as three gray level images, then root According to needing to choose a kind of gray level image;It, can will be in color image if carrying out gray processing processing using maximum value process Gray value of the maximum value of three-component brightness as grayscale image;It, can be with if carrying out gray processing processing using mean value method Three-component brightness in color image is averaging to obtain the gray value in grayscale image;If carrying out gray scale using weighted mean method Change processing, then the three-component brightness in color image can be weighted and averaged to the ash as grayscale image using different weights Angle value.
Step S420 calculates the gradient value and gradient direction of each pixel in the gray level image.
In one embodiment of the application, gray level image can regard binary function f (x, y) as, wherein f (x, y) is indicated The gray value at pixel position (x, y) in gray level image, such gray level image is considered as a curved surface, and then can lead to The mode of derivation is crossed to calculate the gradient value and gradient direction of each pixel in gray level image.
Step S430 determines the pixel on the edge line, and root according to the gradient value of each pixel The trend of the edge line is determined according to the gradient direction of each pixel.
In one embodiment of the application, since edge is to change most violent position on curved surface, which is also bent The position of the Local Extremum in face, therefore the pixel on edge line can be determined by the gradient value of pixel.Together When, it, can be based on the gradient side of each pixel since the gradient direction of pixel provides the tendency information of edge line Always the trend of edge line is determined.
Step S440 determines the picture according to the trend of pixel and the edge line on the edge line In include each object to be retrieved between edge line.
In one embodiment of the application, when determine pixel and edge line on the edge line trend it Afterwards, the edge line between object to be retrieved can be determined based on the trend of these pixels and edge line, such as can be according to side The trend of edge line connects the pixel being located on edge line to obtain the edge line between each object to be retrieved.
With continued reference to shown in Fig. 3, in step s 320, based on the edge line between each object to be retrieved to described Picture is split processing and obtains the multiple sub-pictures.
It, can be according to after determining the edge line between each object to be retrieved in one embodiment of the application Each determining edge line is split processing to picture, to obtain multiple sub-pictures.
In one embodiment of the application, processing can also be split to picture by image recognition technology, than The each object to be retrieved for including in picture is such as recognized by image recognition technology, be then based on recognize it is each to be retrieved The profile of object to picture is split processing.
With continued reference to shown in Fig. 2, in step S230, the letter for the object to be retrieved for including in each sub-pictures is identified Breath.
In one embodiment of the application, optical character identification (Optical Character can be passed through Recognition, abbreviation OCR) technology identifies the information of the object to be retrieved for including in each sub-pictures.For example it can know Not Chu character information on object to be retrieved, such as title, the author's information of books.
With continued reference to shown in Fig. 2, in step S240, according to the information of the target object and recognize described each The information for the object to be retrieved for including in sub-pictures determines in the picture whether include the target object.
In one embodiment of the application, if the information of the information of target object and any object to be retrieved recognized Match, then can determine in the picture to include target object.For example, if object to be retrieved and target object are books, that If the identification information of target books and the identification information of any books recognized match, it can determine in picture and wrap Contain the target books.Optionally, the identification information of books can be title, author, published information of books etc..
In one embodiment of the application, however, it is determined that include target object in picture, then mark mesh in picture The position of object is marked, and then target object is found based on position of the target object in picture convenient for user.
In one embodiment of the application, however, it is determined that do not include target object in picture, then can return to retrieval failure Prompt information.
In one embodiment of the application, in step S210 obtain include object to be retrieved picture after, can It is stored with the picture that will acquire into database, and obtains the storage address of the picture.And then place is being split to picture When reason, picture segmentation service can be transferred based on the storage address of the picture processing is split to the picture and obtain multiple subgraphs Piece.
In one embodiment of the application, after being split processing to picture and obtaining multiple sub-pictures, it can incite somebody to action This multiple sub-pictures is stored into database, and obtains the storage address of multiple sub-pictures;And then it identifies in each sub-pictures The process of the information for the object to be retrieved for including can be the identification service of the storage address gathering information based on multiple sub-pictures and know The information for the object to be retrieved for including in not each sub-pictures.
The technical solution of previous embodiment makes it possible to by being split, at identification to the picture comprising object to be retrieved Reason is conducive to shorten the retrieval duration of target object to retrieve to target object, improves the retrieval effect of target object Rate.
Below in conjunction with Fig. 5 to Fig. 6, the technical solution of the embodiment of the present application is described in detail for retrieving books:
As shown in figure 5, according to the Books Retrieve System of one embodiment of the application, comprising: mobile phone terminal 502, image Divide server 504 and Text region server 506.
In one embodiment of the application, mobile phone terminal 502 can be by small routine or application call camera Function takes pictures to books, is then sent to the photo that shooting obtains and the title that user requires to look up by http request Image segmentation server 504.Image segmentation server 504, can after the photo and title for receiving the transmission of mobile phone terminal 502 To be split to the books in picture, a series of subgraphs are exported, each Zhang Zitu includes a books, then will be divided To a series of subgraphs be sent to Text region server 506.Text region server 506 is receiving image segmentation server After subgraph after 504 segmentations sent, OCR interface circulation identification book name can be called, if recognition result and lookup Target is identical, then stops recycling, and the result recognized is returned to image segmentation server 504, otherwise continues cycling through.
In one embodiment of the application, when identifying book name by OCR technique, it can identify and be printed on spine Title, then by the Content Transformation recognized be editable text form.If recognizing the figure required to look up in picture Book, then can be in the specific location that photo acceptance of the bid is published books.It is alternatively possible to pass through the OCR interface service for calling third party to provide It carries out Text region, for example picture that shooting obtains is stored and is cached into Cloud Server, temporarily save the picture, so OCR interface is called to realize the identification of book name based on the chained address of the picture afterwards, and can be with after identification is completed The picture of caching is removed.
In one embodiment of the application, when being split to picture, it can be realized based on edge detecting technology Segmentation.Since the gray scale of different images is different, boundary generally has apparent edge, therefore using this feature come segmentation figure Picture.It has been generally acknowledged that edge is the line of demarcation of different zones, it is the set for the pixel that surrounding (part) pixel has significant change, and There are amplitude and two, direction attribute, in brief, edge is local feature and the edge that surrounding pixel significant changes generate.Often Have with edge detection method: first differential boundary operator, Roberts edge detection operator, Sobel edge detection operator etc..With Under illustrate specific edge detection scheme by taking first differential boundary operator as an example:
First differential boundary operator is also referred to as gradient edge operator, it is to be schemed using image in the step evolution of edge As gradient carries out edge detection in the characteristic that edge obtains maximum.Specifically, first gray processing can be carried out to image to handle To grayscale image, gray scale refers to the color depth at black white image midpoint, and range is generally from 0 to 255, and white is 255, black 0.Ash Degree image can regard binary function f (x, y) as, and (x, y) is the position of pixel, and f (x, y) is the gray value at this, this master drawing As that then can be handled with the method for mathematics as a curved surface.Since edge is changed most on curved surface Violent position, this position is also the position of the Local Extremum of curved surface, therefore can be determined on curved surface by differentiating Local Extremum position.Wherein, the process differentiated is to calculate the gradient of image, and the modulus value size of gradient provides edge Strength information, the position of Local Extremum can be determined by the value of gradient, since the direction of gradient is perpendicular to side always Edge direction, therefore the tendency information at edge can be determined by the direction of gradient.
In one embodiment of the application, the gradient fields ▽ f of gray level image can be calculated by following formula (1) (x, y), and calculate by formula (2) modulus value of gradient | ▽ f (x, y) |, the direction ∠ ▽ of gradient is calculated by formula (3) F (x, y):
In one embodiment in the application, the technical side of the embodiment of the present application can be realized based on Flask frame Case.Flask is the lightweight Web application framework write using Python, is configured compared to other web frames simpler It is single, it is proper similar to the better simply application of business of the present invention for meeting.Based on Flask frame, mainly have following several Service interface, CenterServer (center service) interface is the entrance entirely applied, and is responsible for request receiving and routing forwarding; PictureSaveServer (image saves service) interface is responsible for the picture that user uploads being saved in Cloud Server (such as picture Storing data library PictureStoreDB), and unique url of preservation is returned;PictureSplitServer (image segmentation clothes Business) interface is responsible for the picture on user being divided into several subgraphs by image segmentation algorithm;OCRServer (OCR identification clothes Business) interface be responsible for identify books title.Furthermore CneterServer interface is also used to judge that the current no presence of bookshelf book will search Number.Specific execution process can be as shown in Figure 6, comprising the following steps:
Step S601, user initiate search request.Wherein, user can be by http request to center service (CenterServer) search request is initiated, includes the information of picture and the books required to look up in the search request.
Step S602 after center service receives search request, saves service (PictureSaveServer) to picture Request is initiated, to save the picture received.
Step S603, picture save service and picture are stored in picture storing data library (PictureStoreDB).Than It such as can store into the file of the current user name name under picture root.
Step S604, picture storing data library save the access path that service returns to picture to picture.
Step S605, picture save service and the access path of picture are back to center service.
Step S606, center service encapsulate picture and save the access path that service returns, and initiate to scheme to picture segmentation service Piece segmentation request.
Step S607, picture segmentation service are based on edge detection and divide picture.
The picture that segmentation obtains is saved in picture storing data library by step S608, picture segmentation service (PictureStoreDB) in.
Step S609, picture storing data library return to the access path for the picture that segmentation obtains to picture segmentation service.
The access path for the picture that segmentation obtains is back to center service by step S610, picture segmentation service.
Step S611, center service encapsulate the access path that picture segmentation service returns, and initiate text to Text region service Word identification request.
Step S612, Text region service are initiated to obtain the request for the picture that segmentation obtains to picture storing data library.
Step S613, picture storing data library return to the picture that segmentation obtains to Text region service.
Step S614, Text region service carry out OCR identification to the picture that segmentation obtains, obtain recognition result.
Recognition result is returned to center service by step S615, Text region service.
Whether step S616, center service judge in picture to include need according to the recognition result that Text region service returns The books to be searched.
Step S617, center service return to recognition result to user.
It should be noted that being to be carried out for retrieving books to the technical solution of the embodiment of the present application in above-described embodiment It illustrates, in the other embodiments of the application, the technical solution of the embodiment of the present application can also be applied in other scenes, than The lookup of article in such as market.
The Installation practice of the application introduced below can be used for executing the target object in the above embodiments of the present application Search method.For undisclosed details in the application Installation practice, the retrieval of the above-mentioned target object of the application is please referred to The embodiment of method.
Fig. 7 shows the block diagram of the retrieval device of the target object of one embodiment according to the application.
Referring to shown in Fig. 7, according to the retrieval device 700 of the target object of one embodiment of the application, comprising: obtain single Member 702, cutting unit 704, recognition unit 706 and processing unit 708.
Wherein, acquiring unit 702 be used for obtains include object to be retrieved picture, and obtain user input need to examine The information of the target object of rope;Cutting unit 704 obtains multiple sub-pictures for being split processing to the picture, therein It include at least one object to be retrieved in each sub-pictures;Recognition unit 706 includes in each sub-pictures for identification Object to be retrieved information;Each height that processing unit 708 is used for the information according to the target object and recognizes The information for the object to be retrieved for including in picture determines in the picture whether include the target object.
In some embodiments of the present application, aforementioned schemes are based on, if processing unit 708 is configured that the target object Information and the information of any object to be retrieved recognized match, it is determined that include the target pair in the picture As.
In some embodiments of the present application, aforementioned schemes are based on, processing unit 708 is also used to: if it is determined that the picture In include the target object, then the position of the target object is marked in the picture.
In some embodiments of the present application, aforementioned schemes are based on, cutting unit 704 includes: edge detection unit, is used for Edge detection process is carried out to the picture, to detect the edge line between each object to be retrieved for including in the picture; Execution unit, for based on the edge line between each object to be retrieved to the picture be split processing obtain it is described Multiple sub-pictures.
In some embodiments of the present application, aforementioned schemes are based on, the edge detection unit is configured that the picture Gray processing is carried out to handle to obtain gray level image;Calculate the gradient value and gradient direction of each pixel in the gray level image; The pixel on the edge line is determined according to the gradient value of each pixel, and according to each pixel Gradient direction determines the trend of the edge line;According to the trend of pixel and the edge line on the edge line, Determine the edge line between each object to be retrieved for including in the picture.
In some embodiments of the present application, be based on aforementioned schemes, acquiring unit 702 be configured that acquisition include to After the picture for retrieving object, the picture is stored into database, and obtain the storage address of the picture;The segmentation Unit is configured that the storage address based on the picture transfers picture segmentation service and is split processing to the picture and obtains institute State multiple sub-pictures.
In some embodiments of the present application, be based on aforementioned schemes, cutting unit 704 be configured that the picture into After row dividing processing obtains the multiple sub-pictures, the multiple sub-pictures are stored into the database, and obtain institute State the storage address of multiple sub-pictures;The identification cell configuration are as follows: the storage address based on the multiple sub-pictures transfers letter Breath identification service identifies the information for the object to be retrieved for including in each sub-pictures.
In some embodiments of the present application, aforementioned schemes are based on, recognition unit 706 is configured that be known by optical character Other technology identifies the information for the object to be retrieved for including in each sub-pictures.
In some embodiments of the present application, aforementioned schemes are based on, acquiring unit 702, which is configured that, obtains user's input Text information includes the information of the target object in the text information;Or the speech retrieval instruction of user's input is obtained, The speech retrieval instruction is identified to get the information of the target object.
In some embodiments of the present application, aforementioned schemes are based on, processing unit 708 is also used to: if it is determined that the picture In do not include the target object, then return retrieval failure prompt information.
In some embodiments of the present application, aforementioned schemes are based on, the object to be retrieved includes books;The segmentation is single Member 704 is configured that based on the segmentation strategy in each sub-pictures including a books, is the multiple son by the picture segmentation Picture.
In some embodiments of the present application, aforementioned schemes are based on, the information of the target object includes target books Identification information;Recognition unit 706 is configured that the identification information for identifying the books for including in each sub-pictures;Processing unit If 708 are configured that the identification information of the identification information and any books recognized of the target books matches, it is determined that institute Stating in picture includes the target books.
Fig. 8 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present application.
It should be noted that the computer system 800 of the electronic equipment shown in Fig. 8 is only an example, it should not be to this Shen Please embodiment function and use scope bring any restrictions.
As shown in figure 8, computer system 800 includes central processing unit (Central Processing Unit, CPU) 801, it can be according to the program being stored in read-only memory (Read-Only Memory, ROM) 802 or from storage section 808 programs being loaded into random access storage device (Random Access Memory, RAM) 803 and execute various appropriate Movement and processing, such as execute method described in above-described embodiment.In RAM 803, also it is stored with needed for system operatio Various programs and data.CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input/output (Input/ Output, I/O) interface 805 is also connected to bus 804.
I/O interface 805 is connected to lower component: the importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode Spool (Cathode Ray Tube, CRT), liquid crystal display (Liquid Crystal Display, LCD) etc. and loudspeaker Deng output par, c 807;Storage section 808 including hard disk etc.;And including such as LAN (Local Area Network, office Domain net) card, modem etc. network interface card communications portion 809.Communications portion 809 via such as internet network Execute communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as disk, CD, Magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to from the computer journey read thereon Sequence is mounted into storage section 808 as needed.
Particularly, according to an embodiment of the present application, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiments herein includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the computer program for method shown in execution flow chart.Such In embodiment, which can be downloaded and installed from network by communications portion 809, and/or is situated between from detachable Matter 811 is mounted.When the computer program is executed by central processing unit (CPU) 801, executes in the system of the application and limit Various functions.
It should be noted that computer-readable medium shown in the embodiment of the present application can be computer-readable signal media Or computer readable storage medium either the two any combination.Computer readable storage medium for example can be with System, device or the device of --- but being not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than Combination.The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires Electrical connection, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type are programmable Read-only memory (Erasable Programmable Read Only Memory, EPROM), flash memory, optical fiber, Portable, compact Disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer readable storage medium can be it is any include or storage program Tangible medium, which can be commanded execution system, device or device use or in connection.And in this Shen Please in, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry computer-readable computer program.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Computer program can transmit with any suitable medium, including but not limited to: wireless, wired etc. or above-mentioned is any Suitable combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.Wherein, each box in flowchart or block diagram can represent one A part of a part of a module, program segment or code, above-mentioned module, program segment or code is used for comprising one or more The executable instruction of logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box Function can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated actually may be used To be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that , the combination of each box in block diagram or flow chart and the box in block diagram or flow chart can be as defined in executing The dedicated hardware based systems of functions or operations is realized, or can be come using a combination of dedicated hardware and computer instructions It realizes.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment. Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs When standby execution, so that the electronic equipment realizes method described in above-described embodiment.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description Member, but this division is not enforceable.In fact, according to presently filed embodiment, it is above-described two or more Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the application The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, touch control terminal or network equipment etc.) is executed according to the application embodiment Method.
Those skilled in the art will readily occur to the application after considering specification and practicing embodiment disclosed herein Other embodiments.This application is intended to cover any variations, uses, or adaptations of the application, these modifications are used Way or adaptive change follow the application general principle and including the application it is undocumented in the art known in Common sense or conventional techniques.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.

Claims (15)

1. a kind of search method of target object characterized by comprising
Acquisition includes the picture of object to be retrieved, and obtains the information for the target object that the needs that user inputs are retrieved;
Processing is split to the picture and obtains multiple sub-pictures, includes that at least one is to be checked in each sub-pictures therein Rope object;
Identify the information for the object to be retrieved for including in each sub-pictures;
According to the information for the object to be retrieved for including in the information of the target object and each sub-pictures recognized, really It whether include the target object in the fixed picture.
2. the search method of target object according to claim 1, which is characterized in that according to the information of the target object With the information for the object to be retrieved for including in each sub-pictures for recognizing, determine in the picture whether include described Target object, comprising:
If the information of the target object and the information of any object to be retrieved recognized match, it is determined that in the picture It include the target object.
3. the search method of target object according to claim 1, which is characterized in that further include:
If it is determined that including the target object in the picture, then the position of the target object is marked in the picture It sets.
4. the search method of target object according to claim 1, which is characterized in that be split processing to the picture Obtain multiple sub-pictures, comprising:
Edge detection process is carried out to the picture, to detect the edge between each object to be retrieved for including in the picture Line;
Processing is split to the picture based on the edge line between each object to be retrieved and obtains the multiple subgraph Piece.
5. the search method of target object according to claim 4, which is characterized in that carry out edge detection to the picture Processing, to detect the edge line between each object to be retrieved for including in the picture, comprising:
Gray processing is carried out to the picture to handle to obtain gray level image;
Calculate the gradient value and gradient direction of each pixel in the gray level image;
The pixel on the edge line is determined according to the gradient value of each pixel, and according to each pixel The gradient direction of point determines the trend of the edge line;
According to the trend of pixel and the edge line on the edge line, determine include in the picture it is each to Retrieve the edge line between object.
6. the search method of target object according to claim 1, which is characterized in that further include: acquisition include to After the picture for retrieving object, the picture is stored into database, and obtain the storage address of the picture;
Processing is split to the picture and obtains multiple sub-pictures, comprising: the storage address based on the picture transfers picture Segmentation service is split processing to the picture and obtains the multiple sub-pictures.
7. the search method of target object according to claim 6, which is characterized in that further include: to the picture into After row dividing processing obtains the multiple sub-pictures, the multiple sub-pictures are stored into the database, and obtain institute State the storage address of multiple sub-pictures;
Identify the information for the object to be retrieved for including in each sub-pictures, comprising: the storage based on the multiple sub-pictures Gathering information identification service in address identifies the information for the object to be retrieved for including in each sub-pictures.
8. the search method of target object according to claim 1, which is characterized in that wrapped in identification each sub-pictures The information of the object to be retrieved contained, comprising:
The information for the object to be retrieved for including in each sub-pictures is identified by optical character recognition technology.
9. the search method of target object according to claim 1, which is characterized in that acquisition user's input needs to retrieve Target object information, comprising:
The text information of user's input is obtained, includes the information of the target object in the text information;Or
The speech retrieval instruction for obtaining user's input identifies the speech retrieval instruction to get the letter of the target object Breath.
10. the search method of target object according to claim 1, which is characterized in that further include: if it is determined that the picture In do not include the target object, then return retrieval failure prompt information.
11. the search method of target object according to any one of claim 1 to 10, which is characterized in that described to be checked Rope object includes books;
Processing is split to the picture and obtains multiple sub-pictures, comprising: based on including books in each sub-pictures The picture segmentation is the multiple sub-pictures by segmentation strategy.
12. the search method of target object according to claim 11, which is characterized in that the packet of the target object Include the identification information of target books;
Identify the information for the object to be retrieved for including in each sub-pictures, comprising: include in identification each sub-pictures Books identification information;
According to the information for the object to be retrieved for including in the information of the target object and each sub-pictures recognized, really It whether include the target object in the fixed picture, comprising: if the identification information of the target books is appointed with what is recognized The identification information of one books matches, it is determined that includes the target books in the picture.
13. a kind of retrieval device of target object characterized by comprising
Acquiring unit, for obtain include object to be retrieved picture, and obtain the target pair retrieved of needs of user's input The information of elephant;
Cutting unit obtains multiple sub-pictures for being split processing to the picture, includes in each sub-pictures therein There is at least one object to be retrieved;
Recognition unit, the information for the object to be retrieved for including in each sub-pictures for identification;
Processing unit, for be retrieved according to include in the information of the target object and each sub-pictures recognized The information of object determines in the picture whether include the target object.
14. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that the computer program is located Manage the search method that the target object as described in any one of claims 1 to 12 is realized when device executes.
15. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing When device executes, so that one or more of processors realize the target object as described in any one of claims 1 to 12 Search method.
CN201910742168.2A 2019-08-13 2019-08-13 Search method, device, computer-readable medium and the electronic equipment of target object Pending CN110490852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910742168.2A CN110490852A (en) 2019-08-13 2019-08-13 Search method, device, computer-readable medium and the electronic equipment of target object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910742168.2A CN110490852A (en) 2019-08-13 2019-08-13 Search method, device, computer-readable medium and the electronic equipment of target object

Publications (1)

Publication Number Publication Date
CN110490852A true CN110490852A (en) 2019-11-22

Family

ID=68550739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910742168.2A Pending CN110490852A (en) 2019-08-13 2019-08-13 Search method, device, computer-readable medium and the electronic equipment of target object

Country Status (1)

Country Link
CN (1) CN110490852A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111145194A (en) * 2019-12-31 2020-05-12 联想(北京)有限公司 Processing method, processing device and electronic equipment
CN112650943A (en) * 2020-12-24 2021-04-13 山东鑫泰洋智能科技有限公司 Multi-cloud server collaborative data retrieval system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101571875A (en) * 2009-05-05 2009-11-04 程治永 Realization method of image searching system based on image recognition
CN103020270A (en) * 2012-12-26 2013-04-03 中国科学院计算技术研究所 Information search system and method for electronic books
CN104391878A (en) * 2014-10-31 2015-03-04 小米科技有限责任公司 Book search method and book search device
CN108304840A (en) * 2017-08-31 2018-07-20 腾讯科技(深圳)有限公司 A kind of image processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101571875A (en) * 2009-05-05 2009-11-04 程治永 Realization method of image searching system based on image recognition
CN103020270A (en) * 2012-12-26 2013-04-03 中国科学院计算技术研究所 Information search system and method for electronic books
CN104391878A (en) * 2014-10-31 2015-03-04 小米科技有限责任公司 Book search method and book search device
CN108304840A (en) * 2017-08-31 2018-07-20 腾讯科技(深圳)有限公司 A kind of image processing method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111145194A (en) * 2019-12-31 2020-05-12 联想(北京)有限公司 Processing method, processing device and electronic equipment
CN111145194B (en) * 2019-12-31 2024-09-20 联想(北京)有限公司 Processing method, processing device and electronic equipment
CN112650943A (en) * 2020-12-24 2021-04-13 山东鑫泰洋智能科技有限公司 Multi-cloud server collaborative data retrieval system and method
CN112650943B (en) * 2020-12-24 2022-07-26 厦门地铁创新科技有限公司 Multi-cloud server collaborative data retrieval system and method

Similar Documents

Publication Publication Date Title
CN106557778B (en) General object detection method and device, data processing device and terminal equipment
CN108280477B (en) Method and apparatus for clustering images
CN108830329A (en) Image processing method and device
CN110046600A (en) Method and apparatus for human testing
CN108898185A (en) Method and apparatus for generating image recognition model
US20230376527A1 (en) Generating congruous metadata for multimedia
CN109034069A (en) Method and apparatus for generating information
CN109389640A (en) Image processing method and device
CN109643318A (en) The search and retrieval based on content of trademark image
CN109308490A (en) Method and apparatus for generating information
CN109903112A (en) Information output method and device
CN110020093A (en) Video retrieval method, edge device, video frequency searching device and storage medium
CN109118456A (en) Image processing method and device
CN109934242A (en) Image identification method and device
CN111144215A (en) Image processing method, image processing device, electronic equipment and storage medium
CN109829397A (en) A kind of video labeling method based on image clustering, system and electronic equipment
CN108960110A (en) Method and apparatus for generating information
CN109344762A (en) Image processing method and device
CN114139013B (en) Image searching method, device, electronic equipment and computer readable storage medium
CN103617192B (en) The clustering method and device of a kind of data object
CN109947989A (en) Method and apparatus for handling video
CN108509921A (en) Method and apparatus for generating information
WO2021196836A1 (en) Method and apparatus for positioning express parcel
CN109214501A (en) The method and apparatus of information for identification
CN110070076A (en) Method and apparatus for choosing trained sample

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