Update the module to use the opencv functions