Lines Matching refs:foe
56 DEFINE_string(foe_file, "", "FoE file to use");
89 void CreateProblem(const FieldsOfExperts& foe,
107 std::vector<ceres::LossFunction*> loss_function(foe.NumFilters());
108 std::vector<ceres::CostFunction*> cost_function(foe.NumFilters());
109 for (int alpha_index = 0; alpha_index < foe.NumFilters(); ++alpha_index) {
110 loss_function[alpha_index] = foe.NewLossFunction(alpha_index);
111 cost_function[alpha_index] = foe.NewCostFunction(alpha_index);
114 // Add FoE regularization for each patch in the image.
115 for (int x = 0; x < image.width() - (foe.Size() - 1); ++x) {
116 for (int y = 0; y < image.height() - (foe.Size() - 1); ++y) {
119 const std::vector<int>& x_delta_indices = foe.GetXDeltaIndices();
120 const std::vector<int>& y_delta_indices = foe.GetYDeltaIndices();
121 for (int i = 0; i < foe.NumVariables(); ++i) {
126 // For this patch with coordinates (x, y), we will add foe.NumFilters()
128 for (int alpha_index = 0; alpha_index < foe.NumFilters(); ++alpha_index) {
137 // Solves the FoE problem using Ceres and post-processes it to make sure the
178 usage += " --input=<noisy image PGM file> --foe_file=<FoE file name>";
194 FieldsOfExperts foe;
195 if (!foe.LoadFromFile(FLAGS_foe_file)) {
210 CreateProblem(foe, image, &problem, &solution);