defining a partial image in the specified area, the partial image being composed of a target pixel and peripheral pixels on a line in {TAIL ~ a specified direction} in which {HEAD ~ the target pixel} exists 
in exists
defining a partial image in the specified area , the partial image being composed of a target pixel and peripheral pixels on a line in { TAIL ~ a specified direction } in which { HEAD ~ the target pixel } exists
OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH OTH TAIL TAIL TAIL TAIL TAIL TAIL TAIL REL OTH HEAD HEAD HEAD HEAD HEAD HEAD HEAD REL