Bentley Descartes - Raster Editing


Raster Editing

Bentley Descartes provides many functions for modifying the pixels' value of a raster, of any pixel type, provided that the file format used to store the raster is supported in write mode.

Touch-up

The Touch-up tools are use to modify the content of pixels with tools which emulate physical brushes and erasers.

 

Touch-up toolbox

 

Paint

The Paint tool allows the user to paint on the image as if was painting with a brush on a physical canvas.

Paint Settings

  • Method: Allow the user to chose the methods, area or one of the   three types of brush.
  • Area: Only available when the method chosen is area, it lets the user specify the type of area to use.
  • Work in Image Plane
  • Red, Green, Blue: For choosing the color of the paint.
  • Paint Mask: For choosing a mask that will work has a stencil when painting. This is only available when using the method Area.

 

 

Which Paint Method?

The brush method, also known as "interactive painting" requires much dexterity and can lead to the coloring of undesired area. 

The basic shape of the three types of brush are shown below.

  

 

The area method is different from using brushes in that the area to be painted is selected and the brushing of this area is done instantly instead of brushing the area manually with one of the brushes. The different ways of choosing the area is shown in the picture below. Note that it is possible to choose a color mask which will work has a stencil and impedes the modification of all pixels in the area that are masked. It is also possible to choose the whole image as the area. Beware that when using image as the area all the pixels of the image are going to be painted unless some of them are masked. In other words, the contents of your image will be loss if no mask has been set.

 

Paint Area Types

 

Brush Method vs Area method

 

Productivity Tip : If you want to paint basic geometric form on the raster, use the stamp vector tool.

  

Erase

The Erase tool is quite similar the to Paint tool except that the color is always fix to black and no color mask can be chosen.

Erase settings

  

Cleanup

The Cleanup tool allows the user to remove small aggregate of pixels of different color than the surrounding pixels. Such speckles often occurs on image created from scanned document.

 

Cleanup settings

  • Size: Specify the size of the speckle (or hole) size to be removed in working units.

    Productivity Tip: Use the yellow ruler to measure directly on the screen the size of the speckle you want to remove.

 

  • Method: Use to determine if you want to remove speckle or hole.
  • Area: Specify the area that needs to be cleanup.
  • Work in Image Plane
  • Red, Green, Blue: Specify the color to use to paint over the speckles or to fill the holes.

    Binary Tip: For binary images, the image's background color is automatically used to remove the speckles and the foreground color for filling the hole.
  • Paint Mask: For choosing a mask that will work has a stencil when painting. This is only available when using the method Area.

 

Flood

The flood tool allows use to fill an empty area with just one click. The flood tool is similar to the famous paint bucket tool found in many image editing software, but it works only on binary raster (i.e. : black and white or two colors).

Below is a small example of using the flood tool to fill with green a small area on the binary raster, the left picture representing the image before the flood operation, and the right, the image after the flood operation.

Bentley Descartes - Flood Example

Combine

The combine tool can be used to combine the foreground data of two binary images together and save the result in a destination binary image.  

Bentley Descartes - Combine Images Dialog
  • Type (four icons at the top) : The combine operation type, which can be Or, And, Xor or Compare.
  • Area : The type of area to be used for selecting the overlapping region to be combined.
  • Source 1 : The first binary image used for the combine operation.
  • Source 2 : The second binary image used for the combine operation.
  • Destination : The destination binary image that is going to contain the combine operation result.
  • Work in Image Plane

 

  

 

 

 

Examples

This section presents an example for each different combine type available. The two binary rasters used as the sources are presented below. Note that the source 1's foreground color is white while the source 2's foreground color is green and that some foreground pixels from both binary raster are overlapping in two distinct areas.

Source 1 In Front Of Source 2

Bentley Descartes - Combine Example - Sources Images   

Source 2 In Front Of Source 1

Bentley Descartes - Combine Example Sources 2

 

AND

When the AND combine type is chosen the overlapping pixels of both source rasters at one location are AND together. If both pixels have a value of 1 (i.e. : foreground color), the destination raster will have its corresponding pixel set to 1. In all other case, the destination raster's corresponding pixel will be set to 0.

Destination With Sources

 Bentley Descartes - Combine AND Example  

Destination Only

Bentley Descartes - Combine AND No Sources Example 

Usage Tip : The AND combine type is useful for finding overlapping foreground areas in both source rasters.

OR

