Selection refinement tool

Selection refinement tool techniques are described in which a selection within an image is modified using a tool that automatically resizes according to the shape of selection boundaries. In one or more implementations, selection boundaries are displayed in an image that is exposed in a user interface. The selection boundaries may represent an automatic selection via an editing tool, or a selection that is based on manual manipulation of an editing tool by a user. The selection refinement tool is operable to modify the selection boundaries by positioning of a cursor of the refinement tool proximate to the selection boundaries. In response to positioning of the cursor relative to the selection boundaries, the cursor is dynamically resized in dependence upon a positional relationship between the cursor and the selection boundaries, such that boundaries of the cursor are kept from intersecting with the selection boundaries.

BACKGROUND

Consumer image editing is on the rise due at least in part to wide availability of the mobile phones, tablets, and other portable devices that include cameras and are powerful enough to support image editing software. A variety of different editing operations may be applied to process an image. In connection with image editing operations, a user may make selections of objects and/or other portions of an image to which the editing operations are applied. Editing software may provide tools for refinement of selections within images. For example, a brush tool can be used to make selections, modify selections, perform operations, and so forth. Generally, adjustment of the size of the brush tool and a cursor representing the brush tool is a manual process that can be quite time consuming. The manual process may also be difficult to use on mobile phones, tablets, and other mobile platforms. Accordingly, brush and cursor resizing may be tedious, make it more difficult to edit images, and lead to user frustration.

SUMMARY

Selection refinement tool techniques are described in which a selection of portions within an image exposed for editing in an image editing environment are modified using a tool that automatically resizes according to the shape of selection boundaries for the selection at different locations. In one or more implementations, selection boundaries indicative of a selection of one or more portions of an image exposed for editing in a user interface are displayed. The selection may represent an automatic selection via an editing tool, or a selection that is based on manual manipulation of an editing tool by a user. An option to launch or interact with a selection refinement tool is made available via the user interface. The selection refinement tool is operable to modify the selection boundaries by positioning of a cursor of the refinement tool proximate to the selection boundaries. In response to positioning of the cursor relative to the selection boundaries, the cursor is automatically resized in dependence upon a positional relationship between the cursor and the selection boundaries, such that boundaries of the cursor are kept from intersecting with the selection boundaries.

DETAILED DESCRIPTION

Overview

Generally, adjustment of the size a cursor for an image editing tool (e.g. a brush or selection tool) is a manual process that can be quite time consuming. The manual process may also be difficult to use on mobile phones, tablets, and other mobile platforms. Accordingly, cursor resizing may be tedious, make it more difficult to edit images, and lead to user frustration.

Selection refinement tool techniques are described in which a selection of portions within an image exposed for editing in an image editing environment can be modified using a tool that automatically resizes according to the shape of selection boundaries for the selection at different location. The selection refinement tool may be employed for various image editing operations and tools typically provided by image editing application, one example of which is Adobe Photoshop™.

In one or more implementations, selection boundaries indicative of a selection of one or more portions of an image exposed for editing in a user interface are displayed. The selection may represent an automatic selection via an editing tool, or a selection that is based on manual manipulation of an editing tool by a user. An option to launch or interact with a selection refinement tool is made available via the user interface. The selection refinement tool is operable to modify the selection boundaries by positioning of a cursor of the refinement tool proximate to the selection boundaries. In response to positioning of the cursor relative to the selection boundaries, the cursor is automatically resized in dependence upon a positional relationship between the cursor and the selection boundaries, such that boundaries of the cursor are kept from intersecting with the selection boundaries.

In one approach, the positional relationship is derived based on a level set matrix that is computed using a level set mechanism. The level set matrix (as shown an discussed in relation toFIG. 7) enables a determination of the positional relationship as being intersecting, or non-intersecting (e.g., inside or outside), with respect to the selection boundaries. When the cursor intersects the selection boundaries, the cursor is reduced in size to an optimal size that corresponds to the shape of the selection boundaries at the current location and that is non-intersecting. When the cursor does not intersect the selection boundaries, the cursor is expanded until the cursor abuts the selection boundaries (e.g., within a proximity tolerance value) or reaches a defined maximum size.

