head	1.1;
access;
symbols;
locks; strict;
comment	@// @;


1.1
date	95.01.31.07.19.01;	author rjj;	state Exp;
branches;
next	;


desc
@The header file describing the hough line object.
@


1.1
log
@Initial revision
@
text
@// hough-line.h         Section: 10.3, Line Detection using the Hough Transform
//      Copyright 1995, Center for Computer Vision and Visualization,
//      University of Florida.  All rights reserved.
//
// Define a Hough line, given sufficient information.  Support plotting
//    the line on an image.


#ifndef  _hough_line_h_
#define  _hough_line_h_

#include "BitDI.h"

class  HoughLine {

    // A Hough line is defined as the normal to the line
    //   (rho,theta) where:
    //      -max_R <= rho   <= max_R, and
    //      0      <= theta <  pi

public:
    // A hough_point is a index into an accumulator table
    //   with  2*positives_rows +1  rows and
    //   with  columns              columns.
    // The rows span the inteval from [-max_R,+max_R], and
    //   the columns span the interval from [0,pi).

    HoughLine( const IA_Point<int> & hough_point,
	       unsigned int  positive_rows,
	       unsigned int  columns,
	       double max_R );

    void  plot( IA_Image<IA_Point<int>,IA_Bit> & image );

private:
    double  rho, theta;
    IA_Point<int> hp;

    // Plot using the formula:  rho = x*cos(theta) + y*sin(theta).
    // If  i_coord == 0, plot as function of X-axis.
    // If  i_coord == 1, plot as function of Y-axis.
    void
    plot_indexed( IA_Image<IA_Point<int>,IA_Bit> & image,
		  unsigned int i_coord );
};
#endif
@
