An image is uploaded to the VI for the computer on which the VI is running. The image is displayed and the user is prompted to choose a face color from the image by clicking on the image. The color of the pixel selected from the image is displayed, and a button to add the face color appears. After the user selects the color they want and presses the add button, the user is given a choice to select more face colors or to add hair colors. In this way, the user selects all face colors, then hair colors, then clothes colors, then lips colors, and finally background colors. As colors are selected, they are added to arrays for face, hair, clothes, lips, and background colors, and the recolored image is built in real time. Each of the steps are shown below.
After all the colors are selected, two images are created: one image recolored with all the selected colors, and one image recolored with two face colors, a hair colors, a clothes color, a lips color, and a background color. The image recolored with 6 colors is then rescaled using the maximum resolution specified. This rescaled image is encoded into a 2x2 array and passed to the myRIO as a shared variable.
Original
Selected Colors
6 Color
Rescaled