Protocol for Structure Sensor Pro in the Nyhus Lab
For further information, see https://sccn.ucsd.edu/mediawiki/images/5/5f/Get_chanlocs_userguide.pdf
Consent
Due to the fact that facial features will be captured through this scan, it's imperative the participant signs a form of consent, allowing us to obtain their 3D scan
Scanning Notes
The Structure Sensor works best indoors or outside of direct sunlight
Scanner Calibration
Connect the Structure Sensor Pro to an iPad
Open the “Calibrator” app for Structure Scanner
Press “Start Standard Calibration” and select the bracket used on your device. Then, click “Begin Calibration”
Click enable indoor mode (advanced) and click okay when prompted
Follow the IPad instructions and use the indoor calibration target printout (the Pollock Calibration paper) to calibrate the sensor
Press start tutorial in the “Almost Done” box when prompted
Follow the instructions in the app to refine the calibration, aligning the depth with the color
The scene you use to refine the calibration needs to have depth, so don't use the indoor calibration target. Instead, point the camera at the room and line up the colors to match the depth.
Press “save calibration”
After calibration, scanner box should be filled in with color “red” as much as possible
Once calibration is saved, exit the “Calibrator” app
Scanning a 3-D Model using itSeez3D App (Recommended)
Open the “ItSeez3D” application
Select “New Scan”, and then “Scan bust”
Select “United States” when prompted to “Please select a country”
Select “Maine” when prompted to enter a state
Follow the instructions given to 1. Prepare the scene, 2. Start Scanning, and 3. Bust Scanning Process
Press “try now” when prompted
Allow access to camera
Ensure there is enough unimpeded space (0.5-1 meters) on all sides of the participant to ensure proper room to capture entire 3D scan
Place the appropriately sized electrode cap on the participant’s head, but make sure that the electrodes ARE NOT IN PLACE YET during the scan
If the electrodes do need to be in place, ensure that their wires do not occlude the image of the other electrode sites
Use red sticker dots to mark the three fiducial points before scanning
Recommend that you use red 0.25” dots from any office supply store
Put the red oval frame over the participant’s face
Once at a proper distance, press the start button
Make sure to include the shoulders, not just the head, in your scan for the best results. Walk continuously around the subject only one time.
If there are missing areas when the scan is done, simply restart the scan
Check the newly scanned head model using the Low-Res preview mode. Then, if you want a higher-res image, cloud based processing can be used to return a hi-res model by clicking that option (takes 5- 10 mins to generate hi-res scan)
Ask for the head model to be processed with 400k uniform polygons
Ensure three fiducial points are visible
No holes in model head image
No blurriness/overlap of images (artifacts)
Ensure back and sides of model are not too dark and top of model is not too bright to accurately mark electrode centers
To export 3D-Scan, payment or an account is required. Ask Professor Nyhus for any required information needed to successfully export the model and provide her with any receipts.
Once exported, ensure that all of the following files are obtained:
.obj
.jpg
.mtl
.txt
Additional files might be present as well, including a .png file
The Get_Chanlocs program requires a scan to be in millimeter scale. If you go through data processing in Matlab and you cannot correct erroneous channel locations properly, it is likely that the scale of the scan needs to be changed from centimeters to millimeters. If this is the case, email the 3D scan to support@itseez3d.com and ask them to change the scale for you.
Place all of these files into one folder that is downloaded onto your computer’s desktop. Ensure that you know the exact location of this file.
Common pitfall: If you are unable to start the scan because it keeps telling you the subject is either too far or too close, and you can't resolve that by moving farther or closer, you might have one of two issues:
When you refined the calibration you didn't have depth in your scene (e.g. you refined it using the indoor calibration target and not the room around you).
The subject is wearing glasses. Glasses really mess with the scan for some reason. Just have the subject take them off.
Asking for the head model to be processed with 400k uniform polygons:
The head model needs to be processed with 400k polygons for it to be of sufficient quality when imported into Matlab.
To achieve this, you need to reach out to ItSeez3D via email and ask for your head models to be processed with 400k uniform polygons.
Make sure to do this before you start collecting head scans. They can only go back 3 months to re-process head scans, so it's best to ask for that early in your process.
When the change is made, you won't see any difference in the ItSeez3D app, but when you import the head scans into Matlab and open them they should look almost identical in quality to how they looked in the app.
If you encounter any troubles, speak with Professor Nhyus. If you feel as though you need additional contacts, use the following emails to send questions:
For questions regarding EEGLAB:
eeglablist@sccn.ucsd.edu
arnodelorme@gmail.com
For questions regarding ItSeez3d:
support@itseez3d.com
Scanning a 3-D model Using the Structure Company’s Scanner App (another alternative)
We recommend using the ItSeez3D application (see instructions above) rather than the standard Scanner App as it produces higher resolution scans and exporting .obj files is much more intuitive. However, as an alternative means of obtaining a 3D scan, the following instructions can be used:
Stand about 1m away from the object or person before scanning
Make sure that you have an unimpeded 360 degree path around the object or person so you can capture an entire scan easily
After the scan is complete, select “Color View” tab on the Scanner App
Finish processing the Color View before emailing the file
Otherwise, the .zip file will only contain the .obj file but not the .mtl and .jpg files
Downloading get_chanlocs
get_chanlocs is an additional plug-in that’s available for your EEGLAB through FieldTrip. Through this tool, we can locate electrode positions from a scanned 3D Object. To download get_chanlocs, use the following instructions:
Open the following link:
https://sccn.ucsd.edu/eeglab/plugin_uploader/plugin_list_all.php
Find “get_chanlocs”
Click “Download”
Once downloaded, you will have a get_chanlocs.zip file
Open the zip file to create a new get_chanlocs folder.
Move this get_chanlocs folder into the “Plugins” folder that was created within the EEGLab folder
Reset the path to this folder.
Again, if you encounter any issues with EEGLAB, please meet with Professor Nyhus. The following information can also be contacted
For questions regarding EEGLAB:
eeglablist@sccn.ucsd.edu
arnodelorme@gmail.com
Post Processing in Matlab
Open Matlab and set the path to your folder containing the EEGLab package and the get_chanlocs plugin.
On “Home” tab, select “Set Path” and then “Add with Subfolders”, then select the folder on your computer that contains EEGlab
Make sure that the get_chanlocs plugin is inside the “Plugins” folder within your folder that contains EEGlab (get_chanlocs won’t work properly otherwise)
Call EEGlab in the command window by typing “eeglab” and then hitting enter
A purple pop up window should open
In the new EEGlab window, select “File”, “Import Data”, “Using EEGlab functions and plugins”, “From Brain Vis. Rec. .vhdr file”
Select the EEG data file that you would like to work with.
In order to import the scan, must have pre-existing EEG data available and already preloaded
Click okay to skip through the pop up window and and then type a title for your dataset
To import your head scan, select “Tools” in the eeglab pop-up window and select “Locate electrodes on a 3D head image”
Hit “browse” and navigate to the folder containing your .obj, .mtl, .png, and .jpg files. Select folder this in the pop-up window as the “input folder”
The output window will automatically default to the proper settings
Hit “Okay” to advance. A 3D head image will appear in a new window.
Rotate the 3D image using the “Rotate 3D” command under the “Tools” tab. Clicking and dragging the image is one option to rotate the model, as well as use of the arrow keys.
Follow the instructions listed in the new window to select the fiducial points. A “*” will appear if you have marked it properly.
NAS- nation
LHJ- Left helix/ tragus junction
RHJ- right helix/tragus junction
If you make a mistake when marking any of these points, press “r” to remove the last added mark.
You can also rotate the 3D image using the “Rotate 3D” command under the “Tools” tab. Be sure not to click on the model when rotating as it will add unnecessary points.
When all 3 fiducial points have been selected, press “q” to advance. It will make you mark the fiducial points twice and this is okay.
Each selection of the fiducial points should not differ more than 2mm
A pop-up window should appear after pressing “q,” which will give the option of creating a new template or using an MNI template (recommended). If you have no pre-existing templates, select the MNI Template.
If you want to use this head model as a template for use in the future, you can also select “Create new template” to save it for later use.
Your head model will reappear in the window. If you are using the MNI template (recommended), simply begin selecting electrodes on the head model by clicking on them. A “*” will appear if it has been selected properly.
It does not matter about the order of electrode selection in this stage as channel labels will be automatically generated later.
Once all electrodes are selected, press “q” to continue. The automated channel pairing assignments will pop up in a new window (Figure 2).
Get_chanlocs will automatically pair each electrode location with the corresponding electrode location on the montage template
Errors may occur when using get_chanlocs as described in step 16a.
Montage template electrode locations are seen as blue circles and newly selected electrode locations are plotted as black circles
Electrode pair assignments are connected by red lines
Inspect for lines that do not seem to belong to the vector field, as well as unusually long lines (See picture below). These are mistakes that must be corrected
If no mistakes, are found, press “q” to quit and proceed
To correct a mistake, click on the line of interest and press “r” to remove the incorrect locations
Next enter the channel/index indices to remove
Press ‘s’ to select new location pairings
After removing the mistake from the list, a new location for this electrode must be selected to make the correction
Number of electrodes in montage template must equal number of electrodes in your template
After you remove the erroneous electrode pairings, press “s” again to select and locate any electrodes that are missing
You will see that previously selected locations will be indicated by red spheres
Unmarked electrodes will not be indicated by red spheres, making them easily identifiable
Click on the electrodes that are unmarked to mark them with an (*), then press “q” to quit
After pressing “q”, press “c” to compute pair assignments again
Updated channel pair assignments will appear at this time
Inspect these revised pairings again. If they are okay and correct, press “q” to quit
Otherwise, if you need to continue to make changes, repeat the fix-up procedure using “r”, “s”, “c”, and “q”.
DISCLAIMER: The Get_Chanlocs program requires a scan to be in millimeter scale. If you go through data processing in Matlab and you cannot select unmarked electrodes properly, it is likely that the scale of the scan needs to be changed from centimeters to millimeters. If this is the case, email the 3D scan to support@itseez3d.com and ask them to change the scale for you. If there is a scaling issue, you may get an error like the one you see below:
Once the electrode positions have been corrected, get_chanlocs will then do the following:
Save a “get_chanlocs.txt” file that records the electrode labels and locations
Import this file and save its contents in the EEG dataset structure under EEG.chanlocs
Output a command line statement of electrode localization completion by stating “Electrode location selection finished…”
For clarification on any of the steps outlined above, please refer to the power point given in the following link before consulting with Professor Nyhus. If questions still remain, feel free to address your concerns with her: