1. A biological image processing device comprising: a memory; and a processor coupled to the memory and the processor configured to execute a process, the process comprising: extracting at least one line from contours of a palm and principal lines of the palm shown in an image of the palm; extracting pixels of the line extracted by the extracting of at least one line; setting a local region for each of the pixels, each local region including each corresponding one of the pixels; calculating, for each local region, local orientations of the line extracted by the extracting of at least one line, in accordance with gradient intensities related to respective orientations of each corresponding local region; calculating an orientation of the palm in accordance with a statistical amount of the respective local orientations; and rotating the palm of the image, based on the orientation of the palm.