public static void TestSaveCamPoseResult() { //string guid = "64241744-27fe-456c-9165-ffc918571c29"; //string guid = "719f7af6-602c-489f-b5f6-751821c93e33"; //string guid = "a3810f29-bfa4-4a56-af78-857bc5e61804"; //string guid = "dff5415b-b278-43db-8e32-4f654ca4b3a1"; string guid = "715dbdb6-9b1b-4afc-a8d6-45d01ec12a08"; CameraPoseAnnotationAnalyzer.SaveResultImagesLocally(guid); }
public static void TestVisualizeCameraPoseAnnotationResult() { string result = "{\"objects\":{\"caxis\":{\"vertices\":[[454,218],[496,201],[450,184],[409,208]]},\"xvppoints\":{\"vertices\":[[566,357],[655,236],[454,116],[526,105],[289,219],[368,189]]},\"yvppoints\":{\"vertices\":[[386,317],[480,339],[182,65],[101,61],[399,116],[452,119]]},\"zvppoints\":{\"vertices\":[[182,65],[182,126],[281,33],[278,115],[686,74],[679,228]]}},\"displayScaleReductionX\":1.0906666666666667,\"displayScaleReductionY\":1.091858037578288,\"imageWidth\":818,\"imageHeight\":523}"; string ImPath = @"C:\Users\Hang Qiu\Downloads\test-image.jpg"; string resultDir = @"C:\Users\Hang Qiu\Downloads\"; Image im = Image.FromFile(ImPath); Image ResultImage = CameraPoseAnnotationAnalyzer.DrawResultStringOnImage(result, im); ImageUtilities.saveImage(ResultImage, resultDir, "test-result"); }