Third-harmonic generation and its applications in optical image processing