def transform_bbox(x,y,w,h,nw,nh,ow,oh):
    """
    Transform an nw*nx bounding box into an ow*oh one.

    :return (int,int,int,int)
    """
    #x / nw = xp / ow
    xp = int(ow * x / nw)
    yp = int(oh * y / nh)
    wp = int(ow * w / nw)
    hp = int(oh * h / nh)
    return (xp,yp,wp,hp)