Why there is RC filter between optocoupler and schmitt trigger?
The purpose of the RC filter is to filter any spikes that may show up on the signal line.  Whether such a filter is needed depends upon your environment and the distance between the opto's output transistor and the device it's feeding.

The Schmitt trigger is used because the opto's output waveform, particularly when turning OFF, has slow edge speeds that may violate the transition time requirement of whatever the opto's output is being fed into.

If the opto is close to the 'HC14, I don't think the cap is needed.  But you still need a pullup to VCC on the opto's output since that is probably open collector.