Image interaction control method and system

By performing grayscale processing, subtraction processing, thresholding processing, and dilation connectivity processing on images collected from the landscape lighting system, the contours of the image data are obtained and the target coordinates are calculated. This solves the problem of the lack of interactivity in the landscape lighting system, enables interaction with tourists, and improves the user experience.

CN108154489BActive Publication Date: 2025-12-23STRONGLED LIGHTING SYST SUZHOU CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201810033784.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-01-15
Publication Date
2025-12-23
Estimated Expiration
2038-01-15

AI Technical Summary

Technical Problem

Existing landscape lighting systems cannot capture visitor images for interactive purposes, resulting in a poor user experience.

Method used

The camera captures color data from images, performs grayscale processing, subtraction processing, thresholding processing, image erosion processing, and dilation connectivity processing to obtain the contour of the image data and calculate the target coordinates, enabling interaction with tourists.

Benefits of technology

It overcomes the problem of high image detection error rate caused by interference from external light sources, and can calculate the actual physical location of the person based on the coordinates of the image and play it in an animated manner to improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108154489B_ABST
    Figure CN108154489B_ABST
Patent Text Reader

Abstract

The application provides an image interaction control method and system, wherein the image interaction control method comprises the following steps: S1, collecting color data of an image; S2, performing gray processing; S3, performing subtraction processing; S4, performing threshold processing to obtain black-and-white image data; S5, performing image erosion processing to remove noise existing in the black-and-white image data; S6, performing inflation connection processing to obtain complete image data; S7, generating a circumscribed rectangle of the contour; S8, calculating the coordinates of a target; and S9, playing the moving target on a display screen according to the coordinates of the target. The application can overcome the problem of high image detection failure rate caused by interference of a circumscribed light source, can calculate the position of an actual physical space according to the coordinates of a portrait in an image, and can play the image of the portrait in an animated way according to the obtained physical space position, thereby realizing interaction with tourists and bringing good user experience to the tourists.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of lighting technology, in particular to an image interaction control method and system. BACKGROUND

[0002] At present, landscape lighting systems exist in places such as scenic spots, however, the existing landscape lighting systems usually only have the function of lighting, cannot collect images of tourists to realize interaction with tourists, and the user experience is poor. Therefore, in view of the above problems, it is necessary to put forward further solutions. SUMMARY

[0003] The present application aims to provide an image interaction control method to overcome the deficiencies in the prior art.

[0004] To solve the above technical problems, the technical scheme of the present application is:

[0005] An image interaction control method applied to a landscape lighting system, the image interaction control method comprising the following steps:

[0006] S1, collecting color data of an image by a camera;

[0007] S2, performing gray scale processing on the collected color data of the image;

[0008] S3, performing subtraction processing on two adjacent frames of image data after gray scale processing;

[0009] S4, performing threshold processing on the data obtained in step S3 to obtain black and white image data;

[0010] S5, performing image erosion processing on the black and white image data to remove noise existing in the black and white image data;

[0011] S6, performing inflation connection processing on the data obtained in step S5 to obtain complete image data;

[0012] S7, finding the outline of the complete image data and generating the circumscribed rectangle of the outline;

[0013] S8, calculating the coordinates of the target according to the circumscribed rectangle;

[0014] S9, playing the moving target on the display screen according to the coordinates of the target.

[0015] As an improvement of the image interaction control method of the present application, in step S2, the collected color data of the image is processed according to the following formula:

[0016]

[0017] Wherein, Gray(x) is the converted gray value, R, G, B represent three primary colors, 299, 587, 114 are the weights of the three primary colors after processing.

[0018] As an improvement of the image interactive control method of the present application, in step S3, the adjacent two frames of images are subtractively processed according to the following formula:

[0019] g(x, y) = f0(x, y) - f1(x, y);

[0020] Wherein, g(x, y) is the difference value of the two frames of continuous images.

[0021] As an improvement of the image interactive control method of the present application, in step S4, threshold processing is performed according to the following formula:

[0022]

[0023] Wherein, dst(x, y) is the result after threshold processing, src(x, y) is the gray value before processing, thresh is the threshold set by the user, otherwise is the pixel value in the original image greater than or equal to the threshold set by the user, and MAXVAL is the maximum value of a specific threshold type.

[0024] As an improvement of the image interactive control method of the present application, in step S8, when calculating the coordinates of the target, the center point coordinates of the rectangle are calculated according to the length and width of the circumscribed rectangle, and the center point coordinates are the coordinate values of the target.

