CROSS-REFERENCE TO RELATED APPLICATIONS- This application claims the benefit of, and is related to, U.S. Provisional Patent Application No. 61/433,836 titled “3D MODELING AND RENDERING FROM 2D IMAGES,” filed Jan. 18, 2011, that is incorporated by reference herein to the fullest extent allowed. 
FIELD OF THE INVENTION- The present invention is generally related to image generation software which converts a two dimensional image into a three dimensional image. 
BACKGROUND OF THE INVENTION- Using conventional methods, the conversion of a two dimensional image into a three dimensional image involves capturing multiple images of an object or a space, and splicing the images together to create a single image. However, during the conversion of a two dimensional image into a three dimensional image, scaling of the converted image is typically not performed. In addition, conventional conversion applications do not incorporate accurate depth measurements into the converted image. Because of this, conventional conversion systems are not capable of realistically representing a room or object in three dimensional form based on a two dimensional image. 
- A need exists for an image conversion system that allows a user to convert a two dimensional image into a three dimensional image that has accurate height and depth dimensions. 
SUMMARY OF THE INVENTION- Various embodiments of the present invention include a method of converting an image from one form to another form by a conversion apparatus having a memory and a processor, the method including the steps of receiving a captured image, extracting at least one image dimension attribute from the image, calculating at least one dimension attribute of the image based on the image dimension attribute, modifying the image based on the calculated dimension attribute and the extracted dimension attribute, and displaying the modified image on a display unit. 
- Other embodiments include, an image conversion system having a conversion apparatus including an image receiving unit that receives a captured image, a dimension extracting unit that extracts at least one image dimension attribute from the image, an image calculating unit configured to calculate at least one dimension attribute of the image based on the image dimension attribute, an image modifying unit that modifies the image based on the calculated dimension attribute and the extracted dimension attribute, and an image display unit that displays the modified image. 
- These and other features and advantages of the present invention will be apparent from the following detailed description, in conjunction with the appended claims. 
BRIEF DESCRIPTION OF THE DRAWINGS- Details of the present invention, including non-limiting benefits and advantages, will become more readily apparent to those of ordinary skill in the relevant art after reviewing the following detailed description and accompanying drawings, wherein: 
- FIG. 1 depicts a block diagram of an image conversion system suitable for use with the methods and systems consistent with the present invention; 
- FIG. 2A depicts a computer included in the image conversion system ofFIG. 1; 
- FIG. 2B depicts user computers included in the image conversion system ofFIG. 1; 
- FIG. 3 illustrates a process performed by the image conversion system ofFIG. 1; 
- FIG. 4 depicts an image of a room to be converted by the image conversion system ofFIG. 1; 
- FIG. 5 illustrates a process of determining the dimensions of a room from the image ofFIG. 4; 
- FIG. 6A depicts an image of the room inFIG. 4 that includes a removal area and a sample area; 
- FIG. 6B illustrates a process for removing objects placed in the image ofFIG. 4; and 
- FIG. 7 illustrates a process of inserting a new object into the converted image inFIG. 4. 
DESCRIPTION- While the present disclosure is susceptible of embodiment in various forms, there is shown and described herein below, and in the attached pages, one or more embodiments with the understanding that the present disclosure is to be considered illustrative only and is not intended to limit the disclosure to any specific embodiment described or illustrated. 
- The present disclosure is directed to systems and methods for rendering one or more two dimensional images, e.g., photographs and/or video, into a three dimensional virtual environment, or background, that can be manipulated by arranging three dimensional virtual objects in the three dimensional environment, altering lighting, changing textures and colors, etc, and presenting the altered two dimensional image from a virtual camera viewpoint, and with a virtual camera orientation, that can be interactively changed. In one non-limiting example, one or more photographs are taken of a room, such as a living room, and the photograph(s) are rendered into a three dimensional virtual environment of the room generally according to the following steps: receiving suitable image(s), such as a picture taken with a fixed focal length, having a view that is substantially not rotated or tilted about an optical axis, and showing at least two walls of the room and the ceiling and floor; removing foreground objects from the image(s); identifying corners of the room and inputting a ceiling height; and surveying the lighting in the image(s), such as by identifying positions and types of light sources, which can be used to shade three dimensional virtual objects (e.g., chairs) and planes (e.g., floors) consistently with the image(s). Three dimensional virtual objects can be rendered from 2D images in a similar manner and/or can be rendered using off-the-shelf software applications. More particularly, the present systems and methods may include rendering various faces of the three dimensional virtual object, e.g., front, back, left, right, top, and bottom faces, defining a three dimensional coordinate system, assigning a size scale and units, and analyzing color and texture of the object. Attached hereto are additional details of the systems and methods to supplement the above description. 
- FIG. 1 depicts a block diagram of an image conversion system100 suitable for use with the methods and systems consistent with the present invention. The image conversion system100 comprises a plurality ofcomputers102,104, and106 connected via anetwork108. Thenetwork108 is of a type that is suitable for connecting thecomputers102,104, and106 for communication, such as a circuit-switched network or a packet-switched network. Also, thenetwork108 may include a number of different networks, such as a local area network, a wide area network such as the Internet, telephone networks including telephone networks with dedicated communication links, connection-less network, and wireless networks. In the illustrative example shown inFIG. 1, thenetwork108 is the Internet. Each of thecomputers102,104, and106 shown inFIG. 1 is connected to thenetwork108 via a suitable communication link, such as a dedicated communication line or a wireless communication link. 
- In an illustrative example,computer102 serves as an image conversion management unit that includes animage receiving unit110, aninformation gathering unit112, animage analysis unit114, and animage conversion unit116. The number ofcomputers102,104, and106, and thenetwork108 configuration, shown inFIG. 1 are merely an illustrative example. One having skill in the art will appreciate that the image conversion system100 may include a different number of computers and networks. For example,computer102 may include theinput receiving unit110 as well as theinformation gathering unit112. Further, theimage analysis unit114 andimage conversion unit116 may reside on a different computer thancomputer102. 
- FIG. 2A shows a more detailed depiction ofcomputer102.Computer102 comprises a central processing unit (CPU)202, an input output (I/O)unit204, adisplay device206, asecondary storage device208, and amemory210.Computer102 may further comprise standard input devices such as a keyboard, a mouse, a digitizer, or a speech processing means (each not illustrated). 
- Computer102'smemory210 includes a Graphical User Interface (“GUI”)212 that is used to gather information from a user via thedisplay device206 and I/O unit204 as described herein. The GUI212 includes any user interface capable of being displayed on adisplay device206 including, but not limited to, a web page, a display panel in an executable program, or any other interface capable of being displayed on a computer screen. Thesecondary storage device208 includes anobject storage unit214 and alighting storage unit216, which will be discussed herein. Further, the GUI212 may also be stored in thesecondary storage unit208. In one embodiment consistent with the present invention, the GUI212 is displayed using commercially available hypertext markup language (“HTML”) viewing software such as, but not limited to, Microsoft Internet Explorer, Google Chrome, or any other commercially available HTML viewing software. 
- FIG. 2B shows a more detailed depiction ofuser computers104 and106.User computers104 and106 each comprise a central processing unit (CPU)222, an input output (I/O)unit224, adisplay device226, asecondary storage device228, and amemory230.User computers104 and106 may further each comprise standard input devices such as a keyboard, a mouse, a digitizer, or a speech processing means (each not illustrated). 
- User computers104 and106memory230 includes aGUI232 which is used to gather information from a user via thedisplay device226 and I/O unit224 as described herein. TheGUI232 includes any user interface capable of being displayed on adisplay device226 including, but not limited to, a web page, a display panel in an executable program, or any other interface capable of being displayed on a computer screen. The GUI232 may also be stored in thesecondary storage unit228. In one embodiment consistent with the present invention, the GUI is displayed using commercially available HTML viewing software such as, but not limited to, Microsoft Internet Explorer, Google Chrome or any other commercially available HTML viewing software. 
- FIG. 3 illustrates a process performed by the image conversion system100. Instep302, an image is captured by an image capturing unit communicatively coupled to acomputer102,104, or106. The image may be captured using any conventional image capturing device such as, but not limited to, a digital camera or any other device capable of capturing an image and converting the image into a digital format. The image is transmitted to theimage receiving unit110 operating in the memory of thecomputer102 instep304 using any conventional information transferring method. 
- Instep306, information concerning the captured image is gathered by theinformation gathering unit112. Theinformation gathering unit112 may prompt a user to enter information concerning the image including, but not limited to, the focal length of the image capturing unit, whether a flash was used during the capture of the image, the location where the image was taken, and the time of image capture. In another embodiment, the information is extracted from the image using any conventional image information extraction method including, but not limited to, analyzing the EXIF information embedded in the image. Theinformation gathering unit112 may also retrieve additional information concerning the image from the image capturing device, such as the geographical location of the user capturing the image via a global positioning system (GPS) receiver coupled to the image capturing device. Instep308, theimage analysis unit114 determines the physical dimensions of the room in which the image was captured, based on the image information. 
- Instep310, theimage analysis unit114 identifies objects in the image. Theimage analysis unit114 may identify objects in an image by analyzing the pixels in the image to determine lines where the pixel colors change from one color to another. Theimage analysis unit114 may also identify objects by comparing areas identified in the image to a database of known images. Instep312, theimage analysis unit114 identifies the source of light into the room and direction from which the light enters the room and strikes objects in the room. Theimage analysis unit114 may utilize the information gathered by theinformation gathering unit112 in determining the source of light into the room. 
- Instep316, theimage conversion unit116 converts the image from a two dimensional image into a three dimensional image using the dimensions of the room. Theimage conversion unit116 generates a three dimensional plane for each wall of the room, and stores these planes in thememory210. In addition, theimage conversion unit116 converts each object in the room into a three dimensional object by relating the dimensions of each object to the dimensions of the room and the position of each object within the room. 
- Instep318, theimage conversion unit116 presents the converted image to the user via theGUI232 coupled to theuser device104 or106. Objects within the converted image are selectable by the user such that the user may move the object within the converted image or delete the object from the image entirely. Once an object is deleted from the converted image, theimage analysis unit114 andimage conversion unit116 generate a revised image without the object as will be discussed herein. 
- Instep320, theimage conversion unit116 adjusts the appearance of the room, or a selected object in the room, based on viewing information gathered by theGUI232. Objects, walls, the floor, and the ceiling are displayed on thedisplay unit226 of theuser computer104 or106 such that a user may select a wall, object, floor, or ceiling, and change the attributes of the selected item. The attributes may include, but are not limited to, the texture or color of the selected item. Theimage conversion unit116 adjusts the appearance of the selected items based on the calculated light source and dimensions of the room. 
- Instep322, theGUI232 on theuser device104 or106 displays a list of objects to insert into the converted image from theobject storage unit210 in thesecondary storage208 of thecomputer102. The objects in theobject storage unit210 include information concerning each object listed including, but not limited to, the dimensions of the object, the color of the surfaces of the object, the composition of each surface and the reflective characteristics of each surface. Theimage conversion unit116 gathers the information on each object along with the position and intensity of the lighting sources of the room, and renders the object in the room with accurate depictions of how the image would appear in the room. 
- Instep324, theimage conversion unit116 renders the image on thedisplay unit226. The rendering of the room is performed from a predetermined viewing location and orientation that may be adjusted by a user via theGUI232. The rendering may be performed by theimage conversion unit116 by at least oneCPU202 or222 in at least one computer. A user may adjust the viewing location such that the image is viewed from different virtual locations. As an illustrative example, a user may move the viewing location to a virtual location above the room. Theimage conversion unit116 is configured to adjust the image such that the image, and all objects in the image, are viewed from a viewing location above the room. 
- FIG. 4 depicts a twodimensional image400 of a room captured by an image capture device. Theimage400 includes aback wall402 having a height (h), aleft sidewall404, aright sidewall406, afloor408, and aceiling410. Theback wall402 and theright side wall406 are separated by an angle a. Theback wall402 and theleft sidewall404 are separated by the angle b. Theback wall402 also includes twowindows412 and414, and theleft sidewall404 includes awindow416. 
- TheGUI232 may gather information on the depth of theimage400. As an illustrative example, the width D of thewindow416 may be gathered to determine the depth of the image, where the depth of the image represents a length in the image in a direction parallel to thesidewalls404 and406 towards theback wall402. Theroom400 may also be represented by an image including only two visible walls, walls that are only partially visible, images not showing the ceiling or floor, or an image angled from an optical plane. The image may be angled from the optical plane by 30 degrees or less. 
- FIG. 5 illustrates a process of determining the dimensions of a room from animage400. Instep502, theinformation gathering unit112 presents theimage400 to a user via theGUI232 on theclient device104/106. Instep504, theinformation gathering unit114 receives basic dimensional information of the image via theGUI232, and from the information stored in the image such as EXIF information. The basic dimensional information may include the ceiling to floor height h of theroom400 depicted in theimage400, the angles a and b between theback wall402 and thesidewalls404 and406 in theimage400, the length of lines that form intersections betweenwalls402,404, and406, theceiling410, and thefloor408, a depth dimension such as the width of an object or feature on one of thesidewalls404 or406 (i.e. the width D of the window416). TheGUI232 may allow a user to draw lines over the image indicating the intersections of thewalls402,404, and406 in the image. Theimage analysis unit114 may also use a line analysis algorithm to identify where the lines that forms the intersections between thewalls402,404, and406 in the image. The line analysis algorithm may include a Hough transform algorithm or any other image line analysis algorithm that is known in the art. 
- Instep506, theimage analysis unit114 identifies thewalls402,404, and406 displayed in theimage400 based on the information gathered from theinformation gathering unit112. Thewalls402,404, and406 are identified in the image as the pixels in the captured image contained in the non-self-intersecting polygons formed by pairs of neighboring lines which form the intersection between walls. As an illustrative example, referring toFIG. 4, theback wall402 is defined by area between the lines c, d, e, and f. 
- Instep508, theimage analysis unit114 gathers information on eachwall402,404, and406. The information may include the color of each wall, objects positioned near each wall such as furniture, and any windows or openings in each wall. To gather this information, theimage analysis unit114 systematically analyzes the pixels in each wall to determine the colors of each wall, and the relative location of each color on each wall. In addition, theimage analysis unit114 analyzes the pixels in each wall to determine any objects positioned in front of the wall. 
- Instep510, theimage analysis unit114 calculates an initial estimate of the room dimensions and the image capturing device properties based on the basic dimensional information gathered from the image. First, the initial estimate of all viewing locations and rotation values is set to zero. The initial estimate of the room dimensions is calculated based on the lines identified in the image that indicate the intersections between walls using the approximation of projection with a pinhole camera characterized by the equation: 
 
