if(magick_config()$version > "6.8.9"){
shape <- demo_image("shape_rectangle.gif")
rectangle <- image_canny(shape)
rectangle |> image_hough_draw('5x5+20')
rectangle |> image_hough_txt(format = 'svg') |> cat()
}
Run the code above in your browser using DataLab