Dali VM : Mosaic API


Header Files

#include <dvmmosaic.h>

Type Definition

A mosaicis composed of nodes. Each node has links which connects them to various nodes. The links store the transformbetween the nodes they connect.




typedef struct mosaic {

	unsigned char rows;

	unsigned char cols;

	Node *first;

	BitImage *final;

} Mosaic;

rows
Number of rows (height) in the mosaic.
cols
Number of columns (width) in the mosaic.
first
Pointer to the first node at left top [position (0,0)]
final
Pointer to the final image.
typedef struct node {

	BitImage *image;

	unsigned char found;		/* Will have 1 if transform found. */

	Link left;

	Link right;

	Link top;

	Link bottom;

	int xPos, yPos;

	MTransform comp;		

} Node;

image
The image corresponding to the node
found
set if the composite transform for this node has been found
left
Link to the left node
right
Link to the right node.
top
Link to the top node.
bottom
Link to the bottom node.
xPos, yPos
Postion of the node in the mosaic.
comp
Composite transform for this node.

typedef struct link {

	MTransform trans;

	unsigned char fpresent;

	struct node *toNode;

} Link;

trans
Transform for this link
fpresent
Set to 1 if the transform is present
toNode
Pointer to the node it connects to.
typedef struct mtrasform {

	int x;	

	int y;

	double scX;

	double scY;

	double confidence;

} MTransform;

x
Translation in X direction
y
Translation in Y direction
scX
Scaling in X direction
scY
Scaling in Y direction
confidence
Confidence level for the transform [0..1]

Return Code


#define MOSAIC_OK 1
#define MOSAIC_ERROR -1


Mosaic Processing

int MosaicAddNext(Iterator *iterate, ByteImage *image);

int MosaicSetRightTransform(Mosaic *mos, int xPos, int yPos, int x, int y, double scX, double scY, double confidence);

int MosaicSetBottomTransform(Mosaic *mos, int xPos, int yPos, int x, int y, double scX, double scY, double confidence);

BitImage* MosaicGetImage(Mosaic *mos, int xPos, int yPos);

int MosaicFillGaps(Mosaic *mos);

int MosaicCheckAllConnected(Mosaic *mos);

int MosaicComputeComposite(Mosaic *mos);


See Also

BitImage


Last Updated : 10/25/04 10:33:49 PM