You have 2000 raw images, 52x52 pixels, RGB 24 bits, that correspond
to the pieces of a puzzle representing a 4000x1250 pixel image.
Each adjacent pair of images overlap on 1 row/column of pixels. Border
images have a duplicated row/column of pixels. Try to rebuild the
puzzle.
我正在考虑使用PIL,OpenCV或其他库
编辑
有人这样做了
private function runAlgorithm(index:int):void
{
var currentBitmap:Object = allBitmaps[index];
if(currentBitmap.visited) return;
currentBitmap.visited = true;
var left:int = leftMap[currentBitmap.leftRow];
var right:int = rightMap[currentBitmap.rightRow];
var top:int = topMap[currentBitmap.topRow];
var bottom:int = bottomMap[currentBitmap.bottomRow];
if(left != -1){
allBitmaps[left].bitmap.x = currentBitmap.bitmap.x - 50;
runAlgorithm(left);
}
if(right != -1){
allBitmaps[right].bitmap.x = currentBitmap.bitmap.x + 50;
runAlgorithm(right);
}
if(top != -1){
allBitmaps[top].bitmap.y = currentBitmap.bitmap.y - 50;
runAlgorithm(top);
}
if(bottom != -1){
allBitmaps[bottom].bitmap.y = currentBitmap.bitmap.y + 50;
runAlgorithm(bottom);
}
}如果这是正确的方法,我将需要在python中编写类似或代码