Black Box for Spontaneous Pain Videos - KravitzLab/KreedLabWiki GitHub Wiki

Parts & Files

This workflow is adapted from here- https://github.com/rslivicki/PixelPaws/blob/master/hardware.md

  • The only difference is we used a smaller sized camera box. Everything else should be the same.
blackbox

Pictured here is what our setup looks like inside the cabinet. Note that the box on the right is pulled out.

Bill of Materials (adapted)


Print Files (adapted for smaller camera box)

Bottom of the camera box and bottom tray (click to expand)
Top of the camera box (click to expand)
Mouse holder box with lid (click to expand)
  • Link: Black box mouse holder with lid
  • We poked a whole at the top to allow for a patch cord to pass through. Feel free to modify it however you'd like.
  • Suggested material: PLA+
  • We printed on Bambu Lab X1C using the default "0.20mm Standard @BBL X1C" setting.

More notes on the physical set up

  • When using OBS Studio for video recording, you need to install this Source Record extension so that you can save the combined video, as well as separate raw files from each camera before combining.

    • For those who are super curious, watch this YouTube video.
  • We kept our behavior boxes inside this IKEA cabinet and added this adhesive drawer slider from Amazon for easier setup the day of recordings.

    • We also marked on the view panel with a sharpie to indicate where the mouse holder box should be to make it easier to position them.

Recording videos (instructions specific to Kreed Lab)

[Recommended] Setup for video acquisition using PawCapture

Ask rich from rob's lab for specific help with the GUI

  1. Turn on the switch on the left side of the cabinet to switch on the IR lights.

  2. Open Paw Capture GUI. Both cameras should already be added in there.

image
  1. Load the profile named "CreedLab_HW_2cams".

  2. Change the output file directory to where you want your videos to be saved to.

  3. Once you're done setting these things above, you're ready to record!

    • After you place the mouse inside the mouse holder, adjust it so that the box is within the marked boundaries on the acrylic sheet.
  4. To clean up, make sure you use soap and water only (no alcohol) to clean the view panel and the mouse holder.

    • Unfortunately, 70% ethanol smudges the acrylic panel and melts away the 3d printed enclosure...
  5. When you're done for the day, please shut off everything, including the IR lights and the computer. Failure to do so will lead to overheating and a very disappointed look from Habby. Make sure to backup your video files onto a hard drive or on box.

[Follow these only if the other way doesn't work] Setup for video acquisition using OBS Studio

  1. Turn on the switch on the left side of the cabinet to switch on the IR lights.

  2. Open OBS Studio. Both cameras should already be added in there.

Capture
  1. Double check the camera settings by double-click on the source, then click on "configure video". Everything should be left as default, except for "Contrast" (set it to the highest) and "Saturation" (set it to the lowest). Also under "Camera Control", set "Exposure" to the lowest. Do this for all video sources.
Capture1

Note that this is where you can also change the resolution as well as the FPS. We set the resolution to "1280x720" and FPS to "Match Output FPS" so that the combined videos and raw individual videos have the same FPS.

  1. Verify that the output settings are set properly.
    • On the main screen, go to "File" > "Settings" > "Output" > "Recording", you can change your recording path there.
    • If you would like to change the FPS, go to "File" > "Settings" > "Video" > "Common FPS Values". Please change the FPS setting here only so that the raw individual videos all have the same FPS. We use "60" here.
    • For individual sources, click on the source name and then click on "Filters". As pictured below as an example, click on "camera_right" to either change the path or the filename.
Capture2
  1. Once you're done setting these things above, you're ready to record! Note that you should only need to set the above once at the beginning of the recording day.

    • After you place the mouse inside the mouse holder, adjust it so that the box is within the marked boundaries on the acrylic sheet.
    • Simply click "Start Recording" and wait for however long you'd like to record them for. I record for at least 30 minutes.
  2. To clean up, make sure you use soap and water only (no alcohol) to clean the view panel and the mouse holder.

    • Unfortunately, 70% ethanol smudges the acrylic panel and melts away the 3d printed enclosure...
  3. When you're done for the day, please shut off everything, including the IR lights and the computer. Failure to do so will lead to overheating and a very disappointed look from Habby. Make sure to backup your video files onto a hard drive or on box.

⚠️ **GitHub.com Fallback** ⚠️