Syntax
CEL=CELflip(CEL)
Input Parameter
Output Parameter
CEL : | | Contour edge list flipped |
Examples
CEL=[1 2;2 3;3 4;4 1;5 6; 6 7;7 8;9 5]
[CEL CELflip(CEL)]
Copyright 2013-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
Algorithm (Workflow)
This algorithm is designed to flip the orientation of a contour edge list (CEL). It processes each individual contour within the list independently.
Input Parameters
- CEL: A matrix representing the contour edge list. Each row contains two elements, representing the start and end points of an edge.
Output
- CEL: The contour edge list with flipped orientations for each contour.
Algorithm Steps
- Initialize variables: Determine the number of rows in CEL (n) and set the index (i) to 1. Create an empty matrix CIL to store contour indices.
- Identify Contours: Use a while loop to iterate through CEL. For each edge, find the end index (e) where the second column matches the start of the current edge. Append the start and end indices of each contour to CIL. Increment i to e+1 to move to the next contour.
- Flip Contours: Determine the number of contours (n) from CIL. For each contour, use the ELflip function to reverse the order of edges within the contour, updating CEL accordingly.
Algorithm explaination created using ChatGPT on 2025-08-18 22:34. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21