Summary of the invention
The technical problem to be solved in the present invention is to propose a kind of image searching method and device thereof, offers the user after the partial image region of the picture that searches can being amplified, and satisfies user's personal needs.
For addressing the above problem, the technical scheme that the present invention proposes is as follows:
A kind of image searching method comprises step:
A, the amplification region is set;
B, the picture that searches is treated as thumbnail less than this picture actual size;
C, the enlarged image zone that obtains as required intercept corresponding image-region part in described thumbnail, this step further comprises:
The size in C1, definite enlarged image zone that need obtain;
C2, respectively according to center and described definite enlarged image area size of described amplification region, calculate the coordinate of center in described thumbnail of described amplification region, and the image area size of described enlarged image zone in described thumbnail;
Coordinate figure and the image area size in the thumbnail that C3, basis calculate determine to want the truncated picture area part;
C4, described definite image-region is partly intercepted processing;
D, the truncated picture area part is placed into amplifies display process in the amplification region.
Preferably, also comprise step between described step B and the C:
Whether the size of judging described amplification region more than or equal to the actual size of the picture that searches, if, execution in step C;
Otherwise being carried out image roam, handles by the picture that searches, with the corresponding image-region part of intercepting, execution in step D then in the picture thumbnail that searches.
Preferably, the size of described amplification region is identical with the actual size of the picture that searches.
A kind of picture searching device comprises:
The amplification region is provided with the unit, is used to be provided with the amplification region;
The thumbnail processing unit, the picture that is used for searching is treated as the thumbnail less than this picture actual size;
The image interception unit, the corresponding image-region part of thumbnail intercepting that the enlarged image zone that is used for obtaining as required goes out in described thumbnail processing unit processes;
Magnification processing is used for that described image interception unit truncated picture area part is placed into the amplification region that described amplification region is provided with the unit setting and amplifies display process;
This image interception unit further comprises:
Image area size is determined subelement, is used for the size in definite enlarged image zone that need obtain;
Computation subunit, the center and the described image area size that are used for respectively being provided with according to described amplification region the amplification region of unit setting are determined the enlarged image area size that subelement is determined, calculate the coordinate of center in the thumbnail that described thumbnail processing unit processes goes out of described amplification region, and the image area size of described enlarged image zone in the thumbnail that described thumbnail processing unit processes goes out;
The intercepting image-region is determined subelement, and the image area size that is used for the coordinate figure that calculates according to described computation subunit and thumbnail determines to want the truncated picture area part;
The image interception subelement is used for determining that according to described intercepting image-region the thumbnail that the definite image-region part of subelement goes out in described thumbnail processing unit processes intercepts processing.
Preferably, described device also comprises:
Judging unit is used to judge that amplification region size that described amplification region is provided with the unit setting is whether more than or equal to the actual size of the picture that searches; With
The image roam processing unit, be used in the judged result of described judging unit for not the time, the picture that searches is carried out image roam to be handled, with the corresponding image-region part of intercepting in the corresponding picture thumbnail that goes out in described thumbnail processing unit processes, and the truncated picture area part is sent to described magnification processing amplify display process;
When being, the enlarged image zone that obtains as required intercepts corresponding image-region part in the thumbnail that described thumbnail processing unit processes goes out in the judged result of described judging unit in described image interception unit.
Preferably, that the amplification region size of unit setting is set is identical with the actual size of the picture that searches in described amplification region.
The beneficial effect that the present invention can reach is as follows:
The present invention program is by being provided with the amplification region, the picture that searches is treated as thumbnail less than this picture actual size, the enlarged image zone that obtains as required again intercepts corresponding image-region part in thumbnail, and the truncated picture area part is placed into amplifies display process in the amplification region, thereby realized the picture that searches being carried out being shown to the user after the regional processing and amplifying according to user's needs, therefore reached directly with user search to picture carry out being shown to after the regional processing and amplifying user's purpose according to user's needs, satisfied user's individual demand.
Embodiment
The present invention program is based on photographic search engine technology and multimedia picture processing and amplifying technology, obtain the picture relevant to provide a kind of user of allowing to pass through the retrieving images key word with this key word, and by the picture concerned that obtains is carried out processing and amplifying so that the amplification picture effect of expectation is arrived in user capture.
The present invention program's main design philosophy is design a kind of picture search magnifier (Image SearchEngine Magnifier), and this picture search magnifier can be carried out following processing:
At first select the key word relevant to carry out picture searching with picture;
The photographic search engine server is exported the image index that is stored in the picture searching database according to the picture key word;
And amplify demonstration by image processing and amplifying technology.
Wherein the picture search magnifier carries out the transmission of network packet by the searching image Processing Interface under unified user inquiring interface and information feedback form, provides the purpose of information to be reached for the user.
Please refer to Fig. 1, this figure be the present invention program based on the total system and the course of work synoptic diagram thereof of picture search magnifier, wherein the picture search magnifier is at picture searching and be shown to the role who plays a middle-agent in user's the processing procedure, it is used to accept user's query requests, and after the corresponding picture that sends query requests to the photographic search engine server and obtain to inquire, picture is calculated processing and amplifying, then the inquiry picture result after the processing and amplifying is fed back to the user.Wherein the picture search magnifier mainly comprises image search server, link text is analyzed, the Flame Image Process interface, several work ingredients such as result are amplified in picture processing and amplifying and output, wherein the user is submitted to image search server with searching request, image search server then is labeled as a series of pictures key word according to its searching request content with it by link text analysis and photo annotation etc., and index set up in corresponding key word, to carry out photographic search engine by the access images Processing Interface, in the picture searching process, at first visit result database, check whether identical retrieval is arranged in the recent period, if have then directly return the result of preservation, finish picture searching; If there is not identical retrieval in the result database, then analyze retrieval type and transform into the retrieval type form corresponding with want search engine, carry out photographic search engine by the Flame Image Process interface then and handle.
The Flame Image Process interface is by parallel mode while query search engine result, and the resulting result images of search engine carried out processing and amplifying, when image amplifies, pixel also will increase accordingly, the enlarged image result processing of extracting and sort is treated in zone to be amplified in the image in less indication range in-draw to the bigger indication range, generated net result and be shown to the user to return.
Based on above-mentioned, image searching method that the present invention proposes and device thereof promptly are on the result of existing picture searching, directly the picture that searches is carried out regional processing and amplifying according to user's demand, and the picture after the processing and amplifying is shown to the user, thereby avoided that the user need download to this locality with the picture that searches in the traditional approach, used relevant image processing software to carry out processing and amplifying and just can obtain the operation inconvenience that the amplification picture effect of own needs is brought then downloading to local picture.
Please refer to Fig. 2, this figure is the main realization principle flow chart of image searching method of the present invention, and its main implementation procedure is as follows:
Step S10 sets in advance an amplification region, shows that in this zone wherein the size of the amplification region of She Zhiing can be identical with the actual size of the picture that searches after the subregion processing and amplifying with the picture that is used for searching;
Step S20 is treated as thumbnail less than this picture actual size with the picture (the picture searching process is identical with prior art, no longer too much gives unnecessary details) that searches here;
Step S30, the enlarged image zone that obtains according to user's needs intercepts corresponding image-region part in the above-mentioned thumbnail of handling out; Wherein concrete image interception processing procedure is as follows:
At first determine the size in the enlarged image zone that need obtain;
Then respectively according to center and above-mentioned definite enlarged image area size of the above-mentioned amplification region that sets in advance, calculate the coordinate of center in the above-mentioned thumbnail of handling out of described amplification region, and the image area size of enlarged image zone in thumbnail;
Coordinate figure that obtains according to aforementioned calculation and the image area size in the thumbnail are determined the truncated picture area part of wanting in the above-mentioned thumbnail of handling out again;
According to above-mentioned definite image-region part corresponding thumbnail is intercepted processing at last.
Step S40 is placed into the truncated picture area part in the above-mentioned amplification region that sets in advance at last and amplifies display process.
In addition, when the picture size that searches exceeds the amplification region that sets in advance big or small, just need carry out image roam to the picture that searches has handled, as shown in Figure 3, this figure increases the embodiment process flow diagram that the picture that searches is carried out the image roam processing procedure in the inventive method, its main implementation process is as follows:
Step S100 sets in advance an amplification region;
Step S200 is treated as thumbnail less than this picture actual size with the picture (the picture searching process is identical with prior art, no longer too much gives unnecessary details) that searches here;
Step S300, whether the size of judging the above-mentioned amplification region that sets in advance more than or equal to the actual size of the picture that searches, if, execution in step S400; Otherwise execution in step S500;
Step S400, the enlarged image zone that obtains according to user's needs intercepts corresponding image-region part, execution in step S600 then in the above-mentioned thumbnail of handling out;
Step S500, the picture that searches is carried out the image roam processing, and (wherein the image roam technology is the existing standard technology, followingly will sketch roaming and handle specific implementation process in the present invention program's case), in the above-mentioned picture thumbnail that searches, to be truncated to corresponding image-region part, execution in step S600 then;
Step S600 is placed into the truncated picture area part in the above-mentioned amplification region that sets in advance at last and amplifies display process.
Wherein when the actual size of the picture that searches surpasses amplification region big or small, just need carry out the image roam processing to the picture that searches, so that see whole images.When mouse amplifies when showing at original image, begin roaming, write down the click coordinate position of mouse earlier, detect mouse moving then, calculate image " central point " (screen coordinate need be converted to coordinates of original image coordinates) according to the displacement meter of mouse and last time, take out the part that will show according to amplification principle in original image again, amplification is shown to the amplification region.
Please refer to Fig. 4, this figure is one to be adopted after the inventive method principle when picture searched for, the picture thumbnail show state synoptic diagram that obtains, and the display effect of its picture thumbnail that searches on webpage is shown in this figure state.
Please refer to Fig. 5, this figure is one to be adopted after the inventive method principle when the picture that searches carried out processing and amplifying, the display effect synoptic diagram of the regional enlarged drawing of its thumbnail and correspondence, as shown in the drawing, the left side is the thumbnail synoptic diagram of the picture that searches, and the right side is the subregional amplification effect synoptic diagram in thumbnail middle part, left side.
Correspondingly, the method for the corresponding above-mentioned proposition of the present invention is also corresponding discloses a kind of picture searching device; Please refer to Fig. 6, this figure is the main composition structural representation of picture searching device of the present invention, picture searching device of the present invention comprises that mainly the amplification region is provided with unit 10, thumbnail processing unit 20, image interception unit 30 and magnification processing 40, and wherein the main effect of each ingredient is as follows:
The amplification region is provided with unit 10, is mainly used in the amplification region is set, and wherein that the actual size of the picture that the size of the amplification region that unit 10 is provided with can obtain with search is set is identical in the amplification region;
Thumbnail processing unit 20 is mainly used in the picture that will search and is treated as thumbnail less than this picture actual size;
Image interception unit 30 is mainly used in the enlarged image zone that obtains according to user's needs and intercepts corresponding image-region part in the thumbnail that thumbnail processing unit 20 is handled out;
Magnification processing 40 is mainly used in the image-region that image interception unit 30 is truncated to and partly is placed into the amplification region and is provided with in the amplification region that unit 10 is provided with and amplifies display process.
In addition, when the picture size that searches exceeds the amplification region amplification region that unit 10 sets in advance big or small is set, just need carry out image roam to the picture that searches has handled, as shown in Figure 7, this figure increases in apparatus of the present invention the picture that searches is carried out composition structural representation behind the image roam processing unit that image roam handles, it is on the composition architecture basics of above-mentioned device shown in Figure 6, also and then comprise judging unit 50 and image roam processing unit 60, wherein the main effect of these two component units is as follows:
Judging unit 50 is mainly used in and judges that the amplification region is provided with amplification region size that unit 10 sets in advance whether more than or equal to the actual size of the picture that searches;
Image roam processing unit 60, be mainly used in the judged result of judging unit 50 for not the time, the picture that searches is carried out image roam to be handled, with the corresponding image-region part of intercepting in the corresponding picture thumbnail that thumbnail processing unit 20 is handled out, and the truncated picture area part is sent to magnification processing 40 carry out follow-up amplification display process;
Wherein image interception unit 30 in the judged result of judging unit 50 when being, the enlarged image zone that obtains according to user's needs intercepts corresponding image-region part in the thumbnail that thumbnail processing unit 20 is handled out, and then the truncated picture area part is sent to magnification processing 40 carries out follow-up amplification display process.
Please refer to Fig. 8, this figure is the concrete composition structured flowchart of the image interception unit in apparatus of the present invention, its image interception unit comprises that mainly image area size determines that subelement 301, computation subunit 302, intercepting image-region determine subelement 303 and image interception subelement 304, and wherein the main effect of each ingredient is as follows:
Image area size is determined subelement 301, is mainly used in the size of determining the enlarged image zone that user's needs obtain according to user's needs;
Computation subunit 302, be mainly used in respectively the center and the image area size that the amplification region that unit 10 is provided with are set according to the amplification region and determine the enlarged image area size that subelement 301 is determined, calculate the coordinate of center in the thumbnail that thumbnail processing unit 20 is handled out of amplification region, and the image area size of enlarged image zone in the thumbnail that thumbnail processing unit 20 is handled out;
The intercepting image-region is determined subelement 303, is mainly used in the coordinate figure and the image area size in the thumbnail that calculate according to computation subunit 302 and determines to want the truncated picture area part;
Image interception subelement 304 is mainly used in according to the intercepting image-region and determines that the image-region part that subelement 303 is determined intercepts processing in the thumbnail that thumbnail processing unit 20 is handled out.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.