cartoon and bilaterfilter implementations + more