changed some variables to defines

For canny edge