Here there are certain constants(macros) define that can be passed as an argument to set different color scheme. setColorScheme(schemeName ) – In this function you pass the color scheme name as argument.To refresh the data that the device has got from the mobile app, you have to use the following line of code: Dabble.processInput() Functionsįollowing are the function available for the Color Detector module: Default name given in the library is “MyEsp32”. In place of Bluetooth_Name enter name that you want to keep for Bluetooth of ESP32. With evive, you normally get 115200 baud rate modules. Here Baud_Rate is the baud rate set for the Bluetooth module. For evive and Arduino Mega, Uno and Nano.To enable Bluetooth communication, you have to initialize serial communication using the following code: evive, Uno, Mega, and Nano – Dabble-Arduinoĭepending on the board you are using.You can download the zip of Arduino Library for To include the Camera and Video module in the Arduino program, you have to include the following header: #define CUSTOM_SETTINGS #define INCLUDE_CAMERA_MODULEĪfter defining the above mention headers, you have to include the dabble library: #include You can control settings of the grid, color mode, the number of bits for color detection and color calculation mode from the user interface present in the module and also from commands sent through hardware. Note: avoid reflecting surfaces in flash on mode. Flash on/offĪs per the availability of light, you can choose flash to be on or off. In the average method, it averages the color of each pixel in the cell. It helps in projects where there is continuous change between colors. In the dominant method, color detection will find the most dominant color present in each cell. Value range (8-bit value for each color): max 255 and min 0.īelow image shows a 3×3 grid in grayscale color mode.ĭominant or Average. In the grayscale mode, one value of gray level will be transmitted for Red, Green and Blue components. In the colored mode, each cell will result in three values for Red, Green, and Blue. The image below shows a 3×3 grid setting with 15-bit color settings.Ĭolored or Grayscale. The bit size defines the number of color levels in which any image color will be classified. For e.g., in grayscale mode, set bit size of 1 to classify colors as white or black, and in colored mode, set bit size of 3 to classify a color between 8 colors (because red, green and blue can either be present or not, then there are 8 possible combinations). To easily handle the total number of distinct colors resulted after processing, you can select the resolution by setting the bit size. The video stream will be divided into the grid and each grid cell will result in one color. You can toggle between them with the help of preview icon present above flash icon on your screen. To visualize whether the Smartphone’s camera is positioned correctly, use this feature for toggling between the video stream and colors detected. This module process live video stream and detects colors as per the selected settings. Depending on the type of activities you want to do with your mobile camera the module is further divided into four modules each capable of executing a specific activity. The Camera module allows you to use your mobile camera for different activities like recording videos, capturing images, color detection, and face detection.
0 Comments
Leave a Reply. |