Selection refinement tool techniques as described herein enhance image editing by making selection refinement faster, more convenient, and more accurate than manual resizing. Rather than having to perform multiple manual resizes to modify a large and odd-shape selection, a user can simply set the system to automatically resize the cursor in response to positioning of the cursor in different locations relative to the selection. In effect, the cursor appears to dynamically resize and “snap-to” selection boundaries as the cursor is manipulated around the image. The user does not have to interrupt work for resizing and the resizing can precisely optimize the cursor size based on the shape and contours of the selection at different locations.

In the following discussion, an example environment is first described that may employ the techniques described herein. Example details and procedures are then described which may be performed in the example environment as well as in other environments. Consequently, example details and procedures are not limited to the example environment and the example environment is not limited to example details and procedures described herein.

Example Environment

FIG. 1is an illustration of an environment100in an example implementation that is operable to employ techniques described herein. The illustrated environment100includes a computing device102and an image capture device104, which may be configured in a variety of ways. Additionally, the computing device102may be communicatively coupled to one or more service providers106over a network108. Generally speaking, a service provider106is configured to make various resources (e.g., content, services, web applications, etc.) available over the network108, such as the Internet, to provide a “cloud-based” computing environment and web-based functionality to clients.

The computing device102may be configured as a desktop computer, a laptop computer, a mobile device (e.g., assuming a handheld configuration such as a tablet or mobile phone), and so forth. Thus, the computing device102may range from full resource devices with substantial memory and processor resources (e.g., personal computers, game consoles) to a low-resource device with limited memory and processing resources (e.g., mobile devices). Additionally, although a single computing device102is shown, the computing device102may be representative of a plurality of different devices to perform operations. Additional details and examples regarding various configurations of computing devices, systems, and components suitable to implement aspects of the techniques described herein are discussed in relation toFIG. 8below.

The image capture device104represented inFIG. 1may also be configured in a variety of ways. Illustrated examples of such configurations include a video camera, scanner, copier, camera, mobile device (e.g., smart phone), and so forth. Although the image capture device104is illustrated separately from the computing device102, the image capture device104may be configured as part of the computing device102, e.g., for a tablet configuration, a laptop, a mobile phone or other implementation of a computing device having a built in image capture device102. The image capture device104is illustrated as including image sensors110that are configured to form images111. In general, the image capture device102may capture and provide images111, via the image sensors110that may be stored on and further processed by the computing device102in various ways. Naturally, images111may be obtained in other ways also such as by downloading images from a website, accessing images from some form of computer readable media, and so forth.

The images111may be obtained by an image processing module112. As before, although the image processing module112is illustrated as being implemented on a separate device it should be readily apparent that other implementations are also contemplated in which the image sensors110and image processing module112are implemented on the same device. Further, although illustrated as being provided by a computing device102in a desktop configuration, a variety of other configurations are also contemplated, such as remotely over a network108as a service provided by a service provider, a web application, or other network accessible functionality.

Regardless of where implemented, the image processing module112is representative of functionality operable to manage images111in various ways. Functionality provided by the image processing module112to manage images may include but is not limited to functionality to organize, access, browse and view images, as well as to perform various kinds of image processing operations upon selected images. By way of example and not limitation, the image processing module112may include or otherwise make use of a selection module114.

The selection module114is representative of functionality to perform selections within images in connection with image editing operations. The selection may involve designating one or more selected portions or objects within the image as “selected”. Image editing operations may then be applied to the “selected” portions and not to other, “non-selected” portions. Selections include automatic selections that are made by operation of an editing tool as well as manual selections made through user manipulation of a tool such as a lasso, cropping, or brush selection tool. When a selection is made via the selection module114, corresponding selection boundaries are rendered within a view of the image being edited.

