Skip to main content
. 2022 Oct 8;22(19):7611. doi: 10.3390/s22197611
Algorithm 1: Transformation algorithm for dumping (binary) files to RGB images
 Input: A path to a dataset of memory dump files
 Output: Transformation of RGB images with various dimensionality
 Start
 Set B a list of memory dump files
 Set width None
 Set height None
 Set data an empty list [ ]
 For i in length(B) where i integer numbers range from 0 to n.
 If file_size of B[i] < 10,240
width = 32
 If 10,240 <= file_size of B[i] <= 10,240 * 3
width = 64
 If 10,240 * 3 <= file_size of B[i] <= 10,240 * 6
width = 128
 If 10,240 * 6 <= file_size of B[i] <= 10,240 * 10
width = 256
 If 10,240 * 10 <= file_size of B[i] <= 10,240 * 20
width = 384
 If 10,240 * 20 <= file_size of B[i] <= 10,240 * 50
width = 512
 If 10,240 * 50 <= file_size of B[i] <= 10,240 * 100
width = 786
 Else
width = 1024
 End If
height = (file_size/width)/+1
 image = Width × height
 image.save[‘PNG’]
data.append[image]
 End For
 End