No. The batteries would still be powering the lights indirectly. Think about it this way: if the bike doesn't move, the dynamo doesn't turn. How does a pedal bike move? The human turns the pedals. How does an electric bike move? The battery turns a motor. Therefore the human (or battery) is indirectly powering the dynamo..
You can do this two ways:
Battery => DC/DC converter => 12V lighting system
Battery => motor controller => motor => dynamo => 12V lighting system
DC/DC converter is probably 90-95% efficient.
Motor controller is probably 97+% efficient.
Motor is 85-90% efficient typically.
Dynamo (kinetic energy to electric energy) is probably
60-70% efficient at low speeds, and gets much worse at high speeds unless you could build in some type of variable resistance.
Worst case vs best case,
90% vs 97% * 90% * 70% =
61%.
There's some debate about dynamo lights vs battery-operated lights in the pedal bike community as well.. though this may be done with the introduction of affordable LED headlamps. You could even have a hybrid battery/dynamo (or
capacitor/dynamo) setup, as in a ICE motorcycle or car .. which would give some of the advantages of both along with increased weight.
http://nordicgroup.us/s78/experts.htmlHere's a review of various hub dynos for a pedal bike, take a look at the power requirements (page 3) to operate a 3W (nominal) headlight:
http://www.bikequarterly.com/VBQgenerator.pdf