In accordance with selection refinement tool techniques described herein, the image processing module112further includes a refinement tool115that is operable in connection with the selection module114. In the illustrated example, the refinement tool115is depicted as a tool implemented by the selection module114. Alternatively, the refinement tool115may be a separate component of the image processing module112, or even a standalone module that may be invoked by various editing tools to facilitate selection refinement in the manner described herein. For instance, the refinement tool115may be employed to modify selection boundaries for any image editing tool or process that utilizes a resizable cursor, brush, or instrumentality.

By way of example, the refinement tool115may be configured to modify the selection boundaries by positioning of a cursor of the refinement tool proximate to the selection boundaries. Generally speaking, moving the cursor at boundary edges from outside inward causes a reduction of the selection boundaries. Moving the cursor from inside the boundary edges outward causes an expansion of the selection boundaries. The portion of the selection boundary that is reduced or expanded depends upon the size of the cursor, such as the radius of a circular tool or the width of a square tool. Since the selection boundary and image portions often have non-regular shapes, resizing of the cursor at multiple different points in the image is likely to be needed in order to precisely refine the selection.

Accordingly, the refinement tool115can be configured to provide an option for automatic cursor resizing as described above and below. For example, a toggle control implemented via the refinement tool may be exposed to enable a user to selectively turn automatic resizing of the cursor on or off. When automatic resizing is turned-off, the refinement tool115can support manual resizing techniques. When automatic resizing is activated, the cursor is automatically resized in response to movement of the cursor relative to the selection boundaries.

Broadly speaking, the resizing occurs in dependence upon a positional relationship between the cursor and the selection boundaries. The positional relationship can be determined in various ways, an example of which is using a level set matrix as discussed later in this document. Additionally, the size for the cursor is selected to correspond to the shape and contours of the selection boundaries at the current position. Additionally, the refinement tool115ensures that the cursor after resizing does not intersect with the selection boundaries. In this way, the cursor is resized dynamically as the cursor is moved around the image and may appear to snap to the edges of the boundaries. Details regarding these and other aspects of selection refinement techniques and operation of a refinement tool115are discussed in relation to the following figures.

As further shown inFIG. 1, the service provider106may be configured to make various resources116available over the network114to clients. In some scenarios, users may sign up for accounts that are employed to access corresponding resources from a provider. The provider may authenticate credentials of a user (e.g., username and password) before granting access to an account and corresponding resources116. Other resources116may be made freely available, (e.g., without authentication or account-based access). The resources116can include any suitable combination of services and content typically made available over a network by one or more providers. Some examples of services include, but are not limited to, a photo editing service, a web development and management service, a collaboration service, a social networking service, a messaging service, an advertisement service, and so forth. Content may include various combinations of text, video, ads, audio, multi-media streams, animations, images, web documents, web pages, applications, device applications, and the like.

For example, the service provider106inFIG. 1is depicted as including an image processing service118. The image processing service118represents network accessible functionality that may be made accessible to clients remotely over a network108to implement aspects of the techniques described herein. For example, functionality to manage and process images described herein in relation to image processing module112and selection module114may alternatively be implemented via the image processing service118, or in combination with the image processing service118. Thus, the image processing service118may be configured to provide cloud-based access to a refinement tool, as well as other tools and functionality described above and below.

Selection Refinement Tool Details

FIG. 2depicts a system200in an example implementation in which operation of the selection module114and refinement tool115ofFIG. 1is represented in connection with one or more image editing operations. The system200is shown using different illustrative stages of making and refining selections within an image111in connection with an image editing operation. The image may be obtained, directly from one or more image sensors110, from storage upon some form of computer-readable media, by downloading from a web site, and so on.

