Skip to content

daz/dji-thermal-sdk-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

DJI Thermal SDK Docker image

Dockerized DJI Thermal SDK, which includes example tools for processing and measuring some DJI thermal images.

Installation

docker build -t djithermal .

If you're on a different architecture, eg Apple Silicon, you might need to specify the platform.

docker build --platform linux/amd64 -t djithermal .

Commands

docker run -i \
  djithermal \
  dji_irp --help

Process an image to psuedocolor

docker run -i \
  -v "$(pwd):/work" -w /work \
  djithermal \
  /bin/sh -c '
    export i=/app/djithermal/dataset/H30T/DJI_0001_R.JPG
    dji_irp -a process \
      --palette iron_red \
      --colorbar on,40,10 \
      --source $i \
      --output process.rgb
    export resolution=$(identify -format "%wx%h" "$i")
    convert -depth 8 -size $resolution RGB:process.rgb process.jpg'

Extract a raw float32 thermal

docker run -i \
  -v "$(pwd):/work" -w /work \
  djithermal \
  dji_irp -a measure \
    --measurefmt float32 \
    --distance 25 \
    --humidity 77 \
    --emissivity 0.98 \
    --reflection 23 \
    --source DJI_0001_R.JPG \
    --output measure.raw

Process all images in the current directory, copying exif metadata from the original file

docker run -i \
  -v "$(pwd):/work" -w /work \
  djithermal \
  /bin/sh -c 'mkdir -p process && mkdir -p raw
  for i in *.JPG; do
    dji_irp -a process \
      --palette iron_red \
      --colorbar on,44,0 \
      --source "$i" \
      --output "$(pwd)/process/$(basename $i .JPG).rgb"
    resolution=$(identify -format "%wx%h" "$i")
    convert -depth 8 -size $resolution \
      RGB:"$(pwd)/process/$(basename $i .JPG).rgb" \
      "$(pwd)/process/$(basename $i)"
    rm "$(pwd)/process/$(basename $i .JPG).rgb"
    exiftool -overwrite_original -TagsFromFile "$i" -all:all "$(pwd)/process/$(basename $i)"
    dji_irp -a measure \
      --measurefmt float32 \
      --distance 25 \
      --humidity 77 \
      --emissivity 0.98 \
      --reflection 23 \
      --source "$i" \
      --output "$(pwd)/raw/$(basename $i .JPG).raw"
  done'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors