One you convert your image to gray-scale you cannot got back. You have gone from three channel to one, when you try to go back all three numbers will be the same. So the short answer is no you cannot go back. The reason your backtorgb function this throwing that error is because it needs to be in the format:
CvtColor(input, output, CV_GRAY2BGR)
OpenCV use BGR not RGB, so if you fix the ordering it should work, though your image will still be gray.