case 1:
                    switch ((int)channels) {
                        case 3:
                            code = CV_GRAY2BGR;
                            break;