I have tried that. Computer recognises ipad but same error.Welcome to iPad Forums!
Make sure computer and iTunes are up to date.
Force your iPad to restart:
Press and hold Home and Power button simultaneously until you see the Apple logo. As soon as it’s visible, let go of both buttons. Your iPad will power up on it’s own.
Then connect your iPad to the computer and try restoring again.