As shown inFIG. 2, the image111may be exposed for editing within a user interface associated with the image processing module112as represented by stage202. The user interface may provide functionality operable to perform various image editing operations upon the image. In an implementation, the user interface may be configured to support touch interaction in addition to or in lieu of input via a mouse, keyboard or other input device. Functionality for various image editing operations may be provided using one or more different types of user interface instrumentalities such as selectable icons, menu items, lists, key combinations, tool bars, interactive dialogs, or pop-up elements, to name some examples. The user interface may be further configured to support gestures and input patterns that may be mapped to corresponding actions and functionality, such as gestures that are associated with different selection modes discussed herein. Thus, a user may interact to view, edit, navigate, select, and otherwise manipulate an image or a library of images using functionality accessible via the user interface.

In the context of techniques described herein, the user interface may be configured to support a refinement tool115. For example, interaction by a user may be employed to make selections in the image111. In one approach, a brush selection tool can be implemented that enables a user to swipe back and forth (using touch or an input device) across portions of the image to cause addition of the portions into a selected group. Other selection techniques are also contemplated, such as using a lasso tool, selection box, enclosing portions within a circle, or automatic selections by system tools. The selection result in positioning of selection boundaries204within the image as represented in stage202. For the purpose of illustration, the selection boundaries204are illustrated as being a rough and unrefined selection of the dog in the example image.

As represented in stage206, the refinement tool115can be invoked to refine the selections boundaries204. In particular, activation of the refinement tool115exposes a cursor208for the tool that is operable to refine the selection boundaries to produce a more precise selection. The cursor208may be manipulated around the image using touch input210(as illustrated), or another suitable input mechanism. The cursor can be configured in various way. By way of example and not limitation, the example cursor has a generally circular shape. In addition, the cursor is depicted as having an inner circle that represents the active component of the tool and an outer circle that represents a defined maximum size for the cursor, further details of which are discussed in relation to the following figures. Other configurations of a cursor are also contemplated, such as using a single circle, a square, a triangle, or a brush shape to name a few examples.

As noted, a user can manipulate the cursor around the image to move the selection boundaries in and out at different locations to refine the selection. As represented in stage212, operation of the refinement tool115results in a refined selection214, which in this example corresponds to the outline of the dog in the example image. In connection with operation of the refinement tool115, the cursor208can be automatically resized to adapt to the selection boundaries in the manner described herein, thereby making the refinement process faster, more convenient, and more precise. Further details regarding refinement and resizing using a refinement tool115are discussed in relation to the examples ofFIGS. 3 to 7discussed below.

FIG. 3depicts generally at300details of selection boundary refinement using a cursor in accordance with one or more implementations. In particular, view “A” represents a growing of a selection boundary302based on manipulation of a cursor304from a position inside of the boundary outwards as indicated by arrow306. Once again in this example, the cursor304is illustrated as having a circular shape with inner and outer portions. The inner circle is a defined part of the cursor304that correspond to the active component of the tool. Editing operations are driven by position of the inner circle relative to image elements and/or selections boundaries. Accordingly, resizing as described herein generally applies to the inner circle (e.g., the active area or the tool). The outer circle can optionally be shown to represent a defined maximum size assigned to the cursor. Cursor size can be varied between zero (or a defined minimum size) and the defined maximum size. The outer circle provides a visual indication of the size to which the cursor may grow. This can be employed as a mechanism to convey the size range to the user so that the user can take action to change the size range in appropriate circumstances. Naturally, techniques discussed herein can be applied to cursors having different shapes, and with or without using the outer portion.

View “B” ofFIG. 3represents a shrinking of the selection boundary302based on manipulation of a cursor304from a position outside of the boundary inward as indicated by arrow308. In both the growing and shrinking scenarios, the selection boundary is modified in a direction away from where the active part of the cursor meets the selection boundary302. The cursor does not necessarily have to touch the boundary, rather, for the purpose of refinement operations described herein the cursor is considered to meet or abut the selection boundary302when boundaries of the cursor (e.g., the active part) come within a defined proximity tolerance of touching the boundaries.

