I've tried Musicscan or MIDIscan (forget which) and found it to be less than perfect. Although I'm not really a keyboard player, I can get a MIDI file much more quickly and accurately by playing it on my MIDI keyboard using my sequencing software to capture it and save as a MIDI. Even if the scanning program worked well I think its value would be doubtful if you are only trying to capture a melody.
The sequencing software I use is called Musicator Audio which is (was??) distributed in Australia by Roland. It prints scores in very fine detail, much finer resolution than the screen is capable of, transposes guitar chords if you transpose the piece, etc etc. It's also a hard disc recorder allowing up to 16 tracks of audio to be recorded and mixed down just like a recording studio (but get a BIG hard disc).
It wasn't cheap, and there are probably better and cheaper programs around now but it's what I've got and it does the job well. I'll post the URL of their web page later if it's still there.