In the first picture, you are clearly strained (because of her head?) and as a result your leg has come forward a little bit and probably off the horse. Many horses who throw their heads up begin to jig and jag and lose all rhythm. The rider senses the horse is nervous and removed leg contact, begins to strain their back muscles, stiffen their shoulders and arms, drops their hands (thinking it is a lighter contact), and therefore rides the horse incorrectly.
What the horse really needs is steady leg and rein contact with a relaxed rider (in as correct a position as physically possible for the rider). Your second picture resembles a much more correct position, your leg could come back a tad bit more, and your shoulders maybe a tad back (i'm a dressage/saddleseat rider by nature so i'm sure others would disagree) but otherwise a good position for your shoulders, hips, ankles. Your hands however (I know you've given reasons for your broken contact, but listen to what I have to say) should be above the withers, to fists straight up and down (think like your going to punch someone) with your pinky directly below your forefinger and thumbs closed on top of your forefinger if that makes sense. (like this.. http://colleenkellyriderbiomechanics...-parelli-2.jpg
Now, if she raises her head- raise your hands slightly to match it and constantly remember relaxation. Your fingers can relax without opening. You simply relieve any pressure or contraction of the muscles while keeping the position of the fingers and hands. If you need to open your fingers at all, it should not look visibly different, and only you should know that your fingers are slightly open.
Remember to stay back and relaxed through your whole body. A big problem of mine with horses who raise their heads is closing my hip angle and tilting my upper body forward to meet their heads. This throws the horses balances on the forehand and does nothing to fix the head problem. You do not look like you have this problem, but you need to remember to stay relaxed through your whole body.
Your whole body should follow the motion of the horse fluidly, as if you are one being. At the canter, your hips should move backwards and forwards with the motion of each stride, while staying in your seat and your shoulders staying fairly back with a less exaggerated following of the canter. Your hands should also follow the motion of the canter, while the rest of your arm stays relaxed (and remember your hand position!) to allow the horse's head to move with each stride. Your legs should remain relatively still, contact firm depending on how much contact the horse needs to maintain the stride.
Now many horses who throw their heads up appear to want less leg contact, but in reality need more- or at least steady contact. If your legs are shaky or weak (they don't appear so), you need to work very hard to keep them still. If you have a strong leg, then you need to use it at all times, making sure to keep a consistent contact. Do not brace your legs or body against her resistance (two wrongs do not make a right, just because she is resistant does not mean you should be!), meet it with relaxation.
Finally, start at the walk. once you get proper relaxation at the walk- start small trotting intervals. Do not stop trotting until you get her to relax her head (even just for 3 or 4 seconds) the proper way (using your body!). Before you cue her to walk, rub her neck (preferably while still relaxed) and tell her she is a good girl (she will know that you want her to relax) and ask her to walk. Walk for the length of one side of the arena and ask for the trot again repeating the exercise. Keep canter intervals even shorter. You want to perfect the trot before you move on to the canter.
Another good thing to keep in mind for horses with fussy heads is keeping their mind occupied. Serpentines, circles, figure eights, changes in directions, transitions, trot long side walk short side, etc. These will also help you and challenge you to get relaxation out of her in a short amount of time. You can keep her mind occupied without overwhelming her or boring her. Often times you will find them relaxing their heads simply because they cannot concentrate on throwing their heads up while circling or serpentining or expecting a transition. (Do not make it too easy and let them anticipate- they will lose a lot of relaxation through anticipation, so be sure to constantly change it up while keeping the core focus the same: relaxation in figures, transitions)
Good luck! =]