FIG. 4illustrates generally at400details of selection refinement in an example scenario in which a user interface402having a selection refinement tool is utilized for refined selection in accordance with one or more implementations. The details are discussed in relation to different views “A” and “B” of the user interface402. The example user interface may be exposed via an image processing module112as previously mentioned. The user interface402may include an image display area404in which an image is presented. The presented image may be viewed and manipulated in various ways by a user using functionality provided by the image processing module112. Various functionality may be accessible via a tools menu406, which in this example is as a tool bar having selectable icons corresponding to various tools and image editing operations. Other configurations of a tools menu406are also contemplated such as a menu bar, a pop-up tool box, or other suitable configuration that facilitate selection from among various functionality provided by the image processing module112. As represented inFIG. 4, the tools menu406may implement at least a refinement tool115operable to perform various operations upon the image as discussed herein. In connection with refinement selection, an automatic resizing mode can be activated responsive to recognition of input to select automatic resizing. The system can therefore switch back and forth between manual and automatic modes for cursor resizing.

Here, view “A” depicts rendering of selection boundaries408within the image corresponding to a selection of portions of the image. Activation of the refinement tool115via the tools menu406or otherwise may cause appearance of a user interface element410having options for selection refinement and appearance of a cursor412for modification of the selection boundaries408. In the depicted example, the user interface element410is configured as a tool bar. Other configurations are also contemplated, such as a pop-up tool interface, tool tab, dialog, and so forth. The user interface element410provides various functionality for operation of the refinement tool115. The functionality can include options related to manual resizing414, such as a slider to set the cursor size and a slider to control how the cursor snaps to boundaries. Additionally, a toggle control416is provided that enables a user to selectively turn automatic resizing of the cursor on or off. In this case, the toggle control416is depicted as a switch that can be set to on and off positions, and is currently set to the on position. Other configuration of a toggle control416suitable to selectively turn automatic resizing on and off are also contemplated.

View “B” represents examples of automatic resizing the cursor412of view A in response to input applied to position the cursor relative to the selection boundaries408. In particular, input418is represented as causing movement of the cursor to a position outside of the selection boundaries. When this occurs, resizing is automatically triggered. In this case, the resizing is represented as a reduction of the size of the cursor (e.g., reduction of the radius of the inner circle). It is noted, that the resizing results in an arrangement in which the inner circle of the cursor412abuts and does not overlap the selection boundaries408. In both the initial and relocated positions for the cursor, sizing corresponds to the shape of the selection boundaries408at the point where the cursor is located.

Likewise, input420is represented as causing movement of the cursor to a different position inside of the selection boundaries408. Note that the boundary shape at the relocated position has additional space which permits expansion of the cursor412. As such, resizing is represented as an increase of the size of the cursor to conform to the shape of the selection boundaries408. Additional aspects of a selection refinement tool and techniques to automatically resize a cursor in connection with boundary refinement are discussed in relation to the following example procedures.

Example Procedures

FIG. 5is a flow diagram depicting a procedure500in an example implementation of a selection refinement tool. Selection boundaries indicative of a selection of one or more portions of an image exposed for editing in a user interface for an image processing application are represented (block502). For example, an image processing module112may be invoked to view and process images as discussed herein. The image processing module112may support selections via a selection module114as well as other functionality for managing and performing image editing operations upon images. A selected image may be exposed for editing via a user interface provided by or otherwise associated with the image processing module112. Selection boundaries associated with automatic and manual selection are rendered with views of images edited via the image processing module112.

