How can I create unit test to HoughLines?

How can I create unit test to HoughLines?

Now I’m trying to contribute OpenCV by adding new function to Hough Transform; which name is weighted Hough(Feature/weighted hough by MasahiroOgawa · Pull Request #21407 · opencv/opencv · GitHub).
By checking existing unit test of Hough transforms, it requires the result of some images , which must be the same with the ones recorded in xml files(e.g. opencv_extra/testdata/cv/imgproc/HoughLines.xml)
But I couldn’t find the way to create such kind of output for my new Hough transform.
How can I create such xml files?

1 Like

I would guess, like so:
https://docs.opencv.org/4.x/dd/d74/tutorial_file_input_output_with_xml_yml.html

other tests also either read the reference data, or dump the generated data, so those tests must already be using this FileStorage

Thank you! I will check it.