I'm not sure about this, actually the only trick I could think of right now is to kill all running processes you (and the system) don't need, it'll save you some processing time that the Galileo could use for the image processing.
Also, does the line follower have to be digital? Because if it doesn't you could use an analog circuit which could be a much more easier solution to your issue.
If in fact you can use an analog circuit for the line follower I suggest you to take a look at this documents:
Intel Galileo Gen 2 Eurobot videos :-
what is the command that i can use to kill other processes can u explain please.
using color sensor is also a good idea i have already implemented it so it wont be a problem.
Well it's really simple actually, first you type "ps", it will show you the list of all running processes, at the left side of the list you will see the number of that process, so to kill the process you simply type "kill NUMBER OF THE PROCESS". So more info about these commands: