hed
hed copied to clipboard
How to process images in real time
Hello, I would like to ask, for this algorithm, can I process some of my own pictures in real time, and from which aspects to improve it
Yes, it is possible. You may need to modify the test function (see: https://github.com/xwjabc/hed/blob/master/hed.py#L257) and use your own image as input.
Excuse me, if I use the canny edge processing algorithm, how do I get ODS and OIS? Because I want to use ODS and OIS to compare canny and HED algorithms to compare their gaps in processing at the edge.
The current edge evaluation process in HED is:
(1) Generate probabilistic edge maps w/ HED network (i.e., .mat
files in mat
folder and png images in png
folder) -> (2) NMS process to convert the probabilistic edge maps to thinned edge maps (i.e., png images in the nms
folder) -> (3) Evaluate the thinned edge maps.
For Canny edge detection algorithm, I think the outputted edge maps are already processed after NMS. Thus, you may directly evaluate such edge maps using step (3). You can refer to this part for the evaluation of the thinned edge maps.
After taking a look at your test code, I would like to know how to generate a MATAT file from a PNG image of Canny
I think you do no need to generate MAT file for the step (3) since its input format is png. You can directly feed the generated png files from Canny edge detector into the evaluation step.
If you still need to save images as MAT files, you can use savemat()
function in scipy.io
. See this line for an example.