When the OR combine type is chosen the overlapping pixels of both source rasters at one location are OR together. If at least one of the source pixels has a value of 1 (i.e. : foreground color), the destination raster will have its corresponding pixel set to 1. The destination raster's corresponding pixel will be set to 0 only if the overlapping pixels in both raster are set to 0.

Bentley Descartes - Combine OR Example

Usage Tip : The OR combine type is useful for mergin together two binary rasters or part of two binary rasters.

XOR

When the XOR combine type is chosen the overlapping pixels of both source rasters at one location are XOR together. If one and only one source pixels has a value of 1 (i.e. : foreground color), the destination raster will have its corresponding pixel set to 1. The destination raster's corresponding pixel will be set to 0 if both overlapping source pixels have the same value, being 0 or 1.

Destination With Sources

Bentley Descartes - Combine XOR Example  

Destination Only

Bentley Descartes - Combine XOR No Source Example

Usage Tip : The XOR combine type is useful for finding all foreground data that are not overlapping. In that regard, the XOR type is the opposite of the AND type.

Compare

When the compare combine type is chosen the pixel value of the first source is compared with the second source. The foreground pixel of the first source raster will be written to the destination raster only if the second source raster's overlapping pixel is not set to 1. Otherwise the 0 will be written to the destination raster.

Destination With Sources

Bentley Descartes - Combine Compare Example   

Destination Only

Bentley Descartes - Combine Compare No Source Example

 

Usage Tip : The compare combine type can be used to determine the pixels in the first source raster that are equal to 1 and for which the corresponding pixels in the second source raster are not equal to 1.

Rasterize

The rasterize tools give the user different possibilities to rasterized vectors hovering on a raster. The process of rasterizing consists to convert vector element hovering a raster to a series of pixels in the destination raster representing the vector element.

Rasterize Toolbox

  

Stamp Vector

The Stamp Vector tool can be use to stamp selected vectors directly to an attached raster. Stamping vectors can be very useful when basic geometric needs to be painted on a raster.

 

Stamp Vector Settings

  • Use Fence: Select this checkbox if you want to use a fence as selector of vector elements to be stamped.
  • Use this View: This setting allows the user to select a view that is going to be used for all stamping operation.

 

 

An Example - Drawing A Circle On A Raster

Drawing a simple red circle of a given radius and its the radius dimension can be tremendously complicated and time consuming to do with the touch-up tools. Combining the vector drawing capabilities of MicroStation with the rasterizing capabilities of Bentley Descartes makes this task very easy to accomplished. To prove that this task is quite

  1. First, you draw the circle with a certain radius, for example 5 units, over the given place on the raster that you want the circle to be stamped. Add the dimension of the circle with the MicroStation's Radial Dimensions tool.
    Stamp Vector Example - Step 1
  2. Then, place a fence around the circle and dimension elements that you have drawn.
    Stamp Vector Example - Step 2
  3. Select the stamp vector tool, check the Use Fence setting on the Stamp Vector setting dialog box and click on the view that you want to use for the stamping. In the picture below, the original circle and dimension elements have been set to green and offset from their original locations to show the result of the stamp operation : the pixels painted in red on the raster.
    Stamp Vector Example - Step 3 

 

 Productivity Tip : Check the Use this View setting so you don't have to select the view each time of want to stamp a vector.

  

Merge

Sometime you have many vector elements that you don't want to stamp directly on the raster under the vectors. In that case you may use the merge tool to rasterize all the vector elements and merge them with the raster under those vector elements to form a new raster.

Match Line Mapping Settings

Since line weights and styles always display at the same ratio regardless of the zoom factor, for each level of zoom the element covers more or less pixels. For example, when zoomed out really far, the element covers more pixels than when zoomed in very close. It is this coverage, in Working Units, that is used to modify the Line Mapping Settings.

Line Mapping Settings

The Line Mapping Settings dialog box is used to set the mapping between the vector element's line weight and line style parameters and the resulting line weight and line style of the rasterized vector elements (i.e. : pixels representation of the vector element).

  

Cut / Copy / Paste

The cut / copy / paste functionalities are similar to the standard cut / copy / paste functionalities found in numerous applications like text editor. In Descartes, the cut / copy / paste functionalities work on the pixels composing one or many rasters.

Local Transform

The Local Transform tools are used to do basic editing operations within the boundary of the active image. The basic editing operation are : copy, move, scale, rotate, mirror and warp.

