CONFIGR: CONtour FIgure GRound




Download(s)


  1. Download File #1

Software Description

CONFIGR (CONtour FIgure and GRound) is a model that performs long-range contour completion on large-scale images. CONFIGR accomplishes this through a mechanism that fills-in both figure and ground via complementary process.

Coded By

Sai Gaddam

Reference

Carpenter, G.A. , Gaddam, C.S. , Mingolla, E., CONFIGR: A vision-based model for long-range figure completion, Neural Networks - Volume 20, 1109-1131 (2007).

Abstract

CONFIGR (CONtour FIgure GRound) is a computational model based on principles of biological vision that completes sparse and noisy image figures. Within an integrated vision/recognition system, CONFIGR posits an initial recognition stage which identifies figure pixels from spatially local input information. The resulting, and typically incomplete, figure is fed back to the “early vision” stage for long-range completion via filling-in. The reconstructed image is then re-presented to the recognition system for global functions such as object recognition. In the CONFIGR algorithm, the smallest independent image unit is the visible pixel, whose size defines a computational spatial scale. Once pixel size is fixed, the entire algorithm is fully determined, with no additional parameter choices. Multi-scale simulations illustrate the vision/recognition system. Open-source CONFIGR code is available online, but all examples can be derived analytically, and the design principles applied at each step are transparent. The model balances filling-in as figure against complementary filling-in as ground, which blocks spurious figure completions. Lobe computations occur on a subpixel spatial scale. Originally designed to fill-in missing contours in an incomplete image such as a dashed line, the same CONFIGR system connects and segments sparse dots, and unifies occluded objects from pieces locally identified as figure in the initial recognition stage. The model self-scales its completion distances, filling-in across gaps of any length, where unimpeded, while limiting connections among dense image-figure pixel groups that already have intrinsic form. Long-range image completion promises to play an important role in adaptive processors that reconstruct images from highly compressed video and still camera images.

Code Description

CONFIGR Source Code

CONFIGR can be run from the command line in MATLAB by calling the function
To change input image and pixel size, follow directives included in the pseudocode below.

Usage:
I_output = runCONFIGR(I,PixRes)
This runs CONFIGR with the following defaults:
PixRes: pixel resolution default=1: CONFIGR pixel resolution is the same as that of the input image

Advanced Options:
I_output = runCONFIGR(I,PixRes,NumIter,ShrinkFact)
I: input image
PixRes: pixel resolution 1: fine 2: medium 3: coarse
The following options provide computational flexibility but are not model parameters.
NumIter: number of iterations CONFIGR simulation can be forced to stop early by setting a low number of iterations.
ShrinkFact: ratio of desired image size to actual size Sparse images can be resized for faster runtimes.
Raw CONFIGR output (ground and figure-filled rectangles, and interpolating diagonals)
can be obtained using [I_output, I_output_raw, Idiagonals]=runCONFIGR(I)

CONFIGR algorithm step 1: Preparing the image

Simple cell and complex cell activations are computed in CONFIGR_6_FindBound.m
Image: Select a rectangular image.
Choose the spatial scale: Specify the size and location of one pixel in the designated image.
Storage matrices: Create matrices to store locations and variable values for pixels, subpixels, grid subpixels, simple and complex cells, and lobe corners.
Figure and ground: Label each pixel as image-figure (1) or image-ground (0).
Simple cell activation: At each subpixel and for each orientation (N, S, E, W), compute the simple cell activation (1 = active, 0 = inactive).
Complex cell activation: At each subpixel with an active simple cell, compute the vertical or horizontal complex cell activation (1 = active, 0 = inactive).

CONFIGR algorithm step 2: Lobe initialization

