minimization

Minimize error in homography matrix

China☆狼群 提交于 2019-11-30 16:01:46
问题 I have a homgraphy matrix [h1 h2 h3 h4 h5 h6 h7 h8 h9] I have transformed a point p1 to P1 using above homography matrix. Similarly p2 to P2 p3 to P3 p4 to P4 I know the diffence between P1-P2 = D1 P2-P3 = D2 P3-P4 = D3 Due to error in homography There is small error in D1, D2, D3. (I know the actual difference value) Let the error be E1, E2, E3 (known values). (E1 = D1 - Actual_Difference_between_P1_andP2) Similarly E2, E3, and E4 are calculated. Now I need to modify my homography matrix,

Minimize error in homography matrix

你说的曾经没有我的故事 提交于 2019-11-30 15:45:41
I have a homgraphy matrix [h1 h2 h3 h4 h5 h6 h7 h8 h9] I have transformed a point p1 to P1 using above homography matrix. Similarly p2 to P2 p3 to P3 p4 to P4 I know the diffence between P1-P2 = D1 P2-P3 = D2 P3-P4 = D3 Due to error in homography There is small error in D1, D2, D3. (I know the actual difference value) Let the error be E1, E2, E3 (known values). (E1 = D1 - Actual_Difference_between_P1_andP2) Similarly E2, E3, and E4 are calculated. Now I need to modify my homography matrix, such that my E1, E2, E3, E4 are minimized. Introduction: Homography can be obtained from 4 pair of points

Android, ProGuard, and keepclasseswithmembernames

倾然丶 夕夏残阳落幕 提交于 2019-11-30 09:16:17
A common pattern in ProGuard configs for Android applications is to preserve custom View classes, since they are probably referenced only from layout XML instead of application code. Upon project creation, the ADT therefore add these rules to a project's proguard.cfg: -keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet, int); } I guess the idea here is to say that whenever a class defines a constructor that may be called by a layout

Android, ProGuard, and keepclasseswithmembernames

做~自己de王妃 提交于 2019-11-29 14:04:32
问题 A common pattern in ProGuard configs for Android applications is to preserve custom View classes, since they are probably referenced only from layout XML instead of application code. Upon project creation, the ADT therefore add these rules to a project's proguard.cfg: -keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet, int); } I guess

R optimization with equality and inequality constraints

泄露秘密 提交于 2019-11-27 23:00:16
I am trying to find the local minimum of a function, and the parameters have a fixed sum. For example, Fx = 10 - 5x1 + 2x2 - x3 and the conditions are as follows, x1 + x2 + x3 = 15 (x1,x2,x3) >= 0 Where the sum of x1, x2, and x3 have a known value, and they are all greater than zero. In R, it would look something like this, Fx = function(x) {10 - (5*x[1] + 2*x[2] + x[3])} opt = optim(c(1,1,1), Fx, method = "L-BFGS-B", lower=c(0,0,0), upper=c(15,15,15)) I also tried to use inequalities with constrOptim to force the sum to be fixed. I still think this may be a plausible work around, but I was

Knight's Shortest Path on Chessboard

一笑奈何 提交于 2019-11-27 16:38:21
I've been practicing for an upcoming programming competition and I have stumbled across a question that I am just completely bewildered at. However, I feel as though it's a concept I should learn now rather than cross my fingers that it never comes up. Basically, it deals with a knight piece on a chess board. You are given two inputs: starting location and ending location. The goal is to then calculate and print the shortest path that the knight can take to get to the target location. I've never dealt with shortest-path-esque things, and I don't even know where to start. What logic do I employ

R optimization with equality and inequality constraints

ぐ巨炮叔叔 提交于 2019-11-26 21:16:41
问题 I am trying to find the local minimum of a function, and the parameters have a fixed sum. For example, Fx = 10 - 5x1 + 2x2 - x3 and the conditions are as follows, x1 + x2 + x3 = 15 (x1,x2,x3) >= 0 Where the sum of x1, x2, and x3 have a known value, and they are all greater than zero. In R, it would look something like this, Fx = function(x) {10 - (5*x[1] + 2*x[2] + x[3])} opt = optim(c(1,1,1), Fx, method = "L-BFGS-B", lower=c(0,0,0), upper=c(15,15,15)) I also tried to use inequalities with