How can i get the thermal data from a dji mavic 2 enterprise image? - dji-sdk

I am trying to get the thermal image data from a photo taken with mavic 2 enterprise.
I ran exiftool on the thermal image and i can't find the thermal data.
I expect to find the following fields (espicially Raw Thermal Image binary data)
Raw Thermal Image Width : 640
Raw Thermal Image Height : 512
Raw Thermal Image Type : TIFF
Raw Thermal Image : (Binary data 655564 bytes, use -b option to extract)
Emissivity : 1.00
Object Distance : 2.00 m
Reflected Apparent Temperature : 22.0 C
Atmospheric Temperature : 22.0 C
IR Window Temperature : 22.0 C
IR Window Transmission : 1.00
Relative Humidity : 50.0 %
Planck R1 : 366545
Planck B : 1428
Planck F : 1
Atmospheric Trans Alpha 1 : 0.000000
Atmospheric Trans Alpha 2 : 0.000000
Atmospheric Trans Beta 1 : 0.000000
Atmospheric Trans Beta 2 : 0.000000
Atmospheric Trans X : 0.000000
Camera Temperature Range Max : 120.0 C
Camera Temperature Range Min : -40.0 C
Camera Temperature Max Clip : 99727.0 C
Camera Temperature Min Clip : -273.1 C
Camera Temperature Max Warn : 99727.0 C
Camera Temperature Min Warn : -273.1 C
Camera Temperature Max Saturated: 99727.0 C
Camera Temperature Min Saturated: -273.1 C

Related

How to capture windows 10/windows 11 advanced display settings for multiple monitors

I am trying to capture the following displays information connected to my laptop programatically using powershell but I am unable to find a way. This information can be found via the windows GUI at Settings > Display > Advanced Display Information (2 screenshots attached below).
Here's the information I am trying to capture
Display Name: (In this case, display name for internal would be but the external one would be "ASUS VP 228)
Display Resolution: 1680x1050 and 1920x1080 for the 2 displays
Whether it's an internal/external display: True and False
Refresh rate: 60Hz and 60Hz
Here's what I've tried
Get-WmiObject win32_videocontroller
Returns the resolution under parameter VideoModeDescription but even then, it seems to return the value of "Active Signal Resolution" (from the screenshot) below).
Get-WmiObject Win32_Desktopmonitor
DeviceID : DesktopMonitor1
DisplayType :
MonitorManufacturer : (Standard monitor types)
Name : Generic PnP Monitor
ScreenHeight :
ScreenWidth :
Only get output information for 1 out of the 2 monitors and don't get ScreenHeight or ScreenWidth` values.
get-ciminstance -namespace root\wmi -classname wmimonitorbasicdisplayparams
Active : True
DisplayTransferCharacteristic : 120
InstanceName : DISPLAY\IVO8C66\5&462698&0&UID256_0
MaxHorizontalImageSize : 31
MaxVerticalImageSize : 17
SupportedDisplayFeatures : WmiMonitorSupportedDisplayFeatures
VideoInputType : 1
PSComputerName :
Active : True
DisplayTransferCharacteristic : 120
InstanceName : DISPLAY\ACI22C3\5&462698&0&UID265_0
MaxHorizontalImageSize : 48
MaxVerticalImageSize : 27
SupportedDisplayFeatures : WmiMonitorSupportedDisplayFeatures
VideoInputType : 1
PSComputerName
Gives me the correct monitor count but doesn't give me any other information.
I then tried using the DumpEDID tool and it gave me more information but didn't give me current monitor resolution or whether it's an internal display or not.
DumpEDID v1.07
Copyright (c) 2006 - 2018 Nir Sofer
Web site: http://www.nirsoft.net
*****************************************************************
Active : Yes
Registry Key : DISPLAY\ACI22C3\5&462698&0&UID265
Monitor Name : ASUS VP228
Serial Number : G6LMTF155938
Manufacture Week : 26 / 2016
ManufacturerID : 26884 (0x6904)
ProductID : 8899 (0x22C3)
Serial Number (Numeric) : 155938 (0x00026122)
EDID Version : 1.3
Display Gamma : 2.20
Vertical Frequency : 50 - 75 Hz
Horizontal Frequency : 24 - 83 KHz
Maximum Image Size : 48 X 27 cm (21.7 Inch)
Maximum Resolution : 1920 X 1080
Support Standby Mode : No
Support Suspend Mode : No
Support Low-Power Mode : Yes
Support Default GTF : No
Digital : Yes
Supported Display Modes :
720 X 400 70 Hz
640 X 480 60 Hz
640 X 480 67 Hz
640 X 480 72 Hz
640 X 480 75 Hz
800 X 600 56 Hz
800 X 600 60 Hz
800 X 600 72 Hz
800 X 600 75 Hz
832 X 624 75 Hz
1024 X 768 60 Hz
1024 X 768 70 Hz
1024 X 768 75 Hz
1280 X 720 60 Hz
1152 X 864 75 Hz
1280 X 960 60 Hz
1440 X 900 60 Hz
1280 X 1024 60 Hz
1280 X 1024 75 Hz
1680 X 1050 60 Hz
1920 X 1080 60 Hz
*****************************************************************
*****************************************************************
Active : Yes
Registry Key : DISPLAY\IVO8C66\5&462698&0&UID256
Manufacture Week : 0 / 2019
ManufacturerID : 53030 (0xCF26)
ProductID : 35942 (0x8C66)
Serial Number (Numeric) : 0 (0x00000000)
EDID Version : 1.4
Display Gamma : 2.20
Maximum Image Size : 31 X 17 cm (13.9 Inch)
Maximum Resolution : 1920 X 1080
Support Standby Mode : No
Support Suspend Mode : No
Support Low-Power Mode : No
Support Default GTF : No
Digital : Yes
Supported Display Modes :
1920 X 1080 60 Hz
The script here gives me almost what I want except it doesn't give me the monitor name nor does it give me information whether it's internal or not.
I have attached 2 screenshots from the Settings > Display > Advanced Display page which is the information I am looking to capture.

