Hello, Hiroshi. #1 has no context, but both phrases ('I didn't realize who you were' and 'I didn't recognize you') can be used in both #1 and #2. 'I didn't recognize you' normally applies to an individual that you know.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.