Bentley Descartes - Local Transform Toolbox

  

Cover Up Area / Clone Area

In Descartes V8i two more complex and complementary editing tools have been added to the local transform toolbox. These tools allow the user to cover-up or clone a specified area with another area in the same image. Both tools' setting dialog are identical.

Descartes - Cover Up Area Settings

  • Area: Allow the user to specify the type of area to  cover up or clone.
  • Feathering: Specified if feathering around the area border should be applied during the cover up or clone area operation. Note that the feathering is not available for certain color more like binary or 8 bit color palette.
  • Show  destination: When selected the destination area is show during the selection of the cover up or cloned area.

 

An Example - Covering-up a boat or cloning it

This section shows what can be achieved with the Clone Area and Cover Up Area tools. The goal here is to cover-up / clone the boat at the top of the following image.

Descartes - Clone Area/Cover-up Example - Before

- Covering-up the boat

The image below show the image after the boat at the top of the original image has been covered-up. The power of the Cover Up Area tool is based on the fact that, in an image, the neighborhood of an area containing background image data (in that example, water) can be copied over this area to cover up some object (in that example, the boat) with background image data. Note that the selection of the Show destination option results in the drawing of the left double rectangle in the image below. This rectangle is deleted once the operation is terminated.

Productivity Tip: Turn on the feathering to ensure that the border of the Cover Up Area or Clone Area doesn't appear in the resulting image.

Descartes - Covering-up Example

 

- Cloning the boat

The Clone Area tool is very similar to the Cover Up Area except that now this is the selected area that is used to cover up another area instead of being covered up. The example below shows the boat at the top of the original image being cloned.

Bentley Descartes - Clone Area - Example 

  

Cover Up Area / Clone Area

The Cover Up Area or Clone Area tools can be used interchangeably. In the cover-up example above, the Clone Area tool could have been used to clone the water body on the boat. The major drawbacks of using the Clone Area tool to cover-up some object is that you need to estimate the size of the object to cover when selecting the clone area and that the clone area chosen might not give the anticipated result. Using the Cover Up Area tool have none of those drawbacks when having to cover-up an area.

 

Productivity Tip: If you have to cover-up (i.e. : erase) a foreground object with the background image data, use the Cover Up Area tool. If you have to clone a foreground object on the background image data, use the Clone Area tool.

  

Color Mask

The color mask can be used as a stencil for ensuring that only some determined regions are modified while other remains unchanged when using the standard raster editing tools. The stencil is described in term of the different colors than must not be modified, thus the name color mask.

Bentley Descartes - Color Mask

  

Add to Mask / Substract from Mask

Colors can be easily added to or subtracted from a given mask by using the tools Add to Mask / Subtract from Mask. These tools allow the user to select an image's area containing pixels whose colors need to be added to or subtracted from a given color mask. Note that the Subtract from Mask tool's settings dialog is the same as the Add to Mask tool's settings dialog shown below.

Bentley Descartes - Add to Mask - Tool Settings

  • Area: Allow the user to specify the type of area to be used when selecting image's pixels whose colors needed to be added to a color mask.
  • Mask: The name of the color mask to which the selected pixels' colors will be added.
  • Work in Image Plane
  • Hilite: When turn on, all the pixels whose color are present in the selected color mask will be highlighted (i.e. : their display color will be the same as the hilite color).

  

Hilite Mask

The hilite mask tool allows the user to turn the hilite on for the selected color mask.

Bentley Descartes - Hilite Mask Tool Settings

  

Color Mask Dialog

The color mask dialog can be used to manage (create, delete, add colors, remove colors, etc...) color masks. A mask can be used with any image of any pixel type. Color mask cannot be used with binary image.

Bentley Descartes - Color Mask Dialog 

  

Raster Editing In 3D Model

With Bentley Descartes it is possible to edit 2D raster not only in 2D model but also directly in a 3D model.

Work In Image Plane

When working on an 2D image in a 3D model it is important to consider the visual deformation of the raster when viewed through a view that is not on the same plane as the raster. This visual deformation is the result of the raster's pixel being reprojected from the raster plane to the view plane.  When dealing with images that have a 3D orientation, several tools provide the Work in Image Plane option which projects all data points perpendicular to the image coordinate system.

When this setting is off, the data points are parallel to the view. However, when it's turned on, the data points lie on the same plane as the 3D oriented image.  The image on the left shows the setting off, while the right image shows the datapoint placement when the setting is on.