Amazon Mechanical Turk,如何调整输入图像(URL)?

时间:2017-06-15 08:41:00

标签: amazon-web-services mechanicalturk

我复制了以下代码: https://github.com/kyamagu/bbox-annotator/blob/master/mturk.html#L401

目前,我正在尝试调整从input.csv文件加载的图像。我不知道如何调整它,我试图找到 <img src=" ... ">给课程。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

在本节中使用javascript创建图像:

image_element = new Image();
image_element.src = options.url;
image_element.onload = function() {
  options.width || (options.width = image_element.width);
  options.height || (options.height = image_element.height);
  annotator.annotator_element.css({
    "width": (options.width + annotator.border_width * 2) + 'px',
    "height": (options.height + annotator.border_width * 2) + 'px',
    "cursor": "crosshair"
  });
  annotator.image_frame.css({
    "background-image": "url('" + image_element.src + "')",
    "width": options.width + "px",
    "height": options.height + "px",
    "position": "relative"
  });

所以image_element是您需要操纵的对象,可能跟随this method