Description
AOIDB模块
此模块依赖anomaly.dll与og-common.dll库
Usage
Installation
$ npm install @koala/aoi-db
import { AOIDBModule } from '@koala/aoi-db';
@Module({
imports: [
AOIDBModule.forRoot({
dllPath: 'D:/kl-storage/dll/',
dbPath: 'D:/kl-storage/gallery/db/',
width: 5120,
height: 5120,
channel: 3,
featureDIM: 384,
featureWidth: 256,
featureHeight: 256,
deadproofArea: 64,
})
],
controllers: [AppController],
providers: [AppService],
})
import { AOIDBService } from '@koala/aoi-db'
@Injectable()
export class AppService {
constructor(
public aoiDBService: AOIDBService,
) {
console.log(this.aoiDBService.load('test.db'))
}
}
AOIDBService API
initEngine(): Promise<boolean>;
destroyEngine(): boolean;
interface Feature {
id: number;
type: number;
feature: string;
}
exportDB(db: string, exportFeature?: boolean): Promise<Feature[]>;
findAll(): Promise<string[]>;
load(db: string, releaseFirst?: boolean): Promise<number>
release(db: string): Promise<boolean>;
delete(db: string): Promise<boolean>;
更多请查看./dist/app.service.d.ts
Router
运行之后查看/aoiDB/