modify import
This commit is contained in:
parent
67bf403890
commit
bb45f72ff1
@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
.panose-inline {
|
||||
margin-bottom: -40px;
|
||||
margin-bottom: -24px;
|
||||
.input-group {
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ define(
|
||||
// 使用ostu来设置灰度阈值
|
||||
var histoGram = getHistogram(processor.get());
|
||||
getFilter('threshold').val(getThreshold(histoGram, 'ostu'));
|
||||
$('#import-pic-threshold-pre').val('ostu');
|
||||
|
||||
processImage();
|
||||
binarizeImage();
|
||||
@ -218,11 +219,13 @@ define(
|
||||
binarizeImage();
|
||||
}
|
||||
else if (action === 'threshold-pre') {
|
||||
var histoGram = getHistogram(program.data.imageProcessor.getOrigin());
|
||||
getFilter('threshold').val(getThreshold(histoGram, $('#import-pic-threshold-pre').val()));
|
||||
program.data.imageProcessor.restore();
|
||||
|
||||
binarizeImage();
|
||||
var val = $('#import-pic-threshold-pre').val();
|
||||
if (val) {
|
||||
var histoGram = getHistogram(program.data.imageProcessor.getOrigin());
|
||||
getFilter('threshold').val(getThreshold(histoGram, $('#import-pic-threshold-pre').val()));
|
||||
program.data.imageProcessor.restore();
|
||||
binarizeImage();
|
||||
}
|
||||
}
|
||||
// 处理图片的情况,需要调用处理图片和二值化函数
|
||||
else if (action === 'restore') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user