Specifies known intrinsic parameters for view 1
333238
public void setCamera1( double fx , double fy , double skew , double cx , double cy ) {
		PerspectiveOps.pinholeToMatrix(fx,fy,skew,cx,cy,K1);
	}
861025
void initFromCameraParameters(Camera camera) {
    Camera.Parameters parameters = camera.getParameters();
    WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
    Display display = manager.getDefaultDisplay();
    Point theScreenResolution = new Point();
    getDisplaySize(display, theScreenResolution);
    screenResolution = theScreenResolution;
    Log.i(TAG, "Screen resolution: " + screenResolution);
    cameraResolution = findBestPreviewSizeValue(parameters, screenResolution);
    Log.i(TAG, "Camera resolution: " + cameraResolution);
  }
1268916
public void cameraIntrinsicNominal(CameraPinhole intrinsic ) {
		open.mLock.lock();
		try {
			// This might be called before the camera is open
			if (open.mCameraCharacterstics != null) {
				SizeF physicalSize = open.mCameraCharacterstics.get(CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE);
				Rect activeSize = open.mCameraCharacterstics.get(CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE);
				Size pixelSize = open.mCameraCharacterstics.get(CameraCharacteristics.SENSOR_INFO_PIXEL_ARRAY_SIZE);
				float[] focalLengths = open.mCameraCharacterstics.get(CameraCharacteristics.LENS_INFO_AVAILABLE_FOCAL_LENGTHS);
				if (focalLengths != null && focalLengths.length > 0 && physicalSize != null && activeSize != null && pixelSize != null ) {
					float fl = focalLengths[0];

					float widthToPixel = pixelSize.getWidth() / physicalSize.getWidth();
					float heightToPixel = pixelSize.getHeight() / physicalSize.getHeight();

					float s = open.mCameraSize.getWidth()/(float)activeSize.width();

					intrinsic.fx = fl*widthToPixel*s;
					intrinsic.fy = fl*heightToPixel*s;
					intrinsic.skew = 0;
					intrinsic.cx = activeSize.centerX()*s;
					intrinsic.cy = activeSize.centerY()*s;
					intrinsic.width = open.mCameraSize.getWidth();
					intrinsic.height = open.mCameraSize.getHeight();
					return;
				}
			}
			// 60 degrees seems reasonable for a random guess
			PerspectiveOps.createIntrinsic(open.mCameraSize.getWidth(),open.mCameraSize.getHeight(),
					UtilAngle.radian(60));
		} finally {
			open.mLock.unlock();
		}
	}
589213
function setActionParameter( $parameterName, $parameterValue, $view = '' )
    {
        if ( $view == '' )
            $view = self::currentView();
        $this->ViewActionParameters[$view][$parameterName] = $parameterValue;
    }
1109039
def first(spec)
      spec.view_parameters = spec.view_parameters.merge({:limit => 1})
      view(spec).first
    end
603492
function VView(view, data, key, opts) {
	this.view = view;
	this.data = data;
	this.key = key;
	this.opts = opts;
}
228065
def set(self, param, value):
        
        self.raw_dict[param] = value
        self.manifest.set(self.feature_name, param, value)
71759
def _set_params(self, x):
        """"""
        assert x.size == self.num_params
        self.varianceU = x[0]
        self.varianceY = x[1]
        self.lengthscaleU = x[2]
        self.lengthscaleY = x[3]
821460
public void setCalibration(StereoParameters stereoParam) {
		CameraPinholeBrown left = stereoParam.getLeft();
		CameraPinholeBrown right = stereoParam.getRight();

		// adjust image size
		imageLeftRect.reshape(left.getWidth(), left.getHeight());
		imageRightRect.reshape(right.getWidth(), right.getHeight());

		// compute rectification
		RectifyCalibrated rectifyAlg = RectifyImageOps.createCalibrated();
		Se3_F64 leftToRight = stereoParam.getRightToLeft().invert(null);

		// original camera calibration matrices
		DMatrixRMaj K1 = PerspectiveOps.pinholeToMatrix(left, (DMatrixRMaj)null);
		DMatrixRMaj K2 = PerspectiveOps.pinholeToMatrix(right, (DMatrixRMaj)null);

		rectifyAlg.process(K1,new Se3_F64(),K2,leftToRight);

		// rectification matrix for each image
		rect1 = rectifyAlg.getRect1();
		rect2 = rectifyAlg.getRect2();
		// New calibration and rotation matrix, Both cameras are the same after rectification.
		rectK = rectifyAlg.getCalibrationMatrix();
		rectR = rectifyAlg.getRectifiedRotation();

		FMatrixRMaj rect1_F32 = new FMatrixRMaj(3,3);
		FMatrixRMaj rect2_F32 = new FMatrixRMaj(3,3);

		ConvertMatrixData.convert(rect1,rect1_F32);
		ConvertMatrixData.convert(rect2,rect2_F32);

		ImageType<T> imageType = imageLeftRect.getImageType();
		distortLeftRect = RectifyImageOps.rectifyImage(stereoParam.left, rect1_F32, BorderType.SKIP, imageType);
		distortRightRect = RectifyImageOps.rectifyImage(stereoParam.right, rect2_F32, BorderType.SKIP, imageType);

		// Compute parameters that are needed when converting to 3D
		baseline = stereoParam.getBaseline();
		fx = rectK.get(0,0);
		fy = rectK.get(1,1);
		cx = rectK.get(0,2);
		cy = rectK.get(1,2);
	}
912272
def set_param(self, param, value):
        ''''''
        self.data[param] = value
        self._object.configuration_data = utils.dict_to_nvlist(self.data)
522732
def _apply_orthogonal_view(self):
        
        left, right, bottom, top = self.get_view_coordinates()
        glOrtho(left, right, bottom, top, -10, 0)
360221
public void setConfiguration( Se3_F64 planeToCamera ,
								  CameraPinholeBrown intrinsic )
	{
		this.planeToCamera = planeToCamera;
		normToPixel = LensDistortionFactory.narrow(intrinsic).distort_F64(false, true);
		pixelToNorm = LensDistortionFactory.narrow(intrinsic).undistort_F64(true, false);

		planeToCamera.invert(cameraToPlane);
	}
1194700
def _initialize_parameters(state_machine, n_features):
        
        return np.zeros((state_machine.n_states 
                         + state_machine.n_transitions,
                         n_features))
134544
function addViewSettings(terria, initSources) {
  const cameraExtent = terria.currentViewer.getCurrentExtent();

  // Add an init source with the camera position.
  const initialCamera = {
    west: CesiumMath.toDegrees(cameraExtent.west),
    south: CesiumMath.toDegrees(cameraExtent.south),
    east: CesiumMath.toDegrees(cameraExtent.east),
    north: CesiumMath.toDegrees(cameraExtent.north)
  };

  if (defined(terria.cesium)) {
    const cesiumCamera = terria.cesium.scene.camera;
    initialCamera.position = cesiumCamera.positionWC;
    initialCamera.direction = cesiumCamera.directionWC;
    initialCamera.up = cesiumCamera.upWC;
  }

  const homeCamera = {
    west: CesiumMath.toDegrees(terria.homeView.rectangle.west),
    south: CesiumMath.toDegrees(terria.homeView.rectangle.south),
    east: CesiumMath.toDegrees(terria.homeView.rectangle.east),
    north: CesiumMath.toDegrees(terria.homeView.rectangle.north),
    position: terria.homeView.position,
    direction: terria.homeView.direction,
    up: terria.homeView.up
  };

  const time = {
    dayNumber: terria.clock.currentTime.dayNumber,
    secondsOfDay: terria.clock.currentTime.secondsOfDay
  };

  let viewerMode;
  switch (terria.viewerMode) {
    case ViewerMode.CesiumTerrain:
      viewerMode = "3d";
      break;
    case ViewerMode.CesiumEllipsoid:
      viewerMode = "3dSmooth";
      break;
    case ViewerMode.Leaflet:
      viewerMode = "2d";
      break;
  }

  const terriaSettings = {
    initialCamera: initialCamera,
    homeCamera: homeCamera,
    baseMapName: terria.baseMap.name,
    viewerMode: viewerMode,
    currentTime: time
  };
  if (terria.showSplitter) {
    terriaSettings.showSplitter = terria.showSplitter;
    terriaSettings.splitPosition = terria.splitPosition;
  }
  initSources.push(terriaSettings);
}
1138952
def register_view(self, view):
        """"""
        Controller.register_view(self, view)

        # connects additional signals
        self.view['tv_notes'].get_buffer().connect("changed",
                                          self.on_notes_changed)

        # Sets initial values for the view.
        # Later observer will keep the view always aligned
        self.view.set_name(self.model.name)
        self.view.set_rate(self.model.rate)
        self.view.set_notes(self.model.notes)
        return
680703
private void adaptPreviewView() {
        if (previewView != null) {
            if (isPreviewShown()) {
                previewView.setVisibility(View.VISIBLE);
                previewView.setLayoutParams(createPreviewLayoutParams());
                previewLoader.load(getColor(), previewView);
            } else {
                previewView.setVisibility(View.INVISIBLE);
                previewView.setImageBitmap(null);
            }
        }
    }
203280
def initialize_parameters(self, initializer: mx.init.Initializer, allow_missing_params: bool):
        
        self.module.init_params(initializer=initializer,
                                arg_params=self.params,
                                aux_params=self.aux_params,
                                allow_missing=allow_missing_params,
                                force_init=False)