I’m just starting out with Julia, and I’m reimplementing a seam carving application I originally implemented in Matlab. I’m trying to compute my image gradients using:
I’ve also tried explicitly using kernelfun=Kernel.ando3 and KernelFactors.ando3 but both of those give me an UndefVarError as well.
My main issue is that when I try and use imgradients in any fashion, I will either get an UndefVarError for the imgradients function or for the kernel function I am passing in. I believe I am importing the required packages correctly as well.
The top of my file has this using line:
using Images, ImageView, LinearAlgebra;
I believe that should be all I need. Is there anything obvious I would be missing?
I’ve also been looking at the source for imgradients and I can see that I am matching the type signature of the call, adding to my confusion.
I’ve actually solved my problem, I had my code in a module, but I had the Using’s outside of the module, as you would if you were creating a class in most other languages.
Thanks for the help anyways! Is there a way for me to close this topic as answered, or is that up to the moderators?
Yeah, I saw this a little while after. Thankfully I was just computing the gradient magnitude so it wasn’t harmful. It’s a mistake I make somewhat too often.