Wikipedia:Reference desk/Archives/Computing/2013 February 28

From Wikipedia, the free encyclopedia
Computing desk
< February 27 << Jan | February | Mar >> March 1 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 28[edit]

Loopback interface[edit]

I have two questions about the implementation of the loopback interface:

  1. I think (almost) all 127.x.x.x addresses are mapped to the loopback interface. If I create a socket, bind it to a particular loopback address 127.a.b.c, and listen for incoming connections, will I get only connections to the particular 127.a.b.c address, or will I get connections for all 127.x.x.x addresses?
  2. For IPC that occurs through the loopback interface, how far down the protocol stack does processing of packets go? Does processing terminate at the IP layer, implying that knowledge about the 127.x.x.x addresses is built into the IP layer handling module? Or does processing terminate one layer down, with some module implementing a virtual network interface?

If either question is not formulated quite right, feel free to turn it into a better formulated one and answer that instead. Thanks. --173.49.13.59 (talk) 05:40, 28 February 2013 (UTC)[reply]

For your first question, at least on my Linux box, they're all different. I used netcat and created the server with
     nc -l 127.0.0.5 9999 
and then clients with
     echo hello | nc 127.0.0.2 9999
they only connect when the IP addresses are identical. -- Finlay McWalterTalk 14:13, 28 February 2013 (UTC)[reply]
For your second question, again just on my Linux box, the communication goes all the way though the TCP/IP stack and in and out of a fake loopback ethernet device. pcap's shims in the networking layer see the packets just like a normal TCP connection, and the only real difference in the captures is that the source and destination MAC addresses in the loopback ethernet frames are all 00s. -- Finlay McWalterTalk 14:23, 28 February 2013 (UTC)[reply]

Camera with more than three color channels[edit]

I would like a digital camera that can take images with more than three color channels.

I hope an image from such a camera could distinguish objects that appear similar color in a regular RGB camera image. I don't know whether the channels should be all in the visible light range, or also in the near infrared or near ultraviolet. The images of the different colors must be taken simultanously (or at least within 50 milliseconds) from the same viewpoint to the same scene, so swapping filters by hand is not a good solution for me, because I want to photograph moving objects.

Where can I buy such a camera for a reasonable price? What terms should I search for on the internet if I want to find some?

If multiple models are available, here are my preferences, but these are not absolute requirements. It should be possible to connect the camera to a computer and send the images right after taking, such as with a webcamera or security camera. It should work indoors, in a room with fluorescent lightning. It should be able to take motion pictures, say at least 20 images per seconds. Should have a resolution of at least 640x480. Should have a not too small viewing angle, such as at least 90 degrees for the longer side of the image. There's no need for variable optics, a fixed zoom and focus fixed to infinitely far away is fine.

b_jonas 21:11, 28 February 2013 (UTC)[reply]

Have a look at Charge-coupled_device#Color_cameras. This leads me to believe that what you're looking for might not be available in a consumer product (I am not an expert here, so maybe someone will correct me). Have you considered rigging multiple inexpensive cameras together? That way you could filter each lens however you like. SemanticMantis (talk) 21:19, 28 February 2013 (UTC)[reply]
I have considered multiple cameras, and that could work if there's no other way. The advantage of a single camera is that the images would be (almost) perfectly aligned in both space and time. With cheap cameras, it's not trivial to even get images aligned in time, and with two separate camera optics of any kind the images will be hard to align, and impossible to match completely for three-dimensional objects. – b_jonas 23:00, 28 February 2013 (UTC)[reply]
Color filter array mentions a few four-color variants of the Bayer array that are found on some consumer cameras. If you're lucky one or more of those might support sensor-raw images from which you could extract the individual channels. In the case of Canon cameras you can use CHDK to get raw files even if the camera doesn't officially support it; I don't know if there's anything similar for other brands. However, although the cameras are probably capable of 20 fps video at 640x480, I seriously doubt you can get that video in raw form. -- BenRG (talk) 01:04, 1 March 2013 (UTC)[reply]

Bayer and similar consumer sensors are three colors. Multispectral image, Infrared photography and Ultraviolet photography are all used for various industrial, medical, military and scientific purposes. They require special cameras. Jim.henderson (talk) 02:00, 1 March 2013 (UTC)[reply]

Sony made one, the DSC-F828. It had an "emerald green" channel in addition to the usual RGB. This did not provide a wider spectral range, but was said to provide better color rendition within the usual range. Jeh (talk) 03:46, 1 March 2013 (UTC)[reply]
The 90° viewing angle seems a bit extreme. Do even wide angle lenses cover that much ? StuRat (talk) 06:36, 1 March 2013 (UTC)[reply]
You could mount the camera on a tripod, and change colour filters. I have had success with infrared filter photographing brightly lit scenery, you can see my pictures on commons. However when trying to combine images taken at different times I have noticed that it can be very sensitive to movement. Things that you don't expect to move do so. Particularly clouds always seem to move and so do plants shifting around in even the gentlest breeze. I tried to get an ultraviolet image by subtracting a UV filter image from a an unfiltered image. This only made images that showed what had changed, so I think that the normal camera lens cuts UV very well anyway. You may also be able to get optically flat neodymium glass that can cut sodium vapour yellow glow. You can get colour filters in a Cokin p series, I suppose you need a camera that can attach filters to the front of the lens. ALmost certainly there will be no consumer grade equipment to do this, so you would have to roll your own. Perhaps you could use a dichroic mirror to split light to two cameras, one with a filter attached. Graeme Bartlett (talk) 08:01, 1 March 2013 (UTC)[reply]
This is how the Wide Field and Planetary Camera 2 on the Hubble Telescope worked: the naked CCDs responded to a wide range of frequencies, and the instrument had a wheel with a range of different filters which it interposed into the optical path. Many of the WFPC2-derived jpegs you see online aren't the output of one exposure, but are composites of several, each taken with different filter settings. Doing this allowed them a very high degree of spectral discrimination without having to build that capability into the CCD. -- Finlay McWalterTalk 15:03, 1 March 2013 (UTC)[reply]
The lens blocks UV, the filter array blocks UV, and the sensor isn't very sensitive to UV to begin with. It's pretty much not possible to do UV photography with an un-modified consumer-grade digital camera. --Carnildo (talk) 03:01, 2 March 2013 (UTC)[reply]
Such wheels also work on Mars rovers. Earth, however, is a more violent environment except in protected places such as photo studios. Jim.henderson (talk) 15:40, 1 March 2013 (UTC)[reply]