[0025] To solve the above technical problems, the technical scheme of the present application is:

[0026] An image interactive control system applied to a landscape lighting system, the image interactive control system comprising: a camera, a gray processing module, a difference processing module, a threshold processing module, a denoising module, an inflation connection module, a circumscribed rectangle module, a coordinate generation module, and a display screen.

[0027] The camera is used for collecting color data of images; the gray processing module is used for carrying out gray processing on the collected color data of images; the difference processing module is used for carrying out subtraction processing on two adjacent images in the gray processed image data; the threshold processing module is used for carrying out threshold processing on the difference processed data to obtain black and white image data; the denoising module is used for carrying out image erosion processing on the black and white image data to remove noise existing in the black and white image data; the inflation connection module is used for carrying out inflation connection processing on the denoised data to obtain complete image data; the circumscribed rectangle module is used for finding the contour of the complete image data and generating the circumscribed rectangle of the contour; the coordinate generation module is used for calculating and generating the coordinates of the target according to the circumscribed rectangle; and the display screen plays the image of the moving target.

[0028] As an improvement of the image interactive control system of the application, the gray processing module carries out gray processing on the collected color data of images according to the following formula:

[0029]

[0030] wherein Gray(x) is the converted gray value, R, G and B represent three primary colors, and 299, 587 and 114 are the processed weights of the three primary colors.

[0031] As an improvement of the image interactive control system of the application, the difference processing module carries out subtraction processing on two adjacent images according to the following formula:

[0032] g(x,y) = f0(x,y) - f1(x,y);

[0033] wherein g(x,y) is the difference value of two continuous images.

[0034] As an improvement of the image interactive control system of the application, the threshold processing module carries out threshold processing according to the following formula:

[0035]

[0036] wherein dst(x,y) is the result after threshold processing, src(x,y) is the gray value before processing, and MAXVAL is the maximum value.

[0037] As an improvement of the image interactive control system of the application, when the coordinate generation module calculates the coordinates of the target, the center point coordinates of the rectangle are calculated according to the length and width of the circumscribed rectangle, and the center point coordinates are the coordinate values of the target.

[0038] Compared with the prior art, the image interaction control method and system can overcome the problem of high image detection failure rate caused by external light source interference, can calculate the actual physical space position according to the coordinates of the image in the image, and can play the image of the image in an animated manner according to the obtained physical space position, thereby realizing interaction with the tourists and bringing good user experience to the tourists. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0040] Figure 1 The method flowchart of a specific embodiment of the image interaction control method of the present application. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0042] As shown in the drawings, Figure 1 The present application provides an image interaction control method applied to a landscape lighting system, which comprises the following steps:

[0043] S1, acquiring color data of an image by a camera.

[0044] S2, performing gray scale processing on the acquired color data of the image.

[0045] In the formula, Gray(x) is the converted gray scale value, R, G and B represent three primary colors, and 299, 587 and 114 are the weights of the three primary colors after processing. Further, when the above weight processing is performed, it is considered that the image belongs to high-density data and the floating-point operation efficiency is low. Therefore, the original weights 0.299, 0.587 and 0.114 are multiplied by 1000, and then high-efficiency integer operation is performed, and the intermediate result is divided by 1000 to obtain the final result.

[0046]

[0047] In the formula, Gray(x) is the converted gray scale value, R, G and B represent three primary colors, and 299, 587 and 114 are the weights of the three primary colors after processing. Further, when the above weight processing is performed, it is considered that the image belongs to high-density data and the floating-point operation efficiency is low. Therefore, the original weights 0.299, 0.587 and 0.114 are multiplied by 1000, and then high-efficiency integer operation is performed, and the intermediate result is divided by 1000 to obtain the final result.

[0048] S3, subtracting two adjacent frames of image data after the gray scale processing.

[0049] Wherein, two adjacent frames of image data are subtracted according to the following formula:

[0050] g(x, y) = f0(x, y) - f1(x, y);

[0051] Wherein, g(x, y) is the difference between two consecutive frames of image. Through the above subtraction processing, the moving target in the tracking video will be more reliable and efficient, and the calculation amount will be significantly reduced. And it can overcome the problem that the image detection process cannot adapt to changes in light environment and changes in object posture.

[0052] S4, threshold processing is performed on the data obtained in step S3 to obtain black and white image data.

