Is it safer to carry on undergraduate research areas to gradschool or start from scratch in an unknown area? This question is in spirit a very general one. When a person (say in CS) is choosing among multiple options for gradschool, which one would experience and prudence point towards? Along with research interests and all that, things to factor in would be the extra strain involved, to be honest.

Case in point:


Choice A: PhD advisor in the field of computer vision and machine learning. My undergrad experience was mostly in image processing, with one instance of training a rather vanilla backprop neural network. So this would be pretty much be building on the base of undergrad research experience. Yeah, the school is a tough one, and my math background is rather sparse. lots of catching up to do on the maths front.
Choice B: PhD advisor does work in graphics. mostly interactive graphics, lighting models and all that. These are topics i am vaguely familiar with, never having taken a graphics course during undergrad. Nor did any research project on that. Its a fresh topic for me, but I am not qualified enough to judge whether to pursue this or not.
If you start by thinking about what's safe as an undergrad/grad, I think you may experience (unpleasant) surprises down the road. Do what you like best! Grad school is not an easy path, and motivation is sometimes hard to maintain throughout, so the best way to help your chances of success is actually to do something that you enjoy (and hopefully will enjoy for the next few years).