A refinement tool operable to modify the selection boundaries by positioning of a cursor of the refinement tool proximate to the selection boundaries is exposed via the user interface (block504). For example, a refinement tool115as discussed previously may be made accessible via the user interface. Generally, the refinement tool is operable to facilitate selection refinement and cursor resizing in conjunction with resizable cursors associated with the multiple tools. For instance, the user interface may corresponds to an image editing application configured to provide multiple tools for editing images and the refinement tool115may be employed with selection tools and other tools in the image editing context. The refinement tool115tool may also be employed in other scenarios, including but not limited to with other types of applications (e.g., a paint program or video production application).

Responsive to input to position the cursor relative to the selection boundaries, the cursor of the refinement tool is automatically resized in dependence upon a positional relationship between the cursor and the selection boundaries (block506). As noted, an automatic resize mode may be activated via the refinement tool115. For instance, a toggle control416, as discussed previously, that is exposed in conjunction with the refinement tool may be used to selectively turn automatic resizing of the cursor on or off. When automatic resizing is activated, then cursor size is automatically adjusted in response to positioning of the cursor relative to a selection. An optimal size for the cursor is computed based upon the current position of the cursor as well as the shape of the boundaries at the current position. In other words, the size of the cursor is resized to conform to the selection boundaries as the cursor is move, which facilitates the selection refinement process.

Accordingly, the resizing process generally involves determining a positional relationship between the cursor and the selection boundaries and then computing an optimal size for the cursor based on the positional relationship. In or more implementations, the positional relationship is established as being intersecting or non-intersecting with respect to the selection boundaries. Additionally, the positional relationship may reflect a location of a center point of the cursor. When the cursor is non-intersecting, the positional relationship further indicates whether the cursor is located inside or outside of the selection boundaries. The positional relationship can be established in any suitable way. By way of example and not limitation, a level set mechanism can be employed to recognize whether the cursor is inside, outside, or intersecting with respect to the selection boundaries. Details regarding using a level set mechanism for cursor resizing are discussed below in regards to the examples ofFIGS. 6 and 7.

The way in which the cursor is resized depends upon the positional relationship that is established. In particular, the direction of resizing depends upon whether the cursor is intersecting or non-intersecting with respect to the selection boundaries. When the positional relationship is non-intersecting, the cursor is expanded. For instance, the cursor may be expanded until the cursor meets or abuts the selection boundaries (e.g., within a defined proximity tolerance of touching the boundaries) unless a defined maximum size is reached first. If the defined maximum size is reached, the cursor is resized to the maximum. On the other hand, when the positional relationship is intersecting, the cursor is resized to achieve a non-intersecting arrangement. In both cases, the cursor resizing results in an arrangement in which the cursor does not intersect the selection boundaries. When the cursor is circular, resizing comprises setting a size for a radius of the cursor. For other shapes, resizing comprises setting a controlling dimension such as a diagonal for a square or a side length for a triangle.

Given the positional relationship, computation of the radius (or other controlling dimension) can be accomplished using an iterative process. For instance, the cursor size is selected to reach as close as possible to the selection without intersecting. In order to do so, a configurable precision parameter can be set to control distance between boundaries of the cursor and the selection boundaries (e.g., “closeness”) when the cursor is resized. Then, sizes for the cursor are computed iteratively until a difference between a starting size and an ending size for an iteration is less than the precision parameter and a non-intersecting arrangement is achieved. As long as the precision parameter constraint remains unsatisfied or the result of an iteration creates an intersecting situation, more iterations occur to compute the optimal size.

In one or more implementations, the iterative computation can be performed using a binary search approach in which the size is reduced or increased for each iteration by half the difference between starting size and an ending size values for the preceding iteration. When the precision parameter constraint is satisfied, the cursor is resized to the ending size as computed by the last iteration.

FIG. 6is a flow diagram depicting a procedure600in an example implementation in which level set techniques are employed for resizing of a cursor. The discussion of the procedure600includes a section providing details regarding level set techniques that may be employed for selection refinement discussed in this document.