[0053] Wherein, threshold processing is performed according to the following formula:

[0054]

[0055] Wherein, dst(x, y) is the result after threshold processing, src(x, y) is the gray value before processing, thresh is the threshold set by the user, otherwise is the pixel value in the original image greater than or equal to the threshold set by the user, and MAXVAL is the maximum value of a specific threshold type. Thus, through the method of adaptive threshold processing, more scenes and conditions can be adapted.

[0056] S5, image erosion processing is performed on the black and white image data to remove noise existing in the black and white image data.

[0057] After the processing of steps S3 and S4, the image background and part of the interference have been removed, but there is still noise, and step S5 is used to remove the remaining noise by eroding the image. Wherein, image erosion processing can be realized by erode algorithm.

[0058] S6, dilate and connect processing is performed on the data obtained in step S5 to obtain complete image data.

[0059] Although the required data can be obtained through image erosion processing, the obtained data may be damaged or split due to erosion, and through the dilate operation, the target area can become more obvious, and the split and fragmented areas can be connected to form a complete individual.

[0060] S7, find the outline of the complete image data and generate the circumscribed rectangle of the outline.

[0061] The method has the advantages of small amount of calculation in generating the circumscribed rectangle and calculating the position, and can still process in time when a large number of moving objects appear in the field of view. The circumscribed rectangle of the contour can be generated by using a RotatedRect algorithm.

[0062] S8, calculating the coordinates of the target according to the circumscribed rectangle.

[0063] In the process of calculating the coordinates of the target, the center point coordinates of the rectangle are calculated according to the length and width of the circumscribed rectangle, and the center point coordinates are the coordinate values of the target.

[0064] S9, playing the moving target on the display screen according to the coordinates of the target.

[0065] Based on the image interaction control method, the application further provides an image interaction control system applied to a landscape lighting system. The image interaction control system comprises a camera, a gray processing module, a difference processing module, a threshold processing module, a denoising module, a dilation connection module, a circumscribed rectangle module, a coordinate generation module and a display screen.

[0066] The camera is used to collect color data of images. The camera has an imaging capacity of 3 million pixels and a wide dynamic function. The wide dynamic function can ensure clear imaging even if there is continuous or flickering strong light, that is, strong light suppression effect. The mainstream data structure including but not limited to a network port, RS232 and the like is provided. At the same time, the camera has a standard SDK, which includes functions such as occlusion detection, camera state anomaly detection, environmental sound anomaly detection, specified area occlusion, alarm and the like.

[0067] The gray processing module is used to perform gray processing on the collected color data of images. Specifically, the gray processing module performs gray processing on the collected color data of images according to the following formula:

[0068]

[0069] wherein Gray(x) is the converted gray value, R, G and B represent three primary colors, and 299, 587 and 114 are the weights of the three primary colors after processing.

[0070] The difference processing module is used to perform subtraction processing on two adjacent frames of image data after gray processing. Specifically, the difference processing module performs subtraction processing on two adjacent frames of images according to the following formula:

[0071] g(x, y) = f0(x, y) - f1(x, y);

[0072] Wherein g(x, y) is the difference value of two continuous images.

[0073] The threshold processing module is configured to perform threshold processing on the difference-processed data to obtain black-and-white image data.

[0074]

[0075] Wherein dst(x, y) is the result after threshold processing, src(x, y) is the gray value before processing, thresh is the threshold set by the user, otherwise is the pixel value in the original image greater than or equal to the threshold set by the user, and MAXVAL is the maximum value of a specific threshold type.

[0076] The denoising module is configured to perform image erosion processing on the black-and-white image data to remove noise existing in the black-and-white image data.

[0077] The coordinate generation module is configured to calculate the coordinates of the target according to the circumscribed rectangle, and the display screen plays the image of the moving target.

[0078] In summary, the image interaction control method and system can overcome the problem of high image detection failure rate caused by external light source interference, can calculate the actual physical space position according to the coordinates of the image in the image, and can play the image of the image in an animated manner according to the obtained physical space position, thereby realizing interaction with the tourists and bringing good user experience to the tourists.

[0079] It will be obvious to a person skilled in the art that the application is not limited to the details of the above-described exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or essential characteristics of the application. Therefore, the embodiments should be considered as exemplary and non-limiting, and the scope of the application is defined by the appended claims rather than the above description, and all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the application. Any reference signs in the claims should not be considered as limiting the claims involved.

