Skip to content

Commit

Permalink
Merge pull request #561 from correctexam/515-migrate-comments-when-ch…
Browse files Browse the repository at this point in the history
…anging-grading-scale

update qcm
  • Loading branch information
barais authored Oct 4, 2024
2 parents e47cee1 + 0afa33b commit bf5492b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/webapp/app/qcm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,17 @@ function analyseStudentSheet(casesExamTemplate: any, templateimage: any, student
let thresh_st = new cv.Mat();
cv.threshold(gray_st, thresh_st, 0, 255, cv.THRESH_BINARY + cv.THRESH_OTSU);

casesExamTemplate.cases.forEach((case1: any, k: number) => {
for (const [k, case1] of casesExamTemplate.cases.entries()) {
console.error('position', getPosition(case1), getDimensions(case1));
const diff = diffCouleurAvecCaseBlanche(decoupe(thresh, getPosition(case1), getDimensions(case1)));
imgs_templatediffblank.set(k, diff);
console.error(diff, k);
});
}

gray.delete();
thresh.delete();
casesExamTemplate.cases.forEach((case1: any, k: number) => {
for (const [k, case1] of casesExamTemplate.cases.entries()) {
// casesExamTemplate.cases.forEach((case1: any, k: number) => {
// Pour chaque (x,y) associé à une case du template, on récupère la zone située au même endroit sur la copie
// et on la compare avec celle du template

Expand Down Expand Up @@ -555,7 +557,7 @@ function analyseStudentSheet(casesExamTemplate: any, templateimage: any, student
);
}
img_case_eleve.delete();
});
}
gray_st.delete();
thresh_st.delete();

Expand Down

0 comments on commit bf5492b

Please sign in to comment.