Back to Aurora Vision Studio website
	
                
                    
	
		
	You are here: Start » Filter Reference » OpenCV » Structural Analysis and Shape Descriptors » cvFitLine
| Module: | OpenCV | 
|---|
Fits a line to a 2D or 3D point set.
| Name | Type | Description | |
|---|---|---|---|
![]()  | 
				inPoints | Point2DArray | Input Point2D array. | 
![]()  | 
				inDistType | CvDistanceType | Distance used by the M-estimator. | 
![]()  | 
				inParam | Real | Numerical parameter for some types of distances. If it is 0, an optimal value is chosen. | 
![]()  | 
				inReps | Real | Sufficient accuracy for the radius [distance between the coordinate origin and the line]. | 
![]()  | 
				inAeps | Real | Sufficient accuracy for the angle. 0.01 would be a good default value for reps and aeps. | 
![]()  | 
				outLine | Line2D | 
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
| Error type | Description | 
|---|---|
| DomainError | Distance type can be DIST_* except DIST_C and DIST_USER in cvFitLine. | 
| DomainError | Input array must not be empty in cvFitLine. | 
Complexity Level
This filter is available on Basic Complexity Level.

 Basic
