我想将单应性应用于卫星图像。我发现这个post非常有帮助。所以我决定使用相同的Matlab代码。
<?php
namespace app\models;
class UserRecord extends \yii\db\ActiveRecord implements \yii\web\IdentityInterface
{
public $id;
public $steamid;
public $username;
public $profileurl;
public $avatar;
public $avatarmedium;
public $avatarfull;
public $verified;
public $banned;
public $rank;
public $authKey;
// public $password;
// public $accessToken;
public static function tableName()
{
return 'users';
}
public function getAuthKey()
{
return $this->authKey;
}
public function getId()
{
return $this->id;
}
public function validateAuthKey($authKey)
{
return $this->authKey === $authKey;
}
public static function findIdentity($id)
{
return self::findOne($id);
}
public function validateSteamID($steamid)
{
return $this->steamid === $steamid;
}
public static function findIdentityByAccessToken($token, $type = null)
{
throw new \yii\base\NotSupportedException;
}
public static function findBySteamId($steamid)
{
return self::findOne(['steamid' => $steamid]);
}
}
修改
使用 im = imread('cameraman.tif');
n = [0;0;-1];
d = Inf
theta = 60*pi/180;
R = [ 1 0 0 ;
0 cos(theta) -sin(theta);
0 sin(theta) cos(theta)];
t = [0;0;0];
K=[300 0 0;
0 300 0;
0 0 1];
H=K*R/K-1/d*K*t*n'*K;
img=imagehomog(im,H','c');
figure;imshow(img)
和imtransform
maketform