Just look at the Suzuki system. The kids who learn to play an instrument following faithfully the Suzuki method might have weaker sight-reading skills, but they all develop perfect pitch. Listening for many hours a day to their pieces being performed on tape (which is required for them) plays a significant role here.
So if you can learn to have a perfect pitch through practice and immersion into the musical world all day long, how can improvisation also help you develop it?
The answer lies in understanding the phenomenon of perfect pitch. It has many things to do with your memory. You see, when these kids listen to the musical compositions for many hours a day, the correct musical sounds are ingrained into their memory and so little by little they learn to guess and hear the right notes.
Improvisation also has many things in common with memory. When you sight-read unfamiliar pieces or practice your own organ compositions, every day you discover something beautiful, something worth memorizing, something worth using in your own improvisations later on. This maybe a fragment, a passage, a chordal progression or an interesting texture that your fingers and feet have to get used to and internalize.
If you want to learn from previously composed models, then you simply memorize these passages, fragments, cadences etc. Moreover, you also transpose them from memory into all possible keys. This way the musical material that other masters have created becomes your own and you can later recreate it and incorporate it into your improvisations. A side effect of memorization is of course the development of perfect pitch.
For people who don't have a perfect pitch and who still doubt my assumption that improvisation can help develop perfect pitch, I leave these two questions to answer:
1. How many pieces can you play from memory right now?
2. How many pieces can you transpose from memory?
I have no doubt that if you can improve the results from your answers to these two simple questions over the next 6-24 months, a perfect pitch will be easier to acquire.
By the way, I don't think that perfect pitch is the ideal we should all strive to develop. In the world of historical instruments with historical tunings and pitch levels, when the treble A can be anywhere from 415 to 465 Hz (not only 440 Hz) a perfect pitch only gets in the way of understanding music (for example, I can personally testify that hearing C major prelude as B major or Db major is no fun at all - you have to override your perfect pitch in such cases).
I believe that more important than having a perfect pitch is to have a deeper understanding of musical composition, of creative processes, of how the pieces are put together, and developing your own creativity through improvisation and composition. But I'm aware that for some people having a perfect pitch means to be an ideal musician and improvisation can also help to achieve this.