how to convert from RGB to grey scale <vice versa>

546 views
Skip to first unread message

Sravan Kumar Reddy Javaji

unread,
Apr 23, 2015, 6:57:46 PM4/23/15
to tor...@googlegroups.com
Hello Everyone,

I know that image.rgb2y() converts the image with 3 channel to 1 channel. But is this is the way to convert RGB image to grey scale in Torch? or is there any other way?

Also which method do we need to use, if we want to convert the image from grey scale to RGB,  Please let me know

Thanks for your time and help.

-
Regards,
Sravan

Sravan Kumar Reddy Javaji

unread,
Apr 23, 2015, 7:49:26 PM4/23/15
to tor...@googlegroups.com
For converting from channel 1 image to channel 3:

Is it fine, if I just replicate channel 1 data across all the two channels? Please let me know

-
Regards,
Sravan

soumith

unread,
Apr 24, 2015, 12:04:28 AM4/24/15
to torch7 on behalf of Sravan Kumar Reddy Javaji
Yes, that's fine.

--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at http://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.

Seth Neiman

unread,
Apr 24, 2015, 9:29:33 AM4/24/15
to tor...@googlegroups.com


On Thursday, April 23, 2015 at 9:04:28 PM UTC-7, smth chntla wrote:
Yes, that's fine.
Reply all
Reply to author
Forward
0 new messages