[0080] Furthermore, it should be understood that although the specification is described in terms of embodiments, not every embodiment includes every feature described. The specification can include implicit combinations of explicitly mentioned features and / or explicit combinations of implicitely mentioned features. Each embodiment depends on the explicit combinations of features and / or the implicit combinations of features made specifically within that embodiment, and each such embodiment can be combined with every other such embodiment to create further embodiments.

Claims

1. An image interaction control method applied in a landscape lighting system, characterized in that, The image interaction control method comprises the following steps: S1, acquiring color data of an image by a camera; S2, performing gray scale processing on the acquired color data of the image; S3, performing subtraction processing on two adjacent frames of the image data after the gray scale processing; S4, performing threshold processing on the data obtained in step S3 to obtain black and white image data; S5, performing image erosion processing on the black and white image data to remove noise existing in the black and white image data; S6, performing inflation connection processing on the data obtained in step S5 to obtain complete image data; S7, finding the outline of the complete image data and generating a circumscribed rectangle of the outline; S8, calculating the coordinates of a target according to the circumscribed rectangle; S9, playing the moving target on a display screen according to the coordinates of the target; In step S4, the threshold processing is performed according to the following formula: Wherein, dst(x, y) is the result after threshold processing, src(x, y) is the gray scale value before processing, thresh is the threshold value set by a user, otherwise is the pixel value in the original image greater than or equal to the threshold value set by the user, and MAXVAL is the maximum value of a specific threshold type; In step S2, the gray scale processing is performed on the acquired color data of the image according to the following formula: Wherein, Gray(x) is the converted gray scale value, R, G and B represent three primary colors, and 299, 587 and 114 are the weights of the three primary colors after processing; In step S3, the subtraction processing is performed on two adjacent frames of the image data according to the following formula: g(x, y) = f0(x, y) - f1(x, y); Wherein, g(x, y) is the difference value of two continuous frames of images; In step S8, when calculating the coordinates of the target, the center point coordinates of the rectangle are calculated according to the length and width of the circumscribed rectangle, and the center point coordinates are the coordinate values of the target; Wherein, the image erosion processing is realized by an erode algorithm; Wherein, the circumscribed rectangle of the outline is realized by a RotatedRect algorithm.

2. An image interactive control system applied in a landscape lighting system, characterized in that, The image interaction control system comprises a camera, a gray scale processing module, a difference processing module, a threshold processing module, a noise removal module, an inflation connection module, a circumscribed rectangle module, a coordinate generation module and a display screen; The camera is used to acquire color data of an image; the gray scale processing module is used to perform gray scale processing on the acquired color data of the image; the difference processing module is used to perform subtraction processing on two adjacent frames of the image data after the gray scale processing; the threshold processing module is used to perform threshold processing on the data after the difference processing to obtain black and white image data; the noise removal module is used to perform image erosion processing on the black and white image data to remove noise existing in the black and white image data; the inflation connection module is used to perform inflation connection processing on the data after the noise removal to obtain complete image data; the circumscribed rectangle module is used to find the outline of the complete image data and generate a circumscribed rectangle of the outline; the coordinate generation module is used to calculate the coordinates of a target according to the circumscribed rectangle; and the display screen is used to play the image of the moving target. The threshold processing module performs threshold processing according to the following formula: Wherein, dst(x, y) is the result after threshold processing, src(x, y) is the gray value before processing, MAXVAL is the maximum value; The gray processing module performs gray processing on the color data of the collected image according to the following formula: Wherein, Gray(x) is the converted gray value, R, G, B represent three primary colors, 299, 587, 114 are the weights of the three primary colors after processing; The difference processing module performs subtraction processing on the adjacent two frames of images according to the following formula: g(x, y) = f0(x, y) - f1(x, y); Wherein, g(x, y) is the difference value of the two frames of continuous images; When the coordinate generation module calculates the coordinates of the target, the center point coordinates of the rectangle are calculated according to the length and width of the circumscribed rectangle, and the center point coordinates are the coordinate values of the target; Wherein, the image erosion processing is realized by erode algorithm; Wherein, the circumscribed rectangle of the contour is realized by RotatedRect algorithm.

Citation Information

Patent Citations

  • Method for detecting edges in an image signal

    US6141460A

  • Interactive railcar

    CN102151407A

  • Behavior-monitoring method and behavior-monitoring system

    CN103049748A

  • Moving target detection and tracking system and method based on FPGA

    CN107516296A