Lobe iteration number: Set the lobe iteration number to 0.
Lobe activation: At each subpixel and for each orientation (N, S, E, W), compute the initial lobe activation (1 = active, 0 = inactive).
Lobe corners: Specify each lobe corner type (NE, NW, SE, SW) and the location of its grid subpixel.
Corner labels: Label each lobe corner as a filled corner or an empty ground corner.
Empty rectangles: Mark each empty rectangle.
Filling-in as ground: Relabel as filled-ground the pixels of each empty rectangle.
Update corner labels: Relabel the four lobe corners spanning each filled rectangle as filled corners.

CONFIGR algorithm step 3:Lobe iterations

Lobe propagation is computed in: CONFIGR_6_LobePropagate.m

Empty Rectangles are computed in: EmptyRectangleTypeOne_Ground_6.m, EmptyRectangleTypeTwo_Ground_6.m

LOBE STOPPING RULE:

Stop lobe propagation where two lobes form an empty corner.
Start lobe iterations {

Lobe iteration number: Increase the lobe iteration number by 1.
Lobe activation: At each subpixel and for each orientation (N, S, E, W), compute the lobe activation (1 = active, 0 = inactive). Repeat for a total of five subpixel steps.
New corners: For each new lobe corner, specify each lobe corner type (NE, NW, SE, SW) and the location of its grid subpixel.
Empty corner labels: Label each new lobe corner as empty figure, empty ground, or wall.
Relabel as wall each existing empty figure corner that is back-to-back with a new wall corner.
Empty rectangles: List all NW empty corners that are not walls.
For each listed corner, search for SE empty corners that span empty rectangles with this lobe corner. When a NW-SE pair of empty corners spans an empty rectangle, mark it for potential filling-in on this iteration.
Repeat the search, marking each NE-SW pair of empty corners that span an empty rectangle. Sort the marked rectangles from smallest to largest.

GROUND FILLING RULE:

Relevant File: FillingGROUND.m

An empty rectangle is eligible for filling-in as ground if it contains an empty ground corner or if it shares an edge with one or more filled-ground pixels.
Loop from smallest to largest empty rectangle (filling-in as ground) {

Relabel as filled-ground the pixels of each empty rectangle that is the size of the loop's index and that is eligible for filling-in as ground. Relabel as filled each corner whose defining lobes are on the border or in the interior of the filled rectangle.

Update corners and rectangles
Relabel wall corners that have become empty figure or empty ground. For each such corner, add newly created empty rectangles to the marked list. Relabel as filled-ground the pixels of each newly created empty rectangle of size equal to or smaller than the current loop size, if the rectangle is eligible for filling-in as ground. Relabel newly filled corners. Remove from the list of marked rectangles all that are no longer empty, because they intersect newly filled rectangles.
Iterate corner and rectangle updates until no more changes occur.
} End empty rectangle loop (filling-in as ground)

FIGURE FILLING RULE: Remaining empty rectangles are eligible for filling-in as figure.

Relevant File: FillingFIGURE.m
Loop from smallest to largest empty rectangle (filling-in as figure) {

Relabel as filled-figure the pixels of each empty rectangle that is the size of the loop's index. Relabel as filled each corner whose defining lobes are on the border or in the interior of the filled rectangle.
Update corners and rectangles
After all rectangles of the loop size have been filled as figure, relabel affected corners. Some empty corners that had previously been wall may now be empty figure or empty ground corners. For each such corner, add newly created empty rectangles to the marked list. Fill as ground newly created marked rectangles, if the rectangle contains an empty ground corner or is adjacent to one or more filled ground pixels. Remove from the list of marked rectangles all that are no longer empty, because they intersect newly filled rectangles.
Fill as figure each remaining newly created marked rectangle of size equal to or smaller than the current loop size.
Remove from the list of marked rectangles all that are no longer empty, because they intersect newly filled rectangles.
Iterate corner and rectangle updates until no more changes occur.

} End empty rectangle loop (filling-in as figure)

} End lobe iterations

Operating System

Any

Programming Language(s)

MATLAB

License

Public domain software

Contact

Contact Us