MCPcopy Create free account
hub / github.com/6dylan6/jdpro / recognize

Method recognize

function/jdValidate.js:236–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

234 }
235 }
236 async recognize() {
237 const data = await JDJRValidator.jsonp('/slide/g.html', {
238 e: ''
239 });
240 const {
241 bg,
242 patch,
243 y
244 } = data;
245 // const uri = 'data:image/png;base64,';
246 // const re = new PuzzleRecognizer(uri+bg, uri+patch, y);
247 const re = new PuzzleRecognizer(bg, patch, y);
248 const puzzleX = await re.run();
249 if (puzzleX > 0) {
250 this.data = {
251 c: data.challenge,
252 w: re.w,
253 e: '',
254 s: '',
255 o: '',
256 };
257 this.x = puzzleX;
258 }
259 return puzzleX;
260 }
261 async report(n) {
262 console.time('PuzzleRecognizer');
263 let count = 0;

Callers 2

tryRecognizeMethod · 0.95
reportMethod · 0.95

Calls 2

runMethod · 0.95
jsonpMethod · 0.45

Tested by

no test coverage detected