Present patent application is the divisional application of 201210291440.8 patent application of application number, and the applying date is in August, 2012
15 days, the method and apparatus on the entitled boundary that screenshot box is adjacent to area-of-interest in screenshot.
Summary of the invention
The main purpose of the present invention is to provide it is a kind of in screenshot by screenshot box automatic paste tightening area-of-interest
The method and apparatus on boundary, to solve of the existing technology to be difficult to fast and accurately the area-of-interests such as specific button
Ground carries out the problem of screenshot, wherein this method may include: to position a screenshot box on the screen;It will be associated with screenshot box
Specific region in each point rgb value be compared with the rgb value of its multiple neighbor point;If it is determined that it is continuously distributed simultaneously
It is big with the comparison result of certain amount of neighbor point in its multiple neighbor point to form each of multiple points of frame-type point
In predetermined threshold, it is determined that the frame-type is the boundary of area-of-interest;And the screenshot box is automatically adjusted to the sense
The boundary in interest region.
According to an embodiment of the invention, this method can also include: based on adjust automatically after screenshot box execute screenshot.
According to an embodiment of the invention, this method can also include: to call magnifying glass to the screenshot after adjust automatically
Frame zooms in and out;And screenshot is executed based on the screenshot box after scaling.
According to an embodiment of the invention, if this method can also include: without continuously distributed and form the multiple of frame-type
The comparison result of point and neighbor point is greater than predetermined threshold, then executes screenshot based on the screenshot box.
According to an embodiment of the invention, the screenshot box includes the area-of-interest or the area-of-interest packet
Containing the screenshot box.
According to an embodiment of the invention, the specific region associated with screenshot box is the frame phase with the screenshot box
Region is formed by away from intended pixel number.
According to an embodiment of the invention, the specific region associated with screenshot box is the region in the screenshot box.
According to an embodiment of the invention, the predetermined threshold is 50, the intended pixel number is 20, and the specific quantity is
3。
According to an embodiment of the invention, the neighbor point be the left side of the point, upper left, upper, upper right, the right side, bottom right, under, it is left
Under point.
In another aspect of the invention, provide it is a kind of in screenshot by screenshot box automatic paste tightening area-of-interest
The equipment on boundary characterized by comprising screenshot box locating module is configured to position a screenshot box on the screen,
In, the screenshot box includes the area-of-interest or the area-of-interest includes the screenshot box;Comparison module, quilt
It is configured to carry out the rgb value of the rgb value of each point in specific region associated with screenshot box and its multiple neighbor point
Compare;Determining module is configured to if it is determined that each of continuously distributed and multiple points for forming frame-type point is multiple with it
The comparison result of certain amount of neighbor point is greater than predetermined threshold in neighbor point, it is determined that the frame-type is area-of-interest
Boundary;And adjustment module, it is configured to for the screenshot box being automatically adjusted to the boundary of the area-of-interest.
According to an embodiment of the invention, the equipment can also include: screen capture module, it is configured to based on after adjust automatically
Screenshot box executes screenshot.
According to an embodiment of the invention, the screen capture module is configured to call magnifying glass to cutting described in after adjust automatically
Picture frame zooms in and out;And screenshot is executed based on the screenshot box after scaling.
According to an embodiment of the invention, the screen capture module is configured to: if without continuously distributed and form frame-type
The comparison result of multiple points and neighbor point is greater than predetermined threshold, then executes screenshot based on the screenshot box.
Compared with prior art, according to the technique and scheme of the present invention, automatic lookup region of interest can be easily realized
The boundary in domain, and the boundary of automatic paste tightening area-of-interest, as camera auto-focusing, faster efficient completion task.
Specific embodiment
Main thought of the invention is, when carrying out screenshot on the screen, intercepts specific object if necessary and (such as presses
Button, LOGO, picture etc.), judge automatically the edge line of special object.Such as Figure 1A, after drawing screenshot box to object of interest, to cutting
The point of certain pixel number distance is judged inside and outside the frame of picture frame, and screenshot box is attached to the boundary of object of interest automatically
On, to obtain more accurate image, such as Figure 1B.When manually adjusting the frame of screenshot box again, then the non-institute of this screenshot box is judged
It needs, then recalls magnifying glass or other modes carry out manual alignment.
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with drawings and the specific embodiments, to this
Invention is described in further detail.
According to an embodiment of the invention, providing a kind of for screenshot box to be adjacent to the boundary of area-of-interest in screenshot
Method and apparatus.
It is the embodiment of the present invention for screenshot box to be adjacent to the boundary of area-of-interest in screenshot with reference to Fig. 2, Fig. 2
The flow chart of method.
According to an embodiment of the invention, positioning a screenshot box on the screen in step 201.Position the mistake of the screenshot box
Journey is similar to the prior art.For example, if when applying the present invention in computer screen screenshot, such as input unit mouse is left
When key pressing, start (x, y) axial coordinate where current mouse is recorded.When mouse drag, sat with current mouse
It marks move (x, y) and start (x, y) and forms rectangular area.When left mouse button bounces, where record current mouse
End (x, y) coordinate.The rectangular area that so end (x, y) and start (x, y) are formed, the screenshot box as positioned.It is described
Input unit is also possible to keyboard, trace ball etc..
In step 202, by the rgb value and its multiple neighbor point of each point in specific region associated with screenshot box
Rgb value be compared.Preferably, specific region, which can be, is formed by area at a distance of intended pixel number with the frame of the screenshot box
Domain.For example, circulation is read with the frame of the screenshot box at a distance of the region of 20 pixels when mouse up.It specific region can
To be with screenshot box frame at a distance of " returning " the font region that two frames inside and outside 20 pixels are formed, thus all in the region
The rgb value of point can be read.Alternatively, the numerical value of the intended pixel number is configurable, such as can choose other
Numerical value, such as 25,30.For example, when being recycled to some point (x, y), by its rgb value respectively with a left side (x-1, y), upper left
(x-1, y-1), upper (x, y-1), upper right (x+1, y-1), right (x+1, y), bottom right (x+1, y+1), under (x, y+1), lower-left (x-1,
Y+1 the rgb value of 8 neighbor points) is compared.
Alternatively, specific region can also be the region in the screenshot box.
Preferably, area-of-interest may include the screenshot box;Alternatively or alternatively, screenshot box may include sense
Interest region.
In step 203, determine in each of multiple points that are continuously distributed and forming frame-type point and its multiple neighbor point
Whether the comparison result of certain amount of neighbor point is greater than predetermined threshold.Preferably, the multiple point is continuous with horizontal line or vertical line
Distribution, the frame-type can be rectangle, square etc..In step 204, if comparison result is greater than predetermined threshold, it is determined that should
Frame-type is the boundary of area-of-interest.Specifically, if average value (the similar PS evil spirit of the comparison difference of some of rgb values
The tolerance of stick) it is more than predetermined threshold, then the point is recorded as candidate boundary point.Preferably, if the point and 3 neighbor points
The average value of the comparison difference of rgb value is more than 50, then the point is detected as interim candidate boundary point, and otherwise, which is detected as
Non-candidate boundary point.If being continuously detected interim candidate boundary point, and the interim candidate boundary point forms frame-type, then will
The frame-type is determined as the boundary of area-of-interest.If instantaneous candidate boundary point is not continuously distributed formation frame-type, this is faced
When candidate boundary point be determined as non-candidate boundary point, and determine the boundary that area-of-interest is not present.Alternatively, the average value
It can be configured according to the demand of system, such as choose other numerical value, such as 45,60,80.
More specifically, several feelings when the boundary of determining area-of-interest being more fully described with reference to Figure 1A and Figure 1B
Shape.In the first situation, interested region will be determined boundary.For example, in the point of detection, the point of background colour
Rgb value is, for example, (242,251,255), and the rgb value of the point of button red border is, for example, (226,82,42), then button
Boundary line on point and some points (i.e. the point of background colour) in all the points near it rgb value difference be (18,169,
213), average value 133.And the point on boundary line is continuously distributed and forms frame-type, and therefore, these points are formed
Frame-type be determined as the boundary of area-of-interest.
In second case, for example, in the point of detection, the rgb value of the point of button red border be, for example, (226,
82,42), the rgb value of the point of the internal border of button is, for example, (240,84,35), and the two difference is (14,2,7), average value
It is 7.6.The average value is far smaller than predetermined threshold 50, and therefore, which is not confirmed as the boundary of area-of-interest.
In the third situation, various words or character or non-interested irregular pattern will not be confirmed as interested
The boundary in region.For example, the rgb value of the point of background colour is, for example, (242,251,255), and the side of The Scarlet Letter in the point of detection
The rgb value of the point on boundary is, for example, (240,84,35), and difference is greater than 50.But since these points cannot be continuously distributed and is formed
Therefore these points are formed by the boundary that line is not determined to area-of-interest by frame-type.
In step 205, which is automatically adjusted to the boundary of the area-of-interest.Specifically, will be above-mentioned
After the frame-type of formation is determined as the boundary of area-of-interest, screenshot box is just automatically adjusted to the region of interest by method of the invention
The boundary in domain.
In step 206, screenshot is executed based on the screenshot box after adjust automatically.It that is to say the boundary for being close to the area-of-interest
Screenshot is realized, to realize automatic and accurate screenshot.
Alternatively, magnifying glass is called to zoom in and out the screenshot box after adjust automatically;And based on the screenshot after scaling
Frame executes screenshot.In other words, if user is not intended to the boundary for being automatically adjusted to area-of-interest based on screenshot box and carried out
Screenshot, then user can adjust screenshot box again and carry out screenshot using magnifying glass method.
In step 207, if be greater than in advance without the comparison result of multiple points and neighbor point continuously distributed and that form frame-type
Determine threshold value, then screenshot is executed based on the screenshot box.For example, in screenshot box and specific area-of-interest is not present, at this moment
Screenshot is carried out based on current screenshot box.
Fig. 3 is according to an embodiment of the present invention is used for the boundary of screenshot box automatic paste tightening area-of-interest in screenshot
The block diagram of equipment 300.
According to an embodiment of the invention, the equipment 300 may include screenshot box locating module 301, comparison module 302, really
Cover half block 303 and adjustment module 304.
Screenshot box locating module 301 may be configured to position a screenshot box on the screen.For example, as shown in Figure 1A that
Sample positions the screenshot box comprising area-of-interest " modification guarantor's information " button.
Comparison module 302 may be configured to the rgb value of each point in specific region associated with screenshot box
It is compared with the rgb value of its multiple neighbor point.
Determining module 303 may be configured to: if it is determined that each of multiple points that are continuously distributed and forming frame-type
The comparison result of point and certain amount of neighbor point in its multiple neighbor point is greater than predetermined threshold, it is determined that the frame-type is interested
The boundary in region.
Adjustment module 304 may be configured to the boundary that screenshot box is automatically adjusted to the area-of-interest.
Embodiment according to the present invention, equipment 300 of the invention can also include screen capture module 305, screen capture module 305
Screenshot box after being configured to adjust automatically executes screenshot.
The specific implementation of modules included by equipment 300 of the invention is specific with the step in method of the invention
Implementation be it is corresponding, in order not to the fuzzy present invention, omit no longer the detail of modules is described herein.
The process and apparatus of the present invention can be applied in any equipment that can carry out screen shot operation.It is described can be with
The equipment for carrying out screen shot operation can include but is not limited to: desktop computer, mobile terminal device, laptop computer, plate
Computer, personal digital assistant etc..
The present invention can also realize that the software can be in the computer system wherein executed such as Fig. 4 institute by software
Show.
Fig. 4 shows the block diagram for being suitable for the computer system for being used to realize embodiment of the present invention.As shown in figure 4, calculating
Machine system may include: CPU (central processing unit) 401, RAM (random access memory) 402, ROM (read-only memory)
403, system bus 404, hard disk controller 405, keyboard controller 406, serial interface controller 407, parallel interface controller
408, display controller 409, hard disk 410, keyboard 411, serial peripheral equipment 412, concurrent peripheral equipment 413 and display 414.
In these components, what is be connected with system bus 404 has CPU 401, RAM 402, ROM 403, hard disk controller 405, keyboard
Controller 406, serialization controller 407, parallel controller 408 and display controller 409.Hard disk 410 and 405 phase of hard disk controller
Even, keyboard 411 is connected with keyboard controller 406, and serial peripheral equipment 412 is connected with serial interface controller 407, concurrent peripheral
Equipment 413 is connected with parallel interface controller 408 and display 413 is connected with display controller 409.
It should be appreciated that structural block diagram described in Fig. 4 is shown for illustrative purposes only, rather than to model of the present invention
The limitation enclosed.In some cases, it can increase or reduce certain equipment as the case may be.
Particularly, in addition to hardware embodiment, embodiments of the present invention can pass through the shape of computer program product
Formula is realized.For example, can be realized by computer program product with reference to Fig. 2 method described.The computer program product can
To be stored in RAM 404 for example shown in Fig. 4, ROM 404, hard disk 410 and/or any storage medium appropriate, Huo Zhetong
Network is crossed to download in computer system from position appropriate.Computer program product may include computer code part,
Including the program instruction that can be executed as processing equipment appropriate (for example, CPU 401 shown in Fig. 4).Described program instruct to
It less may include the instruction for realizing method as described above.
It should be noted that embodiments of the present invention can be realized by the combination of hardware, software or software and hardware.
Hardware components can use special logic to realize;Software section can store in memory, by instruction execution system appropriate
System, such as microprocessor or special designs hardware execute.It will be understood by those skilled in the art that above-mentioned equipment
Computer executable instructions can be used and/or be included in the processor control code with method and realize, such as in such as magnetic
Disk, the mounting medium of CD or DVD-ROM, such as read-only memory (firmware) programmable memory or such as optics or electricity
Such code is provided in the data medium of subsignal carrier.Equipment and its module of the invention can be by such as ultra-large
The semiconductor or such as field programmable gate array of integrated circuit or gate array, logic chip, transistor etc. can be compiled
The hardware circuit realization of the programmable hardware device of journey logical device etc., can also be soft with being executed by various types of processors
Part is realized, can also be realized by the combination such as firmware of above-mentioned hardware circuit and software.
It should be noted that although being referred to several modules or submodule of equipment in the above detailed description, this stroke
Divide only not enforceable.In fact, embodiment according to the present invention, the feature of two or more above-described modules
It can be embodied in a module with function.Conversely, the feature and function of an above-described module can further be drawn
It is divided by multiple modules and embodies.
In addition, although describing the operation of the method for the present invention in the accompanying drawings with particular order, this do not require that or
Hint must execute these operations in this particular order, or have to carry out shown in whole operation be just able to achieve it is desired
As a result.On the contrary, the step of describing in flow chart can change and execute sequence.Additionally or alternatively, it is convenient to omit certain steps,
Multiple steps are merged into a step to execute, and/or a step is decomposed into execution of multiple steps.
The above description is only an embodiment of the present invention, is not intended to restrict the invention, for those skilled in the art
For member, the invention may be variously modified and varied.All within the spirits and principles of the present invention, it is made it is any modification,
Equivalent replacement, improvement etc., should be included within scope of the presently claimed invention.