Hi owners!


For an easier, faster, and less expensive method please check out our Cloud services




In this article, we will explain to you how to incorporate a script that we have created in order to change the photo the camera takes to create a cartoon effect!


To use this feature, you will need to first have a preset pack which was created on October 2023 (and onwards). 

You will also need to make sure you have a stable internet connection.


The way that the script works is that it sends the photos that the camera takes to an AI tool which adds the effect and sends it back to the software. And all of this in real-time!



TABLE OF CONTENTS




Get an API:


1. Use this link to create an account

2. Once you are logged in to your account, you can get your API key. Click on the API Key tab to find your API Key

 



3. Copy and paste the API that was generated for you and save it in a text file for future use.


Implementing the API: 


1. Open your Preset Pack.

Click to open the file explorer and go to This PC/C: drive/MirrorMeBooth/Events/MyFirstEvent/Raw 


2. Locate the AI_Cartoon.bat file, right-click it, and select Edit. 

This will open a notepad file.


3. In the notepad, replace where it says YOUR_API_KEY with the key you copied earlier.


4. Save.


* You can use this file in different event folders, but if you do - make sure to edit the file again and change the path to match your event name. 

For example, If you use the MyFirstEvent folder, the path in the script will appear to be: C:\MirrorMeBooth\Events\MyFirstEvent\raw\temp.jpg



Make sure to keep the .bat file in the Raw folder of your Event folder



Photo Layout Setup:

Even if you are using a vertical photo preset (DSLR_270/90) you set the DLSR element in the photo layout tab to 0 degrees angle and make sure that the Height of the photo is bigger than the width, and the ratio should be 0.66667


Add the desired background photo and place it behind the DSLR element in the Photo Layout tab



Workflow Setup:

1. Add an External Script state in your workflow and load the .bat file created.


2. Add another Feature state of Reload Raw Photos. Make sure to place at least one animation state in between, to give a short time buffer so the script will be applied (it takes ~5 seconds)





A little Extra:

You can use the same script we provide and create different types of cartoon effects! 

Below you will find the options available and in order to use them, replace the number 10 in our script with the corresponding number (and special character, if needed) of the effect you wish to apply.



Here are the options and their corresponding numbers (number 10 is the default in the script provided):





That's it!