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