VistaIOZeroCrossings(3)
π VistaIOZeroCrossings β bestie edition π
okay so you're in the vistaio manual, section 3 (library functions, the good stuff β¨), and today's main character is VistaIOZeroCrossings. she marks zero crossings in an image. that's it, that's the job, and she does it flawlessly π
β¨ NAME β¨
VistaIOZeroCrossings β mark zero crossings in an image π
πΈ SYNOPSIS πΈ
#include <vistaio.h>
VistaIOImage VistaIOZeroCrossings (src, dest, band)
VistaIOImage src, dest;
VistaIOBand band;
π¦ ARGUMENTS π¦
srcβ the source image, aka the one we're hunting zero crossings in. this is where they're located, no cap πdestβ you may hand over a destination image to hold the results, or you can passNULLand let her spin up a brand new destination image herself. queen behavior π«Άbandβ you may name one specific band of the source image to process, or you can pass the constantVistaIOAllBandsto say "do every band bestie, all of them" π
π DESCRIPTION π
so VistaIOZeroCrossings marks the zero crossings of an image. she goes through the pixels of the source image, src, and sets the destination pixels depending on whether they correspond to zero crossings. here's the vibe check:
- if a destination pixel does not lie on a zero crossing β it gets set to zero.
- if it does lie on one β it gets set to the gradient of the zero crossing.
and how's that gradient computed, you ask? it's literally just the magnitude of the difference between the pixels on each side of the zero crossing. simple, elegant, iconic β¨
if the dest argument is NULL, VistaIOZeroCrossings creates a destination image with all the appropriate properties for you. otherwise, dest is an existing destination image that she'll use. no drama either way π
now, plot twist: the destination image is smaller than the source image by one row and one column. not a typo, not a glitch, that's just how she rolls.
band count? either the same number of bands as the source image (if band is VistaIOAllBands), or a single band (if band names one particular band).
and the pixel representation of the destination depends on the source's, per this table:
Source Representation β Destination Representation
VistaIOBitβ not supported πVistaIOUByteβ not supported πVistaIOSByteβVistaIOUByteVistaIOShortβVistaIOLongVistaIOLongβVistaIOLongVistaIOFloatβVistaIOFloatVistaIODoubleβVistaIODouble
π RETURN VALUES π
she returns the destination image if everything slayed, and NULL otherwise. that's the whole story π
π₯ SEE ALSO π₯
VistaIOCanny(3)VistaIOLinkImage(3)VistaIOImage(3)
go read those too, iykyk π
β NOTES β
VistaIOZeroCrossings labels the destination image as a gradient image by giving it these attributes:
ncomponents: 1component_interp: gradient
periodt. that's how you'll know it's a gradient image π«
π DIAGNOSTICS π
Band band referenced in image of nbands band(s).β thebandargument is invalid given the number of bands insrc. she's not mad, she's just confused π₯²Source image has unsigned pixels.β okay genuine question, how can an image of unsigned pixels even have zero crossings?? such source images are not supported, bestie, don't try it πDestination image has dest_nbands bands; src_nbands expected.β you specified a destination image but it's got the wrong number of bands. reminder: ifbandisVistaIOAllBands, the destination image must have the same number of bands as the source image. otherwise it must have a single band. rules are rules πDestination image has dest_prop property; src_prop expected.β herepropertyis one ofpixels,rows, orcolumns. a destination image was specified but it does not have the same pixel representation, number of rows, and number of columns as the source image. mismatch detected, vibe ruined π¨
π AUTHORS π
- David Lowe
<lowe@cs.ubc.ca> - Art Pope
<pope@cs.ubc.ca>
Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>
and that's the whole page, babe π«Ά every flag, every message, every pixel β all of it. no skips, no summaries, no cap π
okay and before you go, tiny sign-off moment π this is VistaIO Version 1.2.14, dated 24 April 1993 β yeah, she's vintage and she still ate πβ¨ bye bestie, go mark some zero crossings π
π¦ where this page comes from
- debian bookworm: libvistaio-dev 1.2.19-3 Β· libvista-orig
- debian trixie: libvistaio-dev 1.2.19-3+b2 Β· libvista-orig
- ubuntu jammy: libvistaio-dev 1.2.19-3 Β· libvista-orig
- ubuntu noble: libvistaio-dev 1.2.19-3 Β· libvista-orig
- ubuntu questing: libvistaio-dev 1.2.19-4
- ubuntu resolute: libvistaio-dev 1.2.19-4build1 Β· libvista-orig
- ubuntu stonking: libvistaio-dev 1.2.19-4build1 Β· libvista-orig
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms