function obj = coef_J_pure_pnp_func_new(in1,in2,in3,scale)
b1 = in1(:,1);
b2 = in1(:,2);
cx = in3(:,3);
cy = in3(:,4);
fx = in3(:,1);
fy = in3(:,2);
r1 = in2(:,1);
r2 = in2(:,2);
r3 = in2(:,3);
t4 = b1.*r3;
t5 = cx.*r3;
t6 = fx.*r1;
t2 = -t4+t5+t6;
t7 = b2.*r3;
t8 = cy.*r3;
t9 = fy.*r2;
t3 = -t7+t8+t9;
t10 = b1.*r2.*2.0;
t16 = cx.*r2.*2.0;
t11 = t10-t16;
t12 = b2.*r2.*2.0;
t13 = fy.*r3.*2.0;
t22 = cy.*r2.*2.0;
t14 = t12+t13-t22;
t15 = t3.^2;
t17 = b1.*r1.*2.0;
t18 = fx.*r3.*2.0;
t26 = cx.*r1.*2.0;
t19 = t17+t18-t26;
t20 = b2.*r1.*2.0;
t24 = cy.*r1.*2.0;
t21 = t20-t24;
t23 = fx.*r2.*t2.*4.0;
t25 = t21.*t3.*2.0;
t27 = t2.^2;
t28 = t11.*t2.*2.0;
t29 = t4-t5+t6;
t30 = t2.*t29.*2.0;
t31 = t7-t8+t9;
t32 = t3.*t31.*2.0;
t33 = t14.*t3.*2.0;
t34 = fy.*r1.*t14.*4.0;
t35 = -t17+t18+t26;
t36 = fy.*r1.*t3.*4.0;
t37 = fx.*r2.*t19.*4.0;
t38 = t11.^2;
t39 = t21.^2;
t40 = -t12+t13+t22;
t41 = fx.^2;
t42 = r2.^2;
t43 = fy.^2;
t44 = r1.^2;
t45 = fy.*r1.*t21.*4.0;
t46 = b1-cx;
t47 = b2-cy;
t48 = t19.*t2.*2.0;
t49 = fx.*r2.*t11.*4.0;
t50 = fx.*r2.*t29.*4.0;
t51 = fy.*r1.*t31.*4.0;
t52 = t30+t32-t41.*t42.*4.0-t43.*t44.*4.0;
t53 = fx.*r2.*t35.*4.0;
t54 = t29.^2;
t55 = fy.*scale.*t3.*2.0;
t56 = t3.*t47.*2.0;
t57 = fy.*r1.*t40.*4.0;
t58 = t11.*t35.*2.0;
t59 = t21.*t40.*2.0;
t60 = r1.*scale.*t43.*4.0;
t61 = fx.*r2.*t46.*4.0;
t62 = t21.*t31.*2.0;
t63 = t29.*t35.*2.0;
t64 = fy.*scale.*t21.*2.0;
t65 = t21.*t47.*2.0;
t66 = t31.^2;
t67 = fx.*scale.*t2.*2.0;
t68 = t2.*t46.*2.0;
t69 = t11.*t29.*2.0;
t70 = t31.*t40.*2.0;
t71 = t11.*t46.*2.0;
t72 = fx.*scale.*t29.*2.0;
t73 = fy.*scale.*t31.*2.0;
obj = [scale.*(t15+t27),-scale.*(t28+t33),scale.*(t25+t48),-scale.*(t23-fy.*r1.*t3.*4.0),scale.*(t15.*-2.0+t30+t38+t14.^2),scale.*(t23+t36-t11.*t19.*2.0-t14.*t21.*2.0),-scale.*(t25+t34-t2.*t35.*2.0-fx.*r2.*t11.*4.0),scale.*(t27.*-2.0+t32+t39+t19.^2),-scale.*(t28+t37-t3.*t40.*2.0-fy.*r1.*t21.*4.0),-scale.*t52,t67,t55,-scale.*(t56+t68),scale.*(t33-t11.*t29.*2.0),-scale.*(t25+t34+t49-t19.*t29.*2.0),-scale.*(t36+t50+t58-t14.*t21.*2.0),scale.*(t28+t37+t45-t14.*t31.*2.0),scale.*(t38.*2.0-t39.*2.0+t19.*t35.*2.0-t14.*t40.*2.0-t41.*t42.*8.0+t43.*t44.*8.0),-scale.*(t45+t53-t11.*t29.*2.0-t14.*t31.*2.0),fx.*scale.*t11.*-2.0,fy.*scale.*t14.*-2.0,scale.*(t71+t14.*t47.*2.0),-scale.*(t48-t21.*t31.*2.0),scale.*(t23+t51+t59-t11.*t19.*2.0),scale.*(t49+t57-t19.*t29.*2.0-t21.*t31.*2.0),fx.*scale.*t19.*2.0,t64,-scale.*(t65+t19.*t46.*2.0),scale.*(t50-t51),r2.*scale.*t41.*-4.0,t60,scale.*(t61-fy.*r1.*t47.*4.0),scale.*(t15+t54),-scale.*(t36-t50),scale.*(t25+t63),-scale.*t52,-scale.*(t45-t53+t69+t3.*t40.*2.0),scale.*(t32+t39-t54.*2.0+t35.^2),t72,-t55,scale.*(t56-t29.*t46.*2.0),-scale.*(t23-t51),-scale.*(t49-t57+t62+t2.*t35.*2.0),-scale.*(t50+t51+t58+t59),r2.*scale.*t41.*4.0,t60,-scale.*(t61+fy.*r1.*t47.*4.0),scale.*(t62-t63),fx.*scale.*t35.*2.0,-t64,scale.*(t65-t35.*t46.*2.0),scale.*(t27+t66),scale.*(t28+t70),scale.*(t30+t38-t66.*2.0+t40.^2),-t67,t73,scale.*(t68-t31.*t47.*2.0),scale.*(t69-t70),fx.*scale.*t11.*-2.0,fy.*scale.*t40.*2.0,scale.*(t71-t40.*t47.*2.0),scale.*(t54+t66),-t72,-t73,scale.*(t29.*t46.*2.0+t31.*t47.*2.0),scale.*t41,fx.*scale.*t46.*-2.0,scale.*t43,fy.*scale.*t47.*-2.0,scale.*(t46.^2+t47.^2)];