Three-strip Technicolor worked by multiple cameras looking through the same path, but dichroic hadn't been invented; beam splitters called for very bright lighting but it worked well, with careful adjustment of three identical cameras. So, use two identical cameras except one doesn't have the hot mirror and, well, doing something about the Bayer or similar filter is going to be more difficult but not entirely necessary. Great fun for someone with the patience that I lack. Jim.henderson (talk) 14:51, 1 March 2013 (UTC)[reply]

To BenRG: so some RGB cameras actually have white pixels as well as red, green and blue? I didn't know that, but it sounds reasonable. I'll have to try to find out which cameras have those, and whether it's possible to get raw images from them.
To Jeh: thank you, I will look up information about that camera.
To StuRat: indeed, only a few cameras support that, I might have to take a compromise there even if I end up using only three-channel images and an RGB camera.
To Finlay and Graeme Bartlett: I understand the astronomers do this to get a rough approximation of the color spectrum of many astronomic objects cheaply. My targets are moving much more quickly so I can't change filters by hand. The only way changing filters could work was if those filters were moved by some very fast mechanical apparatus, like the shutter does in a non-digital camera.
To everyone, thank you for your answers so far. – b_jonas 17:31, 1 March 2013 (UTC)[reply]
Also, as a consequence to the above, one term to look out for is RGBE filter. – b_jonas 17:46, 1 March 2013 (UTC)[reply]
Rapidly moving the mechanical aparatus is called Field-sequential color system which produces excellent color TV but was dropped (except for special purposes such as the Moon landings) due to electronic incompatibility and mechanical complexity. Jim.henderson (talk) 17:45, 1 March 2013 (UTC)[reply]

Wireless + switch + router + internet problem[edit]

I have internet over my house and used a switch, with it I spread the internet to 4+ computers. 2 years ago I got some wireless router (w311r+ from tenda), I did that because I needed to be able to make equipaments be able to connect to internet on the wireless way. I configured the entire stuff, and it used the 3 equipaments, speedstream (thats the internet modem), the (4 ports + 1 port) wireless router and the (8ports) switch. This month, for some reason my internet stopped working, I tried to make it work but I forgot how I did it in the first place. I made it work but using only the internet modem and the switch, I can't make it work (or maybe configure) the wireless router, and so wireless stuff cant use internet.. What is not needed here (the switch will really be needed if I make the wireless router work?) and how I would configure the entire stuff? — Preceding unsigned comment added by 201.78.173.209 (talk) 22:55, 28 February 2013 (UTC)[reply]

If it's working with just the switch and the modem, the problem is with the router. Do you have multiple computers attached to the switch? If so that's odd, because it means your ISP is giving you multiple IPs, which they're not generally known to do for free.
Is the problem with the wiring? Generally in your setup, the wiring would go, modem -> WAN port on your router -> ports (4) on the back of your router -> computer / switch. You only need the switch if you have more than 4 wired devices you need hooked up. Otherwise the switch is just using power and and is an unnecessary extra step.
If you have it physically hooked up and it's still not working, try reseting the router back to factory settings. Usually you do this by plugging it in, and holding down a reset switch on the back or bottom for a while, usually about 30 seconds. Then you log in as though it were brand new, and reconfigure it as you had before.
Let us know if those steps work and if they don't, what happened. Shadowjams (talk) 23:45, 28 February 2013 (UTC)[reply]
"If it's working with just the switch and the modem, the problem is with the router. Do you have multiple computers attached to the switch? If so that's odd, because it means your ISP is giving you multiple IPs, which they're not generally known to do for free.".
I once had only one computer and so only the modem, then I had 2 computers on my house using internet and was able to use share the internet without switch, and it ALWAYS worked. After I got more items that need network wires I got the switcher (thats was 7+ years ago). I was able to use the switcher and share internet between the computers, notebooks....
Only 3 years ago I decided to get a wireless router to have wireless access (and configured/was able to configure it using the 3 items, wireless router, switcher and modem) and it worked, until now. But I will try what you said.201.78.134.18 (talk) 13:05, 1 March 2013 (UTC)[reply]
The OP said 'speedstream'. This sounds like an xDSL device. The vast majority of ethernet xDSL devices actually have some level of NAT routing even if they are sometimes called modems. Nil Einne (talk) 17:07, 1 March 2013 (UTC)[reply]