CONTRAST2_SPMD
SPMD Workers Cooperate on Image Processing


CONTRAST2_SPMD is a MATLAB program which uses the SPMD (single program, multiple data) command so that multiple MATLAB workers can cooperate in an image processing task.

This program is an improvement on the contrast_spmd code. That code left white bars on the processed image, because each worker had to treat its first and last columns as boundaries. This improved code demonstrates how workers can communicate with MPI-style messages. In this way, two workers can exchange image columns needed to avoid the artificial boundary effect.

The function has the form:

function y = contrast2_fun ( x )
where

Depending on the situation, the function could be executed in parallel:

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

CONTRAST_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature for image operations; the client reads an image, the workers increase contrast over separate portions, and the client assembles and displays the results.

DIJKSTRA_SPMD, a MATLAB program which uses the SPMD feature to parallelize a simple example of Dijkstra's minimum distance algorithm for graphs.

FACE_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature; the client has a 3D box that has been dissected into tetrahedrons. Multiple workers cooperate to construct a list of the triangular faces that lie on the boundaries of the box.

FD2D_HEAT_EXPLICIT_SPMD, a MATLAB program which uses the finite difference method and explicit time stepping to solve the time dependent heat equation in 2D. A black and white image is used as the "initial condition". MATLAB's SPMD facility is used to carry out the computation in parallel.

IMAGE_CONTRAST, a MATLAB program which applies image processing techniques to increase the contrast in an image.

IMAGE_DENOISE_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature for image operations; the client reads an image, the workers process portions of it, and the client assembles and displays the results.

IMAGE_EDGE, a MATLAB library which demonstrates a simple procedure for edge detection in images.

MATRIX_ASSEMBLE_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature by having each worker assemble part of the Hilbert matrix, which is then combined into one array by the client program.

PLOT_SPMD, a MATLAB library which demonstrates the SPMD parallel programming feature, by having a number of labs compute parts of a sine plot, which is then displayed by the client process.

PRIME_SPMD, a MATLAB program which counts the number of primes between 1 and N; running in parallel using MATLAB's "SPMD" feature.

QUAD_SPMD, a MATLAB program which estimates an integral using quadrature; running in parallel using MATLAB's "SPMD" feature.

Reference:

The User's Guide for the Parallel Computing Toolbox is available at http://www.mathworks.com/access/helpdesk/help/pdf_doc/distcomp/distcomp.pdf

MathWorks documentation for the Image Processing Toolbox is available at http://www.mathworks.com/access/helpdesk/help/pdf_doc/images/images_tb.pdf.

Source Code:

You can go up one level to the MATLAB source codes.


Last revised on 28 March 2010.