seek热成像摄像头
Posted Dr_abandon新秀
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了seek热成像摄像头相关的知识,希望对你有一定的参考价值。
seek_preview.setStateCallback(new SeekPreview.StateCallbackAdapter()
@RequiresApi(api = Build.VERSION_CODES.N)
@Override
public void onFrameAvailable(SeekPreview seekPreview, SeekImage seekImage)
Thermography t1 = seekPreview.getSeekOverlay().getSeekImage().getThermography();
List<Thermography.Spot> l3 = t1.getAllSpots();
Thermography the = seekImage.getThermography();
List<Thermography.Spot> list = the.getAllSpots();
Thermography.Data data = t1.getThermalData();
List<Thermography.Spot> l2 = the.getAreas(); // 0
List<Thermography.Spot> spots = the.getSpotPoints(); //0
// LogCook.e("===Thermography2===>", "======>" + list.size() + " ===>" + list.get(0).getTemperature() + "====>" + l3.size());
b7++;
SeekUtility.Temperature temp = data.getTemperature(5, 5);
// ByteBuffer byteBuffer = data.getBuffer();
// LogCook.e("===byteBuffer===>", "======>" + byteBuffer.get(0) + "==>" + byteBuffer.get(1));
List<Float> f_tem = new ArrayList<>();
for (int i = 0; i < 206; i++)
for (int j = 0; j < 156; j++)
SeekUtility.Temperature temp1 = data.getTemperature(i, j);
f_tem.add(temp1.getValue());
/// LogCook.e("======>", "======>(" + i + "," + j + ")=" + temp1);
List<Byte> list1 = new ArrayList<>();
List<Integer> int_list = new ArrayList<>();
for (int i = 0; i < f_tem.size(); i++)
float f1 = f_tem.get(i);
int i1 = (int) (f1 * 256 / 40);
byte b = (byte) Integer.parseInt(i1 + "", 16);
list1.add(b);
int_list.add(i1);
if (i == 100)
Log.e("======>", "======>(" + i + ")=" + f1 + " ===" + i1);
// byte[] b1 = listTobyte(list1);
int[] i_i = int_list.stream().mapToInt(Integer::intValue).toArray();
// Bitmap bmp = Bitmap.createBitmap(i_i, 0, 206, 206, 156, Bitmap.Config.ARGB_8888);
//bmp.copyPixelsFromBuffer(byteBuffer);
// Bitmap bmp = Bitmap.createBitmap( 208, 156, Bitmap.Config.ARGB_8888);
// Bitmap bmp = seekImage.getColorBitmap(); //获取seek的rbg图
// writeImageToPNG(System.currentTimeMillis() + "", bmp);
// Bitmap finalBmp = bmp;
//Log.e("====>","===>"+Arrays.toString(floats)); 数组打印
@Override
public void onDoubleTap(SeekPreview seekPreview, MotionEvent e)
Intent intent = getIntent();
finish();
startActivity(intent);
);
以上是关于seek热成像摄像头的主要内容,如果未能解决你的问题,请参考以下文章