Flashing cloud effect on LED strip/RaspberryPI

I have a LED strip with 20 LEDs and RPI3 B+
now I need to tweak the code below to flash LEDs randomly in various intensity and colours from (80,0,150) to (200,0,255),,
I have all hardware setup well, using adafruit library ws281x bud don't know how to code an infinite loop of flashing (not blinking)..
I've found a project I really want to be close to: https://youtu.be/EoGVQl3SjGY
my code for now is:
from rpi_ws281x import *
import random
# LED strip configuration:
LED_COUNT = 20 # Number of LED pixels.
LED_PIN = 10 # GPIO pin connected to the pixels (18 uses PWM!).
#LED_PIN = 10 # GPIO pin connected to the pixels (10 uses SPI /dev/spidev0.0).
LED_FREQ_HZ = 800000 # LED signal frequency in hertz (usually 800khz)
LED_DMA = 10 # DMA channel to use for generating signal (try 10)
LED_BRIGHTNESS = 255 # Set to 0 for darkest and 255 for brightest
LED_INVERT = False # True to invert the signal (when using NPN transistor level shift)
LED_CHANNEL = 0 # set to '1' for GPIOs 13, 19, 41, 45 or 53
strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ,LED_DMA,LED_INVERT,LED_BRIGHTNESS,LED_CHANNEL)
strip.begin()
for x in range(0,LED_COUNT):
while True:
R = random.randint(80,200)
B = random.randint(150,255)
strip.setPixelColor(x,Color(R,0,B))
strip.show()
So my question - is there anyone who know how I would tweak the code to get such an effect?
Thanks in advance to all to push me in right way..
Ereen
tried find an effect on the web
from rpi_ws281x import *
import random
# LED strip configuration:
LED_COUNT = 20 # Number of LED pixels.
LED_PIN = 10 # GPIO pin connected to the pixels (18 uses PWM!).
#LED_PIN = 10 # GPIO pin connected to the pixels (10 uses SPI /dev/spidev0.0).
LED_FREQ_HZ = 800000 # LED signal frequency in hertz (usually 800khz)
LED_DMA = 10 # DMA channel to use for generating signal (try 10)
LED_BRIGHTNESS = 255 # Set to 0 for darkest and 255 for brightest
LED_INVERT = False # True to invert the signal (when using NPN transistor level shift)
LED_CHANNEL = 0 # set to '1' for GPIOs 13, 19, 41, 45 or 53
strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ,LED_DMA,LED_INVERT,LED_BRIGHTNESS,LED_CHANNEL)
strip.begin()
while True: # <- Start the infinite loop, each iteration gets a new random color
for x in range(LED_COUNT): # <- iterate through your LED counts
R = random.randint(80,200) # <- Random RED color
B = random.randint(150,255) # <- Random BLUE color
strip.setPixelColor(x,Color(R,0,B)) # <- Set the pixel color
strip.show() # <- Show the pixel color for each LED index
# Do something here, my guess is a timer to keep the LEDs on for a set time, then turn them off.
# Next would be another timer to wait before restarting the loop (unless you don't want to wait)
I believe this should get you started. This creates an endless while loop that gets the random colors for red and blue, applies the colors to the strip, then shows the colors by turning on the strip.