A selection refinement tool is exposed that is operable to modify selection boundaries associated with a selection within an image being edited via the image processing module by positioning of a cursor of the refinement tool proximate to the selection boundaries (602). Responsive to input to position the cursor relative to the selection boundaries, the cursor of the refinement tool is automatically resized (604). A selection refinement tool115may be provided and exposed in various ways, examples of which were previously discussed. Further, the refinement tool115enables an option for automatically resizing of the cursor in connection with boundary modification. Various techniques to compute an optimal size for the cursor are contemplated. Generally, sizing is dependent upon the position of the cursor relative to the boundaries and the shape/contours of selection boundaries in the area where the cursor is located.

Level Set Mechanism

As mentioned, a level set mechanism may be employed in one or more implementations. Generally, the level set mechanism is configured to define regions inside and outside of the selection boundaries by associating values indicative of the regions with pixels of the image. Details of level set mechanisms are described below as an illustrative example of techniques that may be used for refined selection. However, other suitable mechanisms are contemplated and the inventive concepts are not intended to be limited to level set or other enumerated examples herein.

The level set mechanism operates to recognize a boundary of a region and distinguish between pixels inside and outside of the boundary. In the context of a selection refinement tool discussed herein, the level set mechanism enables refined manipulation of selection boundaries that are established for image processing operations. The level set is one example approach that may be employed to implement a refinement selection mode as described herein.

Suppose a real-valued function over an image φ(x), where x is location of each image pixel. A level set is a set of pixels on which φ(x) is constant. Typically, level set refers to zero level set, i.e., the set {x|φ(x)=0}, however other values for φ(x) can be used to fine tune the system. In addition, φ(x) may be defined as a function of distance to the zero level set. In this approach, the zero level set is a curved boundary of a region. Assume that φ(x) inside the region is defined as negative and outside the region as positive. Then, {x|φ(x)=10} is a curve formed by pixels outside the region 10 pixels away from the boundary. On the other hand {x|φ(x)=−10} is a curve 10 pixels away from the boundary inside the region.

Accordingly, level set can be used to define and recognize an image region, where φ(x)<0 inside the region, φ(x)>0 outside the region, and the boundary equates to φ(x)=0. Since level set is not simply a binary mask, but a smoothly varying field, derivatives of level set can be computed and partial differential equations (PDE) can be implemented. Therefore, level set is naturally suitable for region boundary moving (growing, shrinking and merging) smoothly over time since a PDE that has such properties can be solved. This region boundary moving may be used to make granular refinements to the boundary of a selected set of pixels as described herein.

In one example, an advection PDE in the form dφ/dt+vx dφ/dx+vy dφ/dy=0 is used for boundary manipulations. Here, vx and vy represent velocity in x and y directions. The terms dφ/dt, dφ/dx, and dφ/dy are partial derivatives of F with respect to t (e.g., time), x and y. The velocity vector is defined as v=(vx,vy). The PDE may be solved in any suitable way, examples of which include but are not limited to upwinding or semi-lagrangian advection methods. The solution to the PDE provides movement of the boundary interface in the direction of velocity. The selection boundary (e.g., the zero level set) may be manipulated in any direction by selectively setting the corresponding velocity v and direction. For example, the level set selection may be configured to set v as slightly growing or shrinking along the gradient direction (e.g., for addition or removal from the selection). An edge snapping velocity may also be computed from the second derivative of image intensity. In addition or alternatively, a smoothing velocity component may be added to control the amount of jaggedness of a selection boundary.

When level set is employed, a level set matrix for the selection is computed using a level set mechanism (block606) and a current position of the cursor relative to the selection boundaries is ascertained using the level set matrix (608). Then, a size is calculated for the cursor that is optimized for the current position of the cursor (block610). In particular, the level set mechanism can be used to compute a level set matrix for a selection that assign values to pixels representative of relative distances of the pixels with respect to a boundary. In this case, the boundary is a selection boundary for the image processing operation. The matrix is used to resolve the positional relationship of the cursor to the cursor. This may involve correlating pixels associated with the cursor to the matrix to determine if any of the pixels have a value of zero.

