bit_adaptive_threshold_8 src dest blockw blockh maxVariance allWhite lowVal
Adaptively thresholds the ByteImage src and fills in the byte aligned BitImage dest. The width and height of the window around each pixel that is examined to determine the value of the pixel are given by blockw and blockh. maxVariance is the maximum allowed variation in the pixel values beyond which pixel value distribution is considered to be bimodal. allWhite specifies the threshold such that a unimodal distribution with a mean pixel value of less than allWhite is mapped to black, otherwise to white. Finally, the lowVal is the pixel value in the bit image for pixels in the source image that are considered to be black after the thresholding.
byte_compute_threshold byteSrc percent
Return the threshold for which percent of the pixels fall below this threshold.
bit_make_from_threshold8 byteSrc bitDest threshold
Create a BitImage dest from ByteImage src, consisting of the values 0 for each pixel in src that falls below threshold, and 1 for each pixel in src that is greater than or equal to threshold.
byte_make_from_threshold_8 src dest threshold lowVal
Functionally the dame as BitMakeFromThreshold8, except the destination is a ByteImage, and lowVal is either 0 or 255.
byte_make_from_bit_8 src dest
Converts the BitImage src to the ByteImage dest, mapping 0 to 0 and 1 to 255.
byte_smooth byteSrc byteDest passes
Smooth the content of buffer srcBuf by applying the Gaussian numPasses times and write the results into destBuf. For efficiency, ByteSmooth allocates space on the stack instead of the heap, meaning a constant amount must be allocated. The constant SCRATCHSIZE defines this amount, and may need to be changed for very large byte images.
byte_smooth_gaussian byteSrc byteDest sigma
Performs a Gaussian smooth on the source ByteImage src, with a radius of sigma, and write the results to the ByteImage dest.
byte_edge_detect_sobel byteSrc byteDest1 byteDest2 percent thresh1 thresh2
Apply a row vector and column vector of the form [-1 0 1] to ByteImage srcBuf. The results of the row vector are written into ByteImage dest1Buf and the results of the column vector are written into dest2Buf. Output a pair of thresholds; thresh1 corresponds to the percent of pixels in dest1Buf, and thresh2 corresponds to the percent of pixels in dest2Buf.
byte_edge_detect_canny src dest t_low t_high
Apply the Canny edge detection algorithm to ByteImage src and write the results to ByteImage dest.
bit_dilate_horizontal_8 src dest
For every pixel that is set (has value 1) in the image src, the corresponding pixel in dest is set along with its left and right neighboring pixel.
bit_dilate_vertical_8 src dest
Same as BitDilateHorizontal8 except the top and bottom neighbors of every pixel in src are set in dest, instead of the left and right neighbors.
bit_dilate_8 src dest
For every pixel with a value of 1 in BitImage src, set its neighboring pixels to 1, and write the results to BitImage dest.
bit_erode_8 src dest
The inverse of the dilation operation. Every pixel that is set in src, but is NOT completely surrounded by set pixels, is unset in dest.
bit_count_overlap buf1 buf2
Return the quotient of the number of bits in the intersection of buf1 and buf2 by the number of "1" bits in buf1.
bit_count_overlap buf1 buf2
Same as BitCountOverlap8, except there is no requirement for the images to be byte aligned.
bit_all_white buf
Tests if buf has no dark pixels.
bit_compare buf1 buf2
Returns the ratio of the number of pixels set in the intersection of the two images to the number of pixels set in the union of the two images.
bit_compare_blocks bit1 bit2 blocksize
For a block size of sizeXsize pixels (size is usually 8 or 16 pixels), return the average absolute block difference.
bit_find_centroid buf val xmean ymean
Returns the X and Y coordinate of the centroid of the set pixels in buf.
byte_gradient_full buf
Returns the gradient at every pixel in the X direction in dx, the gradient int the Y direction in dy, and the square of the magnitude of the gradient at each pixel in mag.
byte_find_background_intensity buf
Returns the average pixel value of the background of buf, assumed to be a slide master.
byte_find_bounding_box buf px py
Given a frame of video with the registration slide in buf, and the centroid location in px and py, this determines the corners of a bounding box in which to search for the real corners of the registration slide.
byte_find_outer_corners buf ix0 iy0 ix1 iy1 ix2 iy2 ix3 iy3
Given the bounding box points as returned by ByteFindBoundingBox, this returns the corners of the registration slide.
byte_make_from_bit_intersect r g b src1 src2
A visualization tool for BitCountOverlap. Shows the pixels in the intersection of src1 and src2 in black, pixels in src1 not in src2 in red, and those in src2 but not in src1 in green.
Last updated : Saturday, November 14, 1998, 07:50 PM