Converting a spesific audio sream and copy the rest

Is it possible to convert one of the audio tracks in a video file to a different format while copying/remuxing the other audio tracks in the file with FFmpeg?
More specifically, is it possible to do this without explicitly specify all the audio tracks you want to keep?
I have tried using the -map function,
ffmpeg -i INPUT -c:v copy -c:a libfdk_aac -map 1:a:2 OUTPUT.mkv
but this only encodes the first audio track and excludes the rest. I know I can probably explicitly tell FFmpeg to mux all the rest of the audio tracks, but this is really tedious. It means I will have to count every audio track and write e considerably longer command.
Is there not a way to tell FFmpeg "convert audio track X and copy the rest"?
Here is the MediaInfo of the file. Note that there are over 10 audio tracks but I have excluded them in this example to keep it simple.
Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10#L5.1#High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : 36
Duration : 2 h 30 min
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level : 349 cd/m2
Maximum Frame-Average Light Level : 86 cd/m2
Audio #1
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Muxing mode : Stream extension
Codec ID : 134
Duration : 2 h 30 min
Bit rate mode : Variable
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Audio #2
ID : 4353 (0x1101)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : 129
Duration : 2 h 30 min
Bit rate mode : Constant
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : -9 ms
Stream size : 687 MiB (1%)
Service kind : Complete Main
Audio #3
ID : 4354 (0x1102)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Commercial name : Dolby Digital
Codec ID : 129
Duration : 2 h 30 min
Bit rate mode : Constant
Bit rate : 448 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : -9 ms
Stream size : 481 MiB (1%)
Service kind : Complete Main
Try:
ffmpeg -i INPUT -map 0 -c copy -c:a:2 libfdk_aac OUTPUT.mkv
-map 0 to map all streams (video/audio/subtitle/etc.) of the input #0
-c copy sets default operation to be copy
-c:a:2 customizes the 3rd output audio stream to be reencoded.

FLV to MP4 conversion keeping PTS consistent

The input file has the following video settings but playsback in media player at 29.97 FPS
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline#L2.1
Format settings : 2 Ref Frames
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Codec ID : 7
Duration : 1 min 30 s
Width : 480 pixels
Height : 360 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 14.985 (15000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Color range : Limited
Color primaries : BT.601 NTSC
Transfer characteristics : BT.709
Matrix coefficients : BT.601
However, another coded application will not accept the file as a valid file frame rates are only NTSC or PAL
How can I force the frame rate to be presented as 29.97 without changing the duration of the clip?

Matlab: Reorder 5 bytes to 4 times 10 bits RAW10

I would like to Import a RAW10 file into Matlab. The infos are directly attachted to the jpeg file provided by the raspberry pi camera.
4 Pixels are saved as 5 bytes.
The first four bytes contain the bit 9-2 of a pixel.
The last byte contains the missing LSB.
sizeRAW = 6404096;
sizeHeader =32768;
I = ones(1944,2592);
fin=fopen('0.jpeg','r');
off1 = dir('0.jpeg');
offset = off1.bytes - sizeRAW + sizeHeader;
fseek(fin, offset,'bof');
pixel = ones(1944,2592);
I=fread(fin,1944,'ubit10','l');
for col=1:2592
I(:,col)=fread(fin,1944,'ubit8','l');
col = col+4;
end
fclose(fin);
This is as far as I came yet, but it's not right.

Resources