Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
clipEdge.m File Reference

CLIPEDGE Clip an edge with a rectangular box. More...

Functions

function edge2 = clipEdge (edge, box)
 CLIPEDGE Clip an edge with a rectangular box.
 

Detailed Description

CLIPEDGE Clip an edge with a rectangular box.

Function Documentation

◆ clipEdge()

function edge2 = clipEdge ( edge,
box )

CLIPEDGE Clip an edge with a rectangular box.

EDGE2 = clipEdge(EDGE, BOX); EDGE: [x1 y1 x2 y2], BOX : [xmin xmax ymin ymax], or [xmin xmax ; ymin ymax].

return
EDGE2 = [xc1 yc1 xc2 yc2];

If clipping is null, return [0 0 0 0];

if EDGE is a N-by-4 array, return an N-by-4 array, corresponding to each clipped edge.

See also
edges2d, boxes2d, clipLine

References max.