mark-p4 commented on code in PR #2057: URL: https://github.com/apache/systemds/pull/2057#discussion_r1696992547
########## scripts/builtin/img_transform_matrix.dml: ########## @@ -0,0 +1,77 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +# Generates the z matrix for the new linearized image transformation function in order to apply +# affine transformation to linearized images. +# +# INPUT: +# ------------------------------------------------------------------------------------------- +# transMat 3x3 matrix for affine transformation (transformation Matrix) +# dimMat 2x2 matrix containing the original size of the image in the first row as follows +# [1,1] original height; [1,2] original width +# and the target size of the new image in the second row as follows +# [2,1] target height; [2,2] target width +# (dimensionMatrix) +# ------------------------------------------------------------------------------------------- +# OUTPUT: +# --------------------------------------------------------------------------------------- +# zMat transformation matrix to be multiplied with for the linearized image +# transformation function (arbitrary naming) +# isFillable returns a boolean which indicates if cells need to be filled (with fillvalue), + in this case the image is extended, otherwise the original image is used +# --------------------------------------------------------------------------------------- + + m_img_transform_matrix = function(Matrix[Double] transMat, Integer orig_w, Integer orig_h, Integer out_w, Integer out_h) + return (Matrix[Double] zMat, Matrix[Double] isFillable){ + #orig_w = as.scalar(dimMat[1,2]) Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@systemds.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org