"use strict";(self.webpackChunkrspress_doc_template=self.webpackChunkrspress_doc_template||[]).push([["4552"],{72026:function(e,n,r){r.r(n);var s=r(85893),a=r(50065);function t(e){let n=Object.assign({h1:"h1",a:"a",pre:"pre",code:"code",span:"span",p:"p"},(0,a.ah)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.h1,{id:"rgb2centered_gray",children:[(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#rgb2centered_gray",children:"#"}),"rgb2centered_gray"]}),"\n",(0,s.jsx)(n.pre,{className:"code",children:(0,s.jsx)(n.pre,{className:"shiki css-variables has-line-number",style:{backgroundColor:"var(--shiki-color-background)"},tabIndex:"0",children:(0,s.jsxs)(n.code,{className:"language-python",meta:"",children:[(0,s.jsxs)(n.span,{className:"line line-number",children:[(0,s.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"horizon_plugin_pytorch"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:"."}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"rgb2centered_gray "}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:"("}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-function)"},children:"input"}),(0,s.jsx)(n.span,{style:{color:"var(--shiki-token-punctuation)"},children:": Tensor)"})]}),"\n"]})})}),"\n",(0,s.jsx)(n.p,{children:"Convert color space."}),"\n",(0,s.jsx)(n.p,{children:"Convert images from RGB format to centered gray"}),"\n",(0,s.jsx)(n.p,{children:"Parameters: input (Tensor) \u2013 input image in RGB format of shape [N, 3, H, W], ranging 0 to 255"}),"\n",(0,s.jsx)(n.p,{children:"Returns: centered gray image of shape [N, 1, H, W], ranging -128 to 127"}),"\n",(0,s.jsx)(n.p,{children:"Return type: Tensor"})]})}function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,a.ah)(),e.components);return n?(0,s.jsx)(n,Object.assign({},e,{children:(0,s.jsx)(t,e)})):t(e)}n.default=i,i.__RSPRESS_PAGE_META={},i.__RSPRESS_PAGE_META["latest%2Fzh%2Fguide%2Fplugin%2Fplugin_api_reference%2Fhorizon_operator%2Fhorizon_plugin_pytorch_rgb2centered_gray.md"]={toc:[],title:"rgb2centered_gray",frontmatter:{}}}}]);