Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to calculate the distance between two points??

below is the source pic:

image description

below is my binary pic after processing on android platform:

image description

now i want the distance between the two red lines (red lines are added by my mspainter).

would anyone like to give me some tips ? that would be very thankful !

how to calculate the distance between two points??horizontal width of chest in a binary body picture??

below is the source pic:

image description

below is my binary pic after processing on android platform:

image description

now i want the distance between the two red lines (red lines are added by my mspainter).

would anyone like to give me some tips ? that would be very thankful !

how to calculate the horizontal width of chest in a binary body picture??

below is the source pic:

image description

below is my binary pic after processing on android platform:

image description

now i want the distance between the two red lines (red lines are added by my mspainter).

would anyone like to give me some tips ? that would be very thankful !

==================update at 2015-11-10 11:11 =========================

after eroded 5 times and dilated 5 times i got a better pic below , it costs some details (like armpit) ,but sort of could being accepted yet.

how to calculate the horizontal width of chest in a binary body picture??

below is the source pic:

image description

below is my binary pic after processing on android platform:

image description

now i want the distance between the two red lines (red lines are added by my mspainter).

would anyone like to give me some tips ? that would be very thankful !

==================update at 2015-11-10 11:11 =========================

after eroded 5 times and dilated 5 times i got a better pic below , it costs some details (like armpit) ,but sort of could being accepted yet.

image description

how to calculate the horizontal width of chest in a binary body picture??

below is the source pic:

image description

below is my binary pic after processing on android platform:

image description

now i want the distance between the two red lines (red lines are added by my mspainter).

would anyone like to give me some tips ? that would be very thankful !

==================update at 2015-11-10 11:11 =========================

after eroded 5 times and dilated 5 times i got a better pic below , it costs some details (like armpit) ,but sort of could being accepted yet.

image description

==================final update at 2015-11-10 11:11======================

at last, i choose to scan pixels finally...

scan from top to the horizon red line at chest, they all have two "transfer points" (as the red squares in the pic) , and below chest red line(include chest line) there are 6 "transfer points"(as the blue ones). image description

    int count = 0;//counting the number of "transfer points"
    int[] data = new int[6];//storing the horizontal ordinate of each "transfer points"
    for (int i = 0; i < height; i += 5) {
        for (int j = 1; j < width; j++) {
            // val val2 ##########
            //遍历,val总是在val2前面
            int val = (int) src.get(i, j - 1)[0];
            int val2 = (int) src.get(i, j)[0];
            if (val2 != val) {
                //find out the "transfer point",and count++
                //val和val2不相等的时候,记录val2的列坐标
                //计数也+1
                data[count] = j;
                count += 1;
            }
        }
        if (count == 6) {
            //if count==6 ,
            // it means the line now being scanned is the chest line (or beyond the chest line)
            // otherwise it should be 2 "transfer point"  instead of 6
            break;
        } else {
            //不等于6,重新计数
            //re-count if less than 6 "transfer points"
            count = 0;
        }
    }