I'm a CS professor at a primarily-undergraduate U.S. college. I supervise two to four independent research projects or honors theses every year and have published papers and posters based on undergraduate research with my students as co-authors.
If you're going to pursue undergrad research, I don't recommend choosing based on field, but based on potential supervisors. Who are your favorite professors? What subjects have you really enjoyed and would like to explore further? A good project is at the intersection of what you're interested in, what your faculty mentor can realistically supervise, and what you can complete and bring to a good result in 1-2 years. You're going to get the best experience if you're able to work with a faculty mentor you like that can teach you about the research process and devote time to mentoring you. Those skills, more so than any specific project you complete, are what will help you be successful in grad school.
There are probably examples of successful researchers who started in one area as undergrads and stayed with it for decades, but it's more common to switch as your interests change and you get more exposure to different subareas of CS, particularly once you get into a grad program and get more exposure to the open problems in different fields. Grad schools will not require you to stick with the area or theme of research that you may have been pursuing when they accepted you.
To give you a concrete example: my first undergrad research project was writing a simulator for acoustic reverb. I continued working with the same advisor, but we switched to projects related to imaging and remote sensing, which led to experimenting with weird neural network architectures (before the current boom in deep learning really took off) and their applications to multispectral imaging. When I started my Ph.D. program, I was originally working on nonlinear optimization and its applications to sensors, but ended up switching to performance modeling and queueing theory, which became the subject of my dissertation. My research has evolved even more since I became a faculty member and shifted to working with real undergrads; I've recently been doing a lot of qualitative research with community organizations about their uses of data and analytics, which is only tangentially related to traditional disciplinary CS research.
If you're going to pursue undergrad research, I don't recommend choosing based on field, but based on potential supervisors. Who are your favorite professors? What subjects have you really enjoyed and would like to explore further? A good project is at the intersection of what you're interested in, what your faculty mentor can realistically supervise, and what you can complete and bring to a good result in 1-2 years. You're going to get the best experience if you're able to work with a faculty mentor you like that can teach you about the research process and devote time to mentoring you. Those skills, more so than any specific project you complete, are what will help you be successful in grad school.
There are probably examples of successful researchers who started in one area as undergrads and stayed with it for decades, but it's more common to switch as your interests change and you get more exposure to different subareas of CS, particularly once you get into a grad program and get more exposure to the open problems in different fields. Grad schools will not require you to stick with the area or theme of research that you may have been pursuing when they accepted you.
To give you a concrete example: my first undergrad research project was writing a simulator for acoustic reverb. I continued working with the same advisor, but we switched to projects related to imaging and remote sensing, which led to experimenting with weird neural network architectures (before the current boom in deep learning really took off) and their applications to multispectral imaging. When I started my Ph.D. program, I was originally working on nonlinear optimization and its applications to sensors, but ended up switching to performance modeling and queueing theory, which became the subject of my dissertation. My research has evolved even more since I became a faculty member and shifted to working with real undergrads; I've recently been doing a lot of qualitative research with community organizations about their uses of data and analytics, which is only tangentially related to traditional disciplinary CS research.