VLofimage

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Images
Introduced first in SolidGeometry 3.6, Creation date: 2017-03-16, Last change: 2025-09-14

converts an image into a contour or a solid

Description

Rewritten based on the contour function. Quite useful procedure to generate contours from images or string comments in combination with imageoftext. If parameter h>0, the function returns a solid.
There is an earlier version, now called VLofimage_2012b.

See Also: CPLtextimage , VLFLtextimage , imageoftext , VLwarpgrid

Example Illustration

 missing image of VLofimage(I,pixsize,h,nf)

Syntax

[VL,EL,FL,CPL]=VLofimage(I,[pixsize,h,nf])

Input Parameter

I: image array
pixsize: size of a pixel
h: desired heigth; default is 0 (Contour)
nf: frame in pixels; if nf>0 the image is impressed; default is 0

Output Parameter

VL: Vertex list (nx2) for h=0; (nx3) for h>0;
EL: Edge list
FL: Facet list
CPL: Closed Polygon list based on contour

Examples

Generate a contour for the string 'Test':
I=imageoftext('TL:MMXII-XI-XII',36);
[VL,EL,FL]=VLofimage(I,.7); VLELplot(VLaddz(VL),EL,'r-')
[VL,EL,FL]=VLofimage(I,.7,3); close all, VLFLplot(VL,FL),




Copyright 2017-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21