function updateFeaturePoint(point_el){
    var imgName = $('#img').attr("label");
    var boxlbl = $(point_el).parent().attr("label");
    var pointlbl = $(point_el).attr("label");
    if(!pointlbl || pointlbl === ""){
        throw Error("All the feature points must be labelled");
    }else{
        //Considering that label box has already been created
        if(! images[imgName].boxes[boxlbl].points){
            images[imgName].boxes[boxlbl].points = {}
        }
        images[imgName].boxes[boxlbl].points[pointlbl] = {
            label: $(point_el).attr("label"),
            x: $(point_el).position().left,
            y: $(point_el).position().top,
        }
    }
}
//add or update a feature point
add or update a feature point
add or update a feature point
function updateFeaturePoint(point_el){
    var imgName = $('#img').attr("label");
    var boxlbl = $(point_el).parent().attr("label");
    var pointlbl = $(point_el).attr("label");
    if(!pointlbl || pointlbl === ""){
        throw Error("All the feature points must be labelled");
    }else{
        if(! images[imgName].boxes[boxlbl].points){
            images[imgName].boxes[boxlbl].points = {}
        }
        images[imgName].boxes[boxlbl].points[pointlbl] = {
            label: $(point_el).attr("label"),
            x: $(point_el).position().left,
            y: $(point_el).position().top,
        }
    }
}
function updateFeaturePoint ( point_el ) { var imgName = $ ( '#img' ) . attr ( "label" ) ; var boxlbl = $ ( point_el ) . parent ( ) . attr ( "label" ) ; var pointlbl = $ ( point_el ) . attr ( "label" ) ; if ( ! pointlbl || pointlbl === "" ) { throw Error ( "All the feature points must be labelled" ) ; } else { if ( ! images [ imgName ] . boxes [ boxlbl ] . points ) { images [ imgName ] . boxes [ boxlbl ] . points = { } } images [ imgName ] . boxes [ boxlbl ] . points [ pointlbl ] = { label : $ ( point_el ) . attr ( "label" ) , x : $ ( point_el ) . position ( ) . left , y : $ ( point_el ) . position ( ) . top , } } }
add or update a feature point
add or update a feature point
//Considering that label box has already been created