8000 The wrong line segment · Issue #5 · frotms/line_detector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
The wrong line segment #5
Open
Open
@MrLihj

Description

@MrLihj

This is my code:


`void main()
{
	Mat image;
	image = imread("1.png");
	Mat gray_image;
	cvtColor(image, gray_image, CV_BGR2GRAY);
	int W = image.rows;
	int H = image.cols;
	int image_size = W* H;
	unsigned char* input = new unsigned char[image_size];
	memcpy(input, gray_image.data, image_size);
	vector<line_float_t> Lines;
	boundingbox_t Bbox = { 0,0,W,H };
	float scalex =0.5;
	float scaley =0.5;
	int Flag = 0;
	Flag = LsdLineDetector(input, W, H, scalex, scaley, Bbox, Lines);
	cout << Flag << endl;
	for (int i = 0; i < Lines.size(); i++)
	{
		line(image, Point(Lines[i].startx, Lines[i].starty), Point(Lines[i].endx, Lines[i].endy), Scalar(0, 0, 255), 2);
	}
	imshow("image1", image);
	waitKey(0);
	system("pause");
}`


%`M}6JATF}_J4@GG2GN5PIT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0