Compare commits
5 Commits
5946d692c5
...
f775c6f173
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f775c6f173 | ||
|
|
41ca97a2f3 | ||
|
|
a372b06c2a | ||
|
|
246711a427 | ||
| 1e019bcdab |
@ -11,13 +11,12 @@ import com.zhangy.skyeye.jm.entity.JmImage;
|
||||
import com.zhangy.skyeye.jm.service.JmImageService;
|
||||
import com.zhangy.skyeye.publics.consts.FileTypeEnum;
|
||||
import com.zhangy.skyeye.publics.utils.LocalLockUtil;
|
||||
import org.opencv.core.Core;
|
||||
import com.zhangy.skyeye.publics.utils.OpenCVUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.io.File;
|
||||
import java.net.ConnectException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -120,21 +119,7 @@ public class JmImageController {
|
||||
|
||||
static {
|
||||
//System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
//加载 OpenCV (强制使用绝对路径加载,解决 UnsatisfiedLinkError)
|
||||
String openCvDll = System.getProperty("opencv.library.path") + File.separator + Core.NATIVE_LIBRARY_NAME + ".dll";
|
||||
try {
|
||||
File dllFile = new File(openCvDll);
|
||||
if (dllFile.exists()) {
|
||||
// 注意:必须使用 System.load() 加载绝对路径
|
||||
System.load(dllFile.getAbsolutePath());
|
||||
System.out.println("SUCCESS: OpenCV loaded from -> " + dllFile.getAbsolutePath());
|
||||
} else {
|
||||
System.err.println("ERROR: OpenCV DLL not found at -> " + openCvDll);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
System.err.println("CRITICAL: Failed to load OpenCV: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
OpenCVUtil.loadNativeDylib();
|
||||
}
|
||||
|
||||
/*@IgnoreAuth
|
||||
|
||||
@ -24,7 +24,8 @@ import java.util.List;
|
||||
public class ImageUtil {
|
||||
|
||||
static {
|
||||
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
//System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
OpenCVUtil.loadNativeDylib();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -19,7 +19,26 @@ import java.util.List;
|
||||
public class OpenCVUtil {
|
||||
|
||||
static {
|
||||
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
//System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
loadNativeDylib();
|
||||
}
|
||||
|
||||
public static void loadNativeDylib() {
|
||||
//加载 OpenCV (强制使用绝对路径加载,解决 UnsatisfiedLinkError)
|
||||
String openCvDll = System.getProperty("opencv.library.path") + File.separator + Core.NATIVE_LIBRARY_NAME + ".dll";
|
||||
try {
|
||||
File dllFile = new File(openCvDll);
|
||||
if (dllFile.exists()) {
|
||||
// 注意:必须使用 System.load() 加载绝对路径
|
||||
System.load(dllFile.getAbsolutePath());
|
||||
System.out.println("SUCCESS: OpenCV loaded from -> " + dllFile.getAbsolutePath());
|
||||
} else {
|
||||
System.err.println("ERROR: OpenCV DLL not found at -> " + openCvDll);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
System.err.println("CRITICAL: Failed to load OpenCV: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -22,10 +22,14 @@ const state = {
|
||||
label: '快速模式',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '巡航模式',
|
||||
value: '2'
|
||||
},
|
||||
{
|
||||
label: '创建航线',
|
||||
value: '3'
|
||||
}
|
||||
},
|
||||
],
|
||||
polarization: {},
|
||||
polarizationOptions: {},
|
||||
|
||||
@ -760,6 +760,7 @@
|
||||
------------------------------------- */
|
||||
.el-message {
|
||||
border: none;
|
||||
top: 60px !important;
|
||||
|
||||
// &[class*='success'] {
|
||||
// background-color: rgba(mix(#000, $--color-green, 30%), 0.7);
|
||||
|
||||
@ -1296,7 +1296,7 @@ export default {
|
||||
name: params.name,
|
||||
mode: params.mode,
|
||||
pointList: pointList,
|
||||
startAltitude: params.startAltitude,
|
||||
startAltitude: params.mode === '2' ? 0 : params.startAltitude,
|
||||
imageLight: parseFloat(params.imageLight),
|
||||
headingDiff: parseFloat(params.headingDiff),
|
||||
imageBit: parseFloat(params.imageBit),
|
||||
@ -1305,20 +1305,16 @@ export default {
|
||||
uavList: [
|
||||
{
|
||||
uavId: params.uav,
|
||||
// startLon: params.startPoint.lon,
|
||||
// startLat: params.startPoint.lat,
|
||||
// endLon: params.endPoint.lon,
|
||||
// endLat: params.endPoint.lat,
|
||||
speed: params.initSpeed,
|
||||
height: params.flyHeight,
|
||||
speed: params.mode === '2' ? 0 : params.initSpeed,
|
||||
height: params.mode === '2' ? 0 : params.flyHeight,
|
||||
resolution: params.ratio,
|
||||
startAltitude: params.startAltitude,
|
||||
startAltitude: params.mode === '2' ? 0 : params.startAltitude,
|
||||
payloadList: [{
|
||||
payloadId: params.loader,
|
||||
resolution: params.ratio,
|
||||
width: params.width,
|
||||
length: this.form.imageMode === '4' ? this.ratioMap.gmti.length : this.ratioMap[params.ratio].length,
|
||||
theta: params.theta,
|
||||
theta: params.mode === '2' ? 0 : params.theta,
|
||||
reserved: this.form.imageMode === '4' ? this.ratioMap.gmti.reserved : this.ratioMap[params.ratio].reserved,
|
||||
direction: params.direction,
|
||||
polarization: params.polarization,
|
||||
@ -2001,7 +1997,7 @@ export default {
|
||||
name: params.name,
|
||||
mode: params.mode,
|
||||
pointList: pointList,
|
||||
startAltitude: params.startAltitude,
|
||||
startAltitude: params.mode === '2' ? 0 : params.startAltitude,
|
||||
imageLight: parseFloat(params.imageLight),
|
||||
headingDiff: parseFloat(params.headingDiff),
|
||||
imageBit: parseFloat(params.imageBit),
|
||||
@ -2010,16 +2006,16 @@ export default {
|
||||
uavList: [
|
||||
{
|
||||
uavId: params.uav,
|
||||
speed: params.initSpeed,
|
||||
height: params.flyHeight,
|
||||
speed: params.mode === '2' ? 0 : params.initSpeed,
|
||||
height: params.mode === '2' ? 0 : params.flyHeight,
|
||||
resolution: params.ratio,
|
||||
startAltitude: params.startAltitude,
|
||||
startAltitude: params.mode === '2' ? 0 : params.startAltitude,
|
||||
payloadList: [{
|
||||
payloadId: params.loader,
|
||||
resolution: params.ratio,
|
||||
width: params.width,
|
||||
length: this.form.imageMode === '4' ? this.ratioMap.gmti.length : this.ratioMap[params.ratio].length,
|
||||
theta: params.theta,
|
||||
theta: params.mode === '2' ? 0 : params.theta,
|
||||
reserved: this.form.imageMode === '4' ? this.ratioMap.gmti.reserved : this.ratioMap[params.ratio].reserved,
|
||||
direction: params.direction,
|
||||
polarization: params.polarization,
|
||||
|
||||
@ -303,7 +303,11 @@
|
||||
</el-table>
|
||||
</div>-->
|
||||
|
||||
<el-form-item prop="startAltitude" label="起飞点高度">
|
||||
<el-form-item
|
||||
v-if="form.mode !== '2'"
|
||||
prop="startAltitude"
|
||||
label="起飞点高度"
|
||||
>
|
||||
<div class="input-command">
|
||||
<el-input
|
||||
v-model.number="form.startAltitude"
|
||||
@ -391,7 +395,11 @@
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item prop="initSpeed" label="飞行速度">
|
||||
<el-form-item
|
||||
v-if="form.mode !== '2'"
|
||||
prop="initSpeed"
|
||||
label="飞行速度"
|
||||
>
|
||||
<!-- <el-input-->
|
||||
<!-- v-model.number="form.initSpeed"-->
|
||||
<!-- type="number"-->
|
||||
@ -481,14 +489,11 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="flyHeight" label="飞行高度">
|
||||
<!-- <el-input-->
|
||||
<!-- @change="calculateWidth"-->
|
||||
<!-- v-model.number="form.flyHeight"-->
|
||||
<!-- type="number"-->
|
||||
<!-- size="small"-->
|
||||
<!-- placeholder="请输入飞行高度"-->
|
||||
<!-- ></el-input>-->
|
||||
<el-form-item
|
||||
v-if="form.mode !== '2'"
|
||||
prop="flyHeight"
|
||||
label="飞行高度"
|
||||
>
|
||||
<el-slider
|
||||
v-model="form.flyHeight"
|
||||
show-input
|
||||
@ -497,9 +502,8 @@
|
||||
:max="500"
|
||||
size="mini"
|
||||
></el-slider>
|
||||
<!-- <el-input-number @change="calculateWidth" v-model="form.flyHeight" controls-position="right" :min="50" :max="500"></el-input-number>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="下视角">
|
||||
<el-form-item v-if="form.mode !== '2'" label="下视角">
|
||||
<el-slider
|
||||
v-model="form.theta"
|
||||
:step="0.1"
|
||||
|
||||
@ -27,7 +27,7 @@ import UavTarget from './uavTarget'
|
||||
import PicturesUpload from '../pictures-upload/index.vue'
|
||||
import RightSlide from '@/components/RightSlide.vue'
|
||||
import LeftSlide from '@/components/LeftSlide.vue'
|
||||
|
||||
import { debounce } from '@/utils'
|
||||
let handler = undefined
|
||||
let broadcastChannel = null
|
||||
let broadcastChannelInterval = null
|
||||
@ -394,7 +394,9 @@ export default {
|
||||
title: '航线详情',
|
||||
data: []
|
||||
},
|
||||
emptyImg: require('@/assets/img/common/empty.svg')
|
||||
emptyImg: require('@/assets/img/common/empty.svg'),
|
||||
lightPercent: 10,
|
||||
contrastPercent: 10
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -584,6 +586,10 @@ export default {
|
||||
return '#336dff'
|
||||
}
|
||||
},
|
||||
// 亮度设置变化
|
||||
onLightChange: debounce(function (value) {
|
||||
|
||||
}, 200),
|
||||
// startTest() {
|
||||
// let testHeight = 1000
|
||||
// window.detectType = {
|
||||
|
||||
@ -1322,3 +1322,34 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.image-set {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: calc(100vh - 60px);
|
||||
width: 360px;
|
||||
transform: translateX(-50%);
|
||||
background-color: $--color-black-1-alpha;
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
|
||||
::v-deep .el-slider__input {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
::v-deep .el-slider__runway {
|
||||
width: 200px;
|
||||
margin-right: 100px;
|
||||
}
|
||||
|
||||
&__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.is-label {
|
||||
flex: none;
|
||||
color: $--color-text-1;
|
||||
width: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,6 +132,29 @@
|
||||
</div>
|
||||
</dt-card>
|
||||
</left-slide>
|
||||
<div class="image-set" v-if="taskList.visible && taskList.data.length">
|
||||
<div class="image-set__item">
|
||||
<div class="is-label">亮度:</div>
|
||||
<el-slider
|
||||
v-model="lightPercent"
|
||||
show-input
|
||||
input-size="mini"
|
||||
:show-input-controls="false"
|
||||
@input="onLightChange"
|
||||
>
|
||||
</el-slider>
|
||||
</div>
|
||||
<!-- <div class="image-set__item">
|
||||
<div class="is-label">对比度:</div>
|
||||
<el-slider
|
||||
v-model="contrastPercent"
|
||||
show-input
|
||||
input-size="mini"
|
||||
:show-input-controls="false"
|
||||
>
|
||||
</el-slider>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- 图片上传 -->
|
||||
<pictures-upload
|
||||
|
||||
Loading…
Reference in New Issue
Block a user