/** * @brief OV2640 camera special effects. * @param index: * @retval None */ void OV2640_SpecialEffects(uint8_t index) { switch (index) { case 1: { LCD_DisplayStringLine(LINE(16), (uint8_t*)" Antique "); OV2640_ColorEffectsConfig(0x40, 0xa6);/* Antique */ break; } case 2: { LCD_DisplayStringLine(LINE(16), (uint8_t*)" Bluish "); OV2640_ColorEffectsConfig(0xa0, 0x40);/* Bluish */ break; } case 3: { LCD_DisplayStringLine(LINE(16), (uint8_t*)" Greenish "); OV2640_ColorEffectsConfig(0x40, 0x40);/* Greenish */ break; } case 4: { LCD_DisplayStringLine(LINE(16), (uint8_t*)" Reddish "); OV2640_ColorEffectsConfig(0x40, 0xc0);/* Reddish */ break; } case 5: { LCD_DisplayStringLine(LINE(16), (uint8_t*)" Black & White "); OV2640_BandWConfig(0x18);/* Black & White */ break; } case 6: { LCD_DisplayStringLine(LINE(16), (uint8_t*)" Negative "); OV2640_BandWConfig(0x40);/* Negative */ break; } case 7: { LCD_DisplayStringLine(LINE(16), (uint8_t*)" Black & White negative"); OV2640_BandWConfig(0x58);/* B&W negative */ break; } case 8: { LCD_DisplayStringLine(LINE(16), (uint8_t*)" Normal "); OV2640_BandWConfig(0x00);/* Normal */ break; } default: break; } }
/** * @brief Apply camera native effects * @param ieffect : effect index * @retval None */ void Apply_camera_native_effects (uint8_t ieffect) { if( Camera == OV2640_CAMERA) { switch (ieffect ) { case 1 : //Normal /* Do Nothing */ break; case 2 : //Antique OV2640_ColorEffectsConfig(0x40, 0xa6); break; case 3 : //Bluish OV2640_ColorEffectsConfig(0xa0, 0x40); break; case 4 : //Greenish OV2640_ColorEffectsConfig(0x40, 0x40); break; case 5 : //reddish OV2640_ColorEffectsConfig(0x40, 0xc0); break; case 6 : //Black & White OV2640_BandWConfig(0x18); break; case 7 : //Negative OV2640_BandWConfig(0x40); break; case 8 : //Negative B&W OV2640_BandWConfig(0x58); break; default: break; } } }