Sensor to detect object made of cloth

Hello there,
I want to know is there any sensor, which is abble to detect ball made-up of cotton, silk or any cloth material.
I tried ir sensor, ultrasonic sensor but i am not getting accurate result.
Range of dection is 5cm to 30 cm.
It is very urgent so, can anybody guide me!

i am not getting accurate result.

What do you mean by "accurate"? What results DO you get?

Must the sensor NOT detect a rubber ball?