- Where Lldenotes the height of the wall as measured in pixels in theimage400, LWdenotes the physical height h of the room in theimage400, f denotes the focal length of the image capture device that captured the image, and z denotes the physical distance between the image capture device and each wall intersection. 
- Theinformation gathering unit112 may extract the focal length f from the information stored in the image such as EXIF information, or gather the image capture device focal length via theGUI232. Theimage analysis unit114 may also determine two or more “vanishing” points for the image. A vanishing point being defined as the intersection points of the lines along the edges of the walls as they appear projected in theimage400, from which the focal length f can be calculated directly using the standard camera projection equations that are known in the art. In addition, when the length D inimage400 is defined, the focal length f may be calculated by dividing the room dimensions by a scaling factor that is determined based on the pixel length D in the image and the provided physical length of the ruler D. When the angles a and b inimage400 are greater than or less than 90 degrees, the focal length f may be calculated by theimage analysis unit114 by scaling the room dimensions along the depth direction based on the angles a and b. 
- Instep512, theimage analysis unit114 performs a Levenberg-Marquardt optimization of the initial values of the room dimensions and the camera properties as calculated instep510. The optimization consists of the iterative minimization of the cost C, calculated as C=Σi=0n(yi−Pi(x,α))2, where the set of values y contains the locations in theimage400 of the four corner points of each of thewalls402,404, and406, and optionally the locations in theimage400 of the two end points of the ruler D. The vector x consists of the dimensions of the room in the form of the locations in 3D of the floor corner points and the physical room height h. The vector a consists of the camera properties in the form of the 3D location, the 3D orientation, and the focal length of the camera. The function P is the photographic projection of the 3D room geometry in the form of the vector x by the camera as defined by the vector α into theimage400. In the first iteration, the values of x and α as calculated instep510 are used. 
- Instep514, a virtual three-dimensional representation of the room in theimage400 is stored inmemory210 of thecomputer102 along the optimal vector x, which defines the dimensions of the room, and the information previously gathered instep508 that defines the appearance of the room. 
- After the three dimensional representation of theimage400 is rendered, a user may rotate and pan around the image via theGUI232. When the image is panned, or rotated, theimage analysis unit114 adjusts the dimensions of the room such that the room conveys a view of the room that is substantially identical to the view of a person standing in the same location as the virtual camera. Theimage analysis unit114 may consistently adjust the lengths of walls and other object dimensions to ensure the accuracy of the image is maintained. 
- A user may adjust the viewing location, virtual location, of the user such that the room is viewed from different perspectives. As an illustrative example, if a user changes the viewing location, via theGUI232, to a position looking into the room from the right sidewall, theimage analysis unit114 renders the image as if the viewer were standing against theright sidewall406. Since the information pertaining to each wall and object, such as color and texture, are known, theimage analysis unit114 can re-render the image using the calculated dimensions of the room and objects in the room and the stored colors and textures of the objects and walls. 
- FIG. 6A depicts animage400 of a room that includes aremoval area602 including anobject604 and asample area606. The object may be, but is not limited to a picture.FIG. 6B illustrates a process for removing objects placed in front of, or on, thewalls402,404, and406 in theimage400. Instep608, theimage analysis unit114 identifies at least oneremoval area602 in the image. TheGUI232 may provide tools that allow for the selection of areas within an image where an object may be identified. As an illustrative example, a user may utilize tools that allow a user to draw a box over an area on the image having objects that the user wants removed from the image. 
- Instep610, theimage analysis unit114 identifies at least onesample area604 for the identifiedremoval area602. Thesample area606 represents an area having information that will replace objects removed in theremoval area602. Theimage analysis unit114 may identify another portion of the wall outside the picture as thesample area606 that will be applied to the portion of the image covered by theobject604. Thesample area606 may be identified using the same techniques as identifying theremoval area602. 
- Instep612, theimage analysis unit114 identifiesobjects604 within theremoval area602. Theimage analysis unit114 may use any known object identification technique such as edge detection, image matching, or any other known image identification technique. Theimage analysis unit114 may utilize a fronto parallel view of the image to identify objects in theremoval area602. 
- Instep614, theimage analysis unit114 divides theremoval area602 into target patches. The target patches may be of the same size and shape. Each of the target patches represents a portion of theremoval area602 where the pixel information in that area is removed and replaced by the pixel information from thesample area606. Theremoval area602 may be subdivided by covering theremoval area602 with a grid of rectangles with each rectangle in the grid being a target patch. The size of the rectangles in the grid, and therefore the size of each target patch, may be 1/20thof the dimension of theimage400. The size of the complete grid may be one and a half times the size of a box bounding theremoval area602 to create an overlap between the removal box and a portion of the image surrounding theremoval area602. 
- Instep616, theimage analysis unit114 identifies the traversal order of the target patches in theremoval area602. The target patch traversal order may be based on the amount of pixel information available on the borders of each target patch. As an illustrative example, target patches along the edges of theremoval area602 may have pixel information on at least one edge bordering theremoval area602 whereas target patches in the center of theremoval area602 may not have any pixel information on the edges of the target patch. Accordingly, the traversal order may place target patches on the border of the removal area earlier in the traversal order than target patches not bordering the edges of the removal area. 
- Instep618, a group of sample patches is generated from the identifiedsample area606. Each sample patch in the group may be a rectangle of a fixed size that is twenty five percent larger than the size of each target patch. The group of sample patches is created by visiting random locations in eachsample area606, and extracting pixel information from each sample patch. Information is gathered from sample patches in thesample area606 until information on a predetermined number of sample patches is gathered. 
- A single linear gradient of random size, and of random orientation, is applied to each potential sample patch. Subsequently, each potential sample patch is multiplied with an intensity correction factor. The intensity correction factor may be within the range of approximately 0.75 to approximately 1.3, and is chosen to provide the best fit to the selected target patch surroundings. The quality measure of the fit is a sum of squared differences calculation between all pixel values in the border region of a potential sample patch, and the pixel values of the pixels surrounding the target patch to which the sample patch is compared. Because the sample patches are larger than the target patches, their border regions overlap with surrounding target regions allowing for the quality measure to utilize the sum of squared difference calculation. The quality measurement is then stored in thememory210 of thecomputer102. 
- In step620, a sample patch is randomly selected from a percentage of sample patches having the highest quality measurement. The percentage may be 5 percent, 10 percent, 15 percent or larger of the sample patches in the group. Instep622, the outline of the sample patch that will be inserted into the selected target patch is determined. The outline may be determined by dynamic programming to determine the optimal cut through the border region of the selected sample patch. The border region is defined as the region of the selected sample patch that extends beyond the edges of the selected target patch when the selected sample patch is overlaid on the selected target patch. 
- Instep624, the selected sample patch is inserted into the selected target patch. Inserting the selected sample patch is defined as replacing the pixel information in the selected target patch with the pixel information of the selected sample patch. Prior to inserting the selected sample patch information into the selected target patch, the selected target patch information is stored in thememory210. 
- In step626, theimage analysis unit114 determines if all target patches have been analyzed. If all target patches have not been analyzed, the process returns to step616. If all target patches have been analyzed, the completely filled inremoval area602 is presented from the original camera viewpoint. 
- FIG. 7 illustrates a process of inserting a new object into the converted image. Instep702, a plurality of objects is retrieved from theobject storage unit214 along with sizing information for the object such as height, width and depth. Instep704, the listing of objects is displayed on a portion of theGUI232 adjacent to the converted image. Instep708, theimage analysis unit114 scales the object based on the dimensions of the room. As an illustrative example, if the object selected is a chair that is 0.45 meters (18 inches) tall would be scaled such that the height of the chair would be represented as the equivalent height in the image. Instep710, the object is rendered in the image. Instep712, the object color and texture is adjusted based on information gathered by theGUI232. The objects may include, but are not limited to, furniture, clothing, window treatments, pictures, mechanical devices such as vents, soffits, and fans, light fixtures, and consumer electronics such as speakers, video display devices, computers, and mobile phones. The objects may also include art, sculptures, or any other object that is related to the image being displayed. 
- As one having ordinary skill in the art will appreciate, the above referenced methods are not restricted to rooms. Instead, the methods described herein are applicable to any image include, clothing, landscapes, consumer products or any other item that may be captured in a two dimensional image. 
- It should be understood that various changes and modifications to the embodiments disclosed herein will be apparent to those skilled in the art. Such changes and modifications can be made without departing from the spirit and scope of the present disclosure and without diminishing its intended advantages.