If any of the pixels of the cursor correlate to a value of zero, then the cursor intersects the boundary. If not, then the cursor is located either inside or outside of the boundary and the signs of the pixel values as positive or negative indicate the position. The level set matrix can additionally be used to ensure that the cursor is not intersecting when resized. This can be accomplished by checking to make sure signs for the pixels of the cursor after resizing all have the same signs. In other words, resizing the cursor includes determining a size for the cursor that achieves an arrangement in which the cursor is positioned entirely in one of the regions as defined by the level set mechanism.

ConsiderFIG. 7, which illustrates generally at700an example level set matrix for a selection in accordance with one or more implementations. In the example ofFIG. 7, a grid view of an example image702is shown to represent individual pixels of the image. The image702includes a selection boundary704. A corresponding level set matrix706for the selection is shown. This example represents a zero level set in which positive values are assigned to pixels708outside of the selection boundary704, values of zero are assigned to pixels710of the selection boundary, and negative values are assigned to pixels712inside of selection boundary. As discussed, the level set matrix can be employed to determine whether the current cursor position is intersecting or non-intersecting with respect to the selection boundaries and an optimal cursor size is then calculated accordingly. When the current position is non-intersecting as per the matrix, cursor size is expanded to abut the selection boundaries (or to a defined maximum size). When the current position is intersecting as per the matrix, cursor size is reduced to achieve a non-intersecting arrangement.

Having consider example details of and procedures related to a selection refinement tool, consider now a discussion of an example system having various representative components that can be utilized to implement aspects of the techniques described herein.

Example System and Device

FIG. 8illustrates an example system generally at800that includes an example computing device802that is representative of one or more computing systems and devices that may implement the various techniques described herein. This is illustrated through inclusion of the image processing module112, which may be configured to process image data, such as image data captured by an image capture device104. The computing device802may be, for example, a server of a service provider, a device associated with a client (e.g., a client device), an on-chip system, or any other suitable computing device or computing system.

Combinations of the foregoing may also be employed to implement various techniques described herein. Accordingly, software, hardware, or executable modules may be implemented as one or more instructions or logic embodied on some form of computer-readable storage media including by one or more hardware elements810. The computing device802may be configured to implement particular instructions and/or functions corresponding to the software and/or hardware modules. Accordingly, implementation of a module that is executable by the computing device802as software may be achieved at least partially in hardware, e.g., through use of computer-readable storage media and/or hardware elements810of the processing system804. The instructions and functions may be executable/operable by one or more articles of manufacture (for example, one or more computing devices802and processing systems804) to implement techniques, modules, and examples described herein.

The techniques described herein may be supported by various configurations of the computing device802and are not limited to the specific examples of the techniques described herein. This functionality may also be implemented all or in part through use of a distributed system, such as over a “cloud”814via a platform816as described below.

The cloud814includes or is representative of a platform816for resources818. The platform816abstracts underlying functionality of hardware (e.g., servers) and software resources of the cloud814. The resources818may include applications or data that can be utilized while computer processing is executed on servers that are remote from the computing device802. Resources818can also include services provided over the Internet or through a subscriber network, such as a cellular or Wi-Fi network.

The platform816may abstract resources and functions to connect the computing device802with other computing devices. The platform816may also serve to abstract scaling of resources to provide a corresponding level of scale to encountered demand for the resources818that are implemented via the platform816. Accordingly, in an interconnected device embodiment, implementation of functionality described herein may be distributed throughout the system800. For example, the functionality may be implemented in part on the computing device802as well as via the platform816that abstracts the functionality of the cloud814.

CONCLUSION

Although the invention has been described in language specific to structural features and methodological acts, it is to be understood that the invention defined in the appended claims is not necessarily limited to the specific features or acts described. Rather, the specific features and acts are disclosed as example forms of implementing the claimed invention.