CN113450281A - Cucumber fruit type identification system based on photoelectric technology - Google Patents

Cucumber fruit type identification system based on photoelectric technology Download PDF

Info

Publication number
CN113450281A
CN113450281A CN202110777821.6A CN202110777821A CN113450281A CN 113450281 A CN113450281 A CN 113450281A CN 202110777821 A CN202110777821 A CN 202110777821A CN 113450281 A CN113450281 A CN 113450281A
Authority
CN
China
Prior art keywords
image
cucumber
spectral
module
fruit type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110777821.6A
Other languages
Chinese (zh)
Inventor
张鹏
周胜军
朱育强
王欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Academy of Agricultural Sciences
Original Assignee
Zhejiang Academy of Agricultural Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Academy of Agricultural Sciences filed Critical Zhejiang Academy of Agricultural Sciences
Priority to CN202110777821.6A priority Critical patent/CN113450281A/en
Publication of CN113450281A publication Critical patent/CN113450281A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Processing (AREA)

Abstract

The invention belongs to the technical field of cucumber identification, and discloses a cucumber fruit type identification system based on a photoelectric technology, which comprises: the device comprises a cucumber information acquisition module, a spectral image acquisition module, an image preprocessing module, an image analysis module, a central control module, a standard image acquisition module, a database construction module, an information analysis module, a cucumber fruit type judgment module and a database updating module. The cucumber fruit type identification system based on the photoelectric technology acquires a spectral image of a cucumber to be identified and a standard fruit type image of the cucumber based on the spectral sensor, analyzes and compares the acquired information to obtain a cucumber fruit type identification result, stores the identification result and the corresponding image, updates a database and is more convenient to identify again; the cucumber fruit type identification method is simple, high in identification accuracy and low in identification cost, and can be popularized and used.

Description

Cucumber fruit type identification system based on photoelectric technology
Technical Field
The invention belongs to the field of cucumber identification systems, and particularly relates to a cucumber fruit type identification system based on a photoelectric technology.
Background
Cucumber is widely distributed in China and even in multiple regions of the world, is one of the main vegetables eaten by residents of multiple countries, and has many benefits on human bodies. However, cucumbers have various fruit types, and more than ten common cucumber fruit types exist. The accurate judgment of the type of the cucumber is a precondition for cucumber cultivation. The traditional cucumber fruit type identification is basically judged by means of visual estimation of agricultural producers, and the detection method has many defects, such as strong subjectivity, low identification speed, high identification intensity, high false identification rate, poor real-time performance and the like, and the requirement of large-range cucumber fruit type identification is difficult to meet.
Through the above analysis, the problems and defects of the prior art are as follows:
(1) the traditional cucumber fruit type identification is basically judged by means of visual estimation of agricultural producers, and the detection method has many defects, such as strong subjectivity, low identification speed, high identification intensity, high false identification rate, poor real-time performance and the like, and the requirement of large-range cucumber fruit type identification is difficult to meet.
(2) Inaccurate and inefficient identification of cucumber fruit types can have great adverse effects on cucumber cultivation.
The significance of solving the problems and the defects is as follows: the cucumber fruit type identification system based on the photoelectric technology acquires a spectral image of a cucumber to be identified and a standard fruit type image of the cucumber based on the spectral sensor, analyzes and compares the acquired information to obtain a cucumber fruit type identification result, stores the identification result and the corresponding image, updates a database and is more convenient to identify again; the cucumber fruit type identification method is simple, high in identification accuracy and low in identification cost, and can be popularized and used.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a cucumber fruit type identification system based on a photoelectric technology.
The invention is realized in such a way that a cucumber fruit type identification system based on photoelectric technology comprises:
and the cucumber information acquisition module is connected with the central control module and is used for acquiring the cucumber information to be identified through the cucumber information acquisition module to obtain the cucumber information to be identified.
And the spectral image acquisition module is connected with the central control module and is used for acquiring the cucumber spectral image to be identified through the spectral camera to obtain the cucumber spectral image to be identified.
And the image preprocessing module is connected with the central control module and is used for preprocessing the cucumber spectral image to be identified through an image preprocessing program to obtain a processed image.
And the image analysis module is connected with the central control module and used for analyzing the processed image through an image analysis program to obtain an image analysis result.
And the central control module is connected with the cucumber information acquisition module, the spectral image acquisition module, the image preprocessing module and the image analysis module and is used for controlling the operation of each connecting module through the main control computer so as to ensure the normal operation of each module.
And the standard image acquisition module is connected with the central control module and is used for acquiring the standard cucumber fruit type image through a standard image acquisition program to obtain the standard cucumber fruit type image.
And the database construction module is connected with the central control module and used for constructing the standard fruit type database of the cucumber through a database construction program to obtain the standard fruit type database of the cucumber.
And the information analysis module is connected with the central control module and is used for analyzing the acquired image analysis result and the cucumber standard fruit type database through an information analysis program to obtain an information analysis result.
And the cucumber type judging module is connected with the central control module and used for judging the cucumber type according to the obtained information analysis result through the cucumber type judging program to obtain a cucumber type judging result.
And the database updating module is connected with the central control module and used for updating the standard cucumber type database according to the obtained cucumber type judgment result and the spectral image of the cucumber to be identified through a database updating program to obtain the cucumber type identification database.
Further, the cucumber information acquisition and image acquisition module uses a micro device for cucumber image identification: the system comprises an image collector and a system identification platform, wherein the image collector comprises a USB camera, and the system identification platform comprises a data memory, a program memory, an LCD display screen, a USB controller, a USB memory and a USB keyboard; the processor can realize effective connection among the operation steps, exchange information, simultaneously collect the cucumber fruit type information and extract and identify the characteristic information of the cucumber fruit type; the USB controller, the USB memory and the USB keyboard are used as a manual operation interface of the system and are used for providing the functions of adding, deleting, restoring and storing information; the output end of the micro device is respectively connected with the data memory and the LCD screen, the received and processed data is transferred into the data memory for storage, and various processing results in the cucumber image identification process are displayed on the LCD screen.
Further, the preprocessing of the cucumber spectral image to be identified is performed through an image preprocessing program to obtain a processed image, and the preprocessing includes: obtaining a plurality of spectral images to be processed, each spectral image to be processed including a number of lines reflecting an image size; finding out a to-be-processed spectral image with the minimum line number in the plurality of to-be-processed spectral images, and taking the to-be-processed spectral image as a reference image; correcting the plurality of spectral images to be processed according to the minimum line number of the reference image, and taking the corrected spectral images to be processed and the reference image as corrected spectral images; aiming at each correction version spectral image, obtaining the brightness and an adjustment coefficient of the correction version spectral image, and adjusting the brightness of the correction version spectral image according to the adjustment coefficient to obtain an adjustment version spectral image; obtaining a calibration formula, and performing spectrum calibration processing on the spectral image of each adjustment version by adopting the calibration formula aiming at the spectral image of each adjustment version to obtain a spectrum calibration image; acquiring the spectral reflectivity of the spectral calibration image aiming at each spectral calibration image, and smoothing the spectral calibration image according to the spectral reflectivity to obtain a smooth spectral image; the smoothed spectral image is enhanced. The enhancing the smoothed spectral image comprises: converting the RGB image into a YUV image to obtain a Y-channel image of the YUV image;
performing edge image extraction on the Y-channel image through an improved Laplace detection operator to obtain an edge image; the edge image extraction is carried out on the Y channel image through the improved Laplace detection operator to obtain an edge image, and the method comprises the following steps:
multiplying gradient of all directions of a Laplace detection operator by n;
multiplying the Laplace detection operator multiplied by n by k in the horizontal and vertical directions;
carrying out edge sharpening on the edge image to obtain an image edge sharpening image;
enhancing the edge information of the image edge sharpening image through improved image enhancement;
converting the Y-channel image of the enhanced image edge image into an RGB image, and outputting the RGB image and the image edge sharpening image to obtain an enhanced image;
the edge sharpening is performed on the edge image to obtain an image edge sharpening image, and the method comprises the following steps:
and carrying out edge sharpening on the edge image by adopting a function expression according to the value of the Y-channel data, wherein the function expression is as follows:
Figure BDA0003156413170000041
wherein x is Y channel data, m is an amplification factor, x1 is an edge and noise threshold, and x2 is a strong edge threshold;
further, the correcting the plurality of spectral images to be processed according to the minimum number of lines of the reference image includes: and for each spectral image to be processed in the plurality of spectral images to be processed, removing the line number of the spectral image to be processed according to the minimum line number, so that the line number of the spectral image to be processed subjected to the removing process is consistent with the minimum line number.
Further, the adjusting the brightness of the corrected spectral image according to the adjustment coefficient to obtain an adjusted spectral image includes: obtaining the brightness of each wave band number in all wave band numbers of the corrected version spectrum image, and calculating the average value of the brightness of all the wave band numbers; calculating an adjustment coefficient of the corrected version image according to the average value; and adjusting the brightness corresponding to each pixel value in each wave band of the corrected spectral image according to the adjustment coefficient to obtain the adjusted spectral image.
Further, the adjusting the brightness corresponding to each pixel value in each band of the corrected spectral image according to the adjustment coefficient includes:
adjusting by adopting a formula:
ak(i,j)=bk(i,j)×t(i,j);
wherein i is the number of columns of the corrected spectral image, and the value range of i is from 1 to the set value of the number of columns; j is the line number of the spectral image of the correction version, and the value range of j is from 1 to the line number set value;
k is the number of wave bands, and the value range of k is from 1 to the set value of the number of wave bands;
ak(i, j) is the pixel value of the adjusted brightness;
bk(i, j) is the pixel value of the unadjusted brightness;
t (i, j) is an adjustment coefficient, and t (i, j) is calculated by the average value.
Further, the enhancing the edge information of the image edge sharpening image through improved image enhancement includes: acquiring a Y-channel image brightness value; acquiring the brightness value of the enhanced Y-channel image by using preset parameters through the brightness value of the Y-channel image and the image edge sharpening image; and according to the brightness value of the enhanced Y-channel image, reducing the brightness of the brightness value exceeding a preset maximum brightness value through a preset parameter, and improving the brightness of the brightness value lower than a preset minimum brightness value.
Further, the RGB image is converted into a YUV image, and a Y-channel image of the YUV image is obtained, where the formula is:
Figure BDA0003156413170000051
further, the invention provides a database operation flow capable of processing and storing different cucumber types. The method comprises the following steps:
(1) collecting cucumber fruit type images;
(2) deleting the abnormal image;
(3) storing the data into a sample library of a database;
(4) preprocessing the image;
(5) carrying out model training to realize the function of dividing the cucumbers in the sample library into different fruit type groups according to different cucumber fruit types and characteristics;
(6) identifying cucumber fruit type images;
(7) identifying a result;
(8) the expert audits;
(9) and outputting different fruit types according to whether each piece of data meets the set fruit type characteristics.
Another object of the present invention is to provide an information data processing terminal, wherein the information data processing terminal is used for implementing the cucumber fruit type identification system based on the photoelectric technology.
It is a further object of the present invention to provide a computer program product stored on a computer readable medium, comprising a computer readable program for providing a user input interface for applying said photo-electric based cucumber fruit type identification system when executed on an electronic device.
Another object of the present invention is to provide a computer-readable storage medium storing instructions which, when executed on a computer, cause the computer to apply the system for identifying fruit type of cucumber based on optoelectronic technology.
By combining all the technical schemes, the invention has the advantages and positive effects that: the invention provides a cucumber fruit type identification system based on a photoelectric technology, which is characterized in that a spectral image of a cucumber to be identified and a standard cucumber fruit type image are obtained based on a spectral sensor, the obtained information is analyzed and compared to obtain a cucumber fruit type identification result, the identification result and the corresponding image are stored, a database is updated, and the identification is more convenient for re-identification; the cucumber fruit type identification method is simple, high in identification accuracy and low in identification cost, and can be popularized and used.
Drawings
Fig. 1 is a block diagram of a cucumber fruit type identification system based on a photoelectric technology according to an embodiment of the present invention.
Fig. 2 is a flow chart of a cucumber fruit type identification method based on a photoelectric technology provided by the embodiment of the invention.
Fig. 3 is a spectrum image of cucumber after pretreatment according to an embodiment of the present invention.
Fig. 4 is a modified spectral image provided by an embodiment of the present invention.
Fig. 5 is an enhanced smoothed spectral image provided by an embodiment of the present invention.
The meanings indicated by the reference numbers in the figures are: 1. a cucumber information acquisition module; 2. a spectral image acquisition module; 3. an image preprocessing module; 4. an image analysis module; 5. a central control module; 6. a standard image acquisition module; 7. a database construction module; 8. an information analysis module; 9. a cucumber type judging module; 10. and a database updating module.
Fig. 6 is a flowchart illustrating operations of a database according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Aiming at the problems in the prior art, the invention provides a cucumber fruit type identification system based on a photoelectric technology, and the invention is described in detail with reference to the accompanying drawings.
As shown in fig. 1, a cucumber fruit type identification system based on a photoelectric technology provided by an embodiment of the present invention includes:
cucumber information acquisition module 1: the cucumber identification device is connected with the central control module 5 and used for acquiring cucumber information to be identified through the cucumber information acquisition module to obtain the cucumber information to be identified;
the spectral image acquisition module 2: the cucumber spectral recognition system is connected with the central control module 5 and used for collecting cucumber spectral images to be recognized through the spectral camera to obtain the cucumber spectral images to be recognized;
the image preprocessing module 3: the central control module 5 is connected with the cucumber spectral image recognition module and is used for preprocessing the cucumber spectral image to be recognized through an image preprocessing program to obtain a processed image;
the image analysis module 4: the central control module 5 is connected with the image processing module and is used for analyzing the processed image through an image analysis program to obtain an image analysis result;
the central control module 5: the device is connected with a cucumber information acquisition module 1, a spectral image acquisition module 2, an image preprocessing module 3, an image analysis module 4, a standard image acquisition module 6, a database construction module 7, an information analysis module 8, a cucumber fruit type judgment module 9 and a database updating module 10, and is used for controlling the operation of each connection module through a main control computer and ensuring the normal operation of each module;
the standard image acquisition module 6: the central control module 5 is connected with the central control module and is used for acquiring the standard cucumber fruit type image through a standard image acquisition program to obtain a standard cucumber fruit type image;
the database construction module 7: the central control module 5 is connected with the central control module and is used for constructing a standard fruit type database of the cucumber through a database construction program to obtain the standard fruit type database of the cucumber;
the information analysis module 8: the central control module 5 is connected with the central control module and is used for analyzing the acquired image analysis result and the cucumber standard fruit type database through an information analysis program to obtain an information analysis result;
cucumber fruit type judging module 9: the central control module 5 is connected with the central control module and used for judging the cucumber type according to the obtained information analysis result through a cucumber type judging program to obtain a cucumber type judging result;
the database update module 10: and the central control module 5 is connected with the central control module and is used for updating the standard cucumber type database according to the obtained cucumber type judgment result and the spectral image of the cucumber to be identified through the database updating program to obtain the cucumber type identification database.
The present invention provides a cucumber fruit type identification system based on photoelectric technology, and those skilled in the art can also use other steps to implement the system, and the structure diagram of the system provided by the present invention in fig. 1 is only one specific example.
Main scheme and effect description section:
firstly, the cucumber information acquisition and image acquisition module uses a micro device for cucumber image identification: the system comprises an image collector and a system identification platform, wherein the image collector comprises a USB camera, and the system identification platform comprises a data memory, a program memory, an LCD display screen, a USB controller, a USB memory and a USB keyboard; the system identification platform can realize effective connection among operation steps, exchange information, acquire cucumber fruit type information and extract and identify the characteristic information of the cucumber fruit type; the USB controller, the USB memory and the USB keyboard are used as a manual operation interface of the system and are used for providing the functions of adding, deleting, restoring and storing information; the output end of the micro device is respectively connected with the data memory and the LCD screen, the received and processed data is transferred into the data memory for storage, and various processing results in the cucumber image identification process are displayed on the LCD screen.
As shown in fig. 2, the method for identifying cucumber fruit type based on photoelectric technology provided by the embodiment of the present invention includes the following steps:
s101, acquiring cucumber information to be identified by a cucumber information acquisition module through the cucumber information acquisition module to obtain the cucumber information to be identified; collecting a cucumber spectral image to be identified by using a spectral camera through a spectral image collecting module to obtain the cucumber spectral image to be identified;
s102, preprocessing a cucumber spectral image to be identified by using an image preprocessing program through an image preprocessing module to obtain a processed image; analyzing the processed image by using an image analysis program through an image analysis module to obtain an image analysis result;
s103, controlling the operation of each connecting module by using a main control computer through a central control module to ensure the normal operation of each module; acquiring a standard cucumber fruit type image by a standard image acquisition module by using a standard image acquisition program to obtain a standard cucumber fruit type image;
s104, constructing a standard cucumber fruit type database by using a database construction program through a database construction module to obtain the standard cucumber fruit type database; analyzing the obtained image analysis result and a cucumber standard fruit type database by an information analysis module by using an information analysis program to obtain an information analysis result;
s105, judging the cucumber type by the cucumber type judging module according to the obtained information analysis result by utilizing the cucumber type judging program to obtain a cucumber type judging result;
and S106, updating the standard cucumber type database by the database updating module according to the obtained cucumber type judgment result and the spectral image of the cucumber to be identified by using the database updating program to obtain the cucumber type identification database.
As shown in fig. 3, the preprocessing of the cucumber spectral image to be identified by the image preprocessing program provided in the embodiment of the present invention to obtain a processed image includes:
s201, obtaining a plurality of spectral images to be processed, wherein each spectral image to be processed comprises a line number reflecting the size of the image;
s202, finding out a to-be-processed spectral image with the minimum line number in the plurality of to-be-processed spectral images, and taking the to-be-processed spectral image as a reference image;
s203, correcting the plurality of spectral images to be processed according to the minimum line number of the reference image, and taking the corrected spectral images to be processed and the reference image as corrected spectral images;
s204, aiming at each correction version spectral image, obtaining the brightness and the adjustment coefficient of the correction version spectral image, and adjusting the brightness of the correction version spectral image according to the adjustment coefficient to obtain an adjustment version spectral image;
s205, obtaining a calibration formula, and performing spectrum calibration processing on the spectral image of each adjustment version by adopting the calibration formula to obtain a spectrum calibration image;
s206, aiming at each spectrum calibration image, obtaining the spectrum reflectivity of the spectrum calibration image, and smoothing the spectrum calibration image according to the spectrum reflectivity to obtain a smooth spectrum image.
The correcting the plurality of spectral images to be processed according to the minimum number of lines of the reference image provided by the embodiment of the invention comprises the following steps: and for each spectral image to be processed in the plurality of spectral images to be processed, removing the line number of the spectral image to be processed according to the minimum line number, so that the line number of the spectral image to be processed subjected to the removing process is consistent with the minimum line number.
As shown in fig. 4, the adjusting the brightness of the corrected spectral image according to the adjustment coefficient to obtain the adjusted spectral image according to the embodiment of the present invention includes:
s301, obtaining the brightness of each wave band number in all wave band numbers of the corrected version spectrum image, and calculating the average value of the brightness of all the wave band numbers;
s302, calculating an adjusting coefficient of the corrected version image according to the average value;
and S303, adjusting the brightness corresponding to each pixel value in each wave band of the corrected spectral image according to the adjustment coefficient to obtain an adjusted spectral image.
The adjusting of the brightness corresponding to each pixel value in each waveband of the corrected version spectral image according to the adjusting coefficient provided by the embodiment of the invention comprises the following steps:
adjusting by adopting a formula:
ak(i,j)=bk(i,j)×t(i,j);
wherein i is the number of columns of the corrected spectral image, and the value range of i is from 1 to the set value of the number of columns; j is the line number of the spectral image of the correction version, and the value range of j is from 1 to the line number set value;
k is the number of wave bands, and the value range of k is from 1 to the set value of the number of wave bands;
ak(i, j) is the pixel value of the adjusted brightness;
bk(i, j) is the pixel value of the unadjusted brightness;
t (i, j) is an adjustment coefficient, and t (i, j) is calculated by the average value.
As shown in fig. 5, the preprocessing of the cucumber spectral image to be identified by the image preprocessing program provided in the embodiment of the present invention to obtain a processed image further includes: enhancing the smoothed spectral image, comprising:
s401, converting the RGB image into a YUV image to obtain a Y-channel image of the YUV image, wherein the RGB image of the smooth spectrum image is obtained;
s402, extracting an edge image of the Y-channel image through an improved Laplace detection operator to obtain an edge image;
s403, performing edge sharpening on the edge image to obtain an image edge sharpening image;
s404, enhancing the edge information of the image edge sharpening image through improved image enhancement;
s405, converting the Y-channel image of the enhanced image edge image into an RGB image, and outputting the RGB image and the image edge sharpening image to obtain the enhanced image.
The method for extracting the edge image of the Y-channel image through the improved Laplace detection operator to obtain the edge image comprises the following steps:
multiplying gradient of all directions of a Laplace detection operator by n; and multiplying the Laplace detection operator multiplied by n by k in the horizontal and vertical directions.
The embodiment of the invention provides a method for enhancing the edge information of an image edge sharpening image through improved image enhancement, which comprises the following steps:
acquiring a Y-channel image brightness value; acquiring the brightness value of the enhanced Y-channel image by using preset parameters through the brightness value of the Y-channel image and the image edge sharpening image; and according to the brightness value of the enhanced Y-channel image, reducing the brightness of the brightness value exceeding a preset maximum brightness value through a preset parameter, and improving the brightness of the brightness value lower than a preset minimum brightness value.
The edge sharpening method for the edge image to obtain the image edge sharpening image provided by the embodiment of the invention comprises the following steps:
and carrying out edge sharpening on the edge image by adopting a function expression according to the value of the Y-channel data, wherein the function expression is as follows:
Figure BDA0003156413170000111
where x is Y-channel data, m is an amplification factor, x1 is an edge and noise threshold, and x2 is a strong edge threshold.
The method for converting the RGB image into the YUV image and obtaining the Y-channel image of the YUV image provided by the embodiment of the invention has the following formula:
Figure BDA0003156413170000121
as shown in fig. 6, the embodiment of the present invention provides a database operation flow capable of processing and storing different cucumber types. The method comprises the following steps:
(1) collecting cucumber fruit type images;
(2) deleting the abnormal image;
(3) storing the cucumber fruits into a sample library of a database, wherein the sample library is supposed to contain three cucumber fruit types of a, b and c;
(4) preprocessing the image;
(5) carrying out model training to realize the function of dividing the cucumbers in the sample library into different fruit type groups according to different cucumber fruit types and characteristics;
(6) identifying cucumber fruit type images;
(7) identifying a result;
(8) the expert audits;
(9) and outputting different fruit types according to whether each piece of data meets the set fruit type characteristics.
It should be noted that the embodiments of the present invention can be realized by hardware, software, or a combination of software and hardware. The hardware portion may be implemented using dedicated logic; the software portions may be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or specially designed hardware. Those skilled in the art will appreciate that the apparatus and methods described above may be implemented using computer executable instructions and/or embodied in processor control code, such code being provided on a carrier medium such as a disk, CD-or DVD-ROM, programmable memory such as read only memory (firmware), or a data carrier such as an optical or electronic signal carrier, for example. The apparatus and its modules of the present invention may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of hardware circuits and software, e.g., firmware.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A cucumber fruit type identification system based on photoelectric technology is characterized in that the cucumber fruit type identification system based on photoelectric technology comprises:
the cucumber information acquisition module is connected with the central control module and used for acquiring the cucumber information to be identified through the cucumber information acquisition module to obtain the cucumber information to be identified;
the spectral image acquisition module is connected with the central control module and is used for acquiring the cucumber spectral image to be identified through the spectral camera to obtain the cucumber spectral image to be identified;
the image preprocessing module is connected with the central control module and is used for preprocessing the cucumber spectral image to be identified through an image preprocessing program to obtain a processed image;
the image analysis module is connected with the central control module and used for analyzing the processed image through an image analysis program to obtain an image analysis result;
the central control module is connected with the cucumber information acquisition module, the spectral image acquisition module, the image preprocessing module and the image analysis module and is used for controlling the operation of each connecting module through the main control computer so as to ensure the normal operation of each module;
the standard image acquisition module is connected with the central control module and used for acquiring the standard cucumber fruit type image through a standard image acquisition program to obtain a cucumber fruit type standard image;
the database construction module is connected with the central control module and used for constructing a standard fruit type database of the cucumber through a database construction program to obtain the standard fruit type database of the cucumber;
the information analysis module is connected with the central control module and used for analyzing the acquired image analysis result and the cucumber standard fruit type database through an information analysis program to obtain an information analysis result;
the cucumber type judging module is connected with the central control module and used for judging the cucumber type according to the obtained information analysis result through a cucumber type judging program to obtain a cucumber type judging result;
and the database updating module is connected with the central control module and used for updating the standard cucumber type database according to the obtained cucumber type judgment result and the spectral image of the cucumber to be identified through a database updating program to obtain the cucumber type identification database.
2. The cucumber fruit type identification system based on the photoelectric technology as claimed in claim 1, wherein the cucumber information acquisition and image acquisition module is a micro device for cucumber image identification, and comprises an image collector and a system identification platform, wherein the image collector comprises a USB camera, and the system identification platform comprises a data memory, a program memory, an LCD display screen, a USB controller, a USB memory and a USB keyboard; the processor can realize effective connection among the operation steps, exchange information, simultaneously collect the cucumber fruit type information and extract and identify the characteristic information of the cucumber fruit type; the USB controller, the USB memory and the USB keyboard are used as a manual operation interface of the system and are used for providing the functions of adding, deleting, restoring and storing information; the output end of the micro device is respectively connected with the data memory and the LCD screen, the received and processed data is transferred into the data memory for storage, and various processing results in the cucumber image identification process are displayed on the LCD screen.
3. The system for identifying cucumber fruit types based on the photoelectric technology as claimed in claim 1, wherein the preprocessing of the cucumber spectral image to be identified by the image preprocessing program is performed to obtain a processed image, and the preprocessing comprises:
obtaining a plurality of spectral images to be processed, each spectral image to be processed including a number of lines reflecting an image size; finding out a to-be-processed spectral image with the minimum line number in the plurality of to-be-processed spectral images, and taking the to-be-processed spectral image as a reference image; correcting the plurality of spectral images to be processed according to the minimum line number of the reference image, and taking the corrected spectral images to be processed and the reference image as corrected spectral images; aiming at each correction version spectral image, obtaining the brightness and an adjustment coefficient of the correction version spectral image, and adjusting the brightness of the correction version spectral image according to the adjustment coefficient to obtain an adjustment version spectral image; obtaining a calibration formula, and performing spectrum calibration processing on the spectral image of each adjustment version by adopting the calibration formula aiming at the spectral image of each adjustment version to obtain a spectrum calibration image; acquiring the spectral reflectivity of the spectral calibration image aiming at each spectral calibration image, and smoothing the spectral calibration image according to the spectral reflectivity to obtain a smooth spectral image; the smoothed spectral image is enhanced.
The enhancing the smoothed spectral image comprises:
converting the RGB image into a YUV image to obtain a Y-channel image of the YUV image; performing edge image extraction on the Y-channel image through an improved Laplace detection operator to obtain an edge image;
the edge image extraction is carried out on the Y channel image through the improved Laplace detection operator to obtain an edge image, and the method comprises the following steps:
multiplying gradient of all directions of a Laplace detection operator by n;
multiplying the Laplace detection operator multiplied by n by k in the horizontal and vertical directions;
carrying out edge sharpening on the edge image to obtain an image edge sharpening image;
enhancing the edge information of the image edge sharpening image through improved image enhancement;
converting the Y-channel image of the enhanced image edge image into an RGB image, and outputting the RGB image and the image edge sharpening image to obtain an enhanced image;
the edge sharpening is performed on the edge image to obtain an image edge sharpening image, and the method comprises the following steps:
and carrying out edge sharpening on the edge image by adopting a function expression according to the value of the Y-channel data, wherein the function expression is as follows:
Figure FDA0003156413160000031
where x is Y-channel data, m is an amplification factor, x1 is an edge and noise threshold, and x2 is a strong edge threshold.
4. The optoelectronic technology-based cucumber fruit type identification system as claimed in claim 1, wherein the modifying the plurality of spectral images to be processed according to the minimum number of rows of the reference image comprises: and for each spectral image to be processed in the plurality of spectral images to be processed, removing the line number of the spectral image to be processed according to the minimum line number, so that the line number of the spectral image to be processed subjected to the removing process is consistent with the minimum line number.
5. The system for identifying a cucumber fruit type based on the optoelectronic technology as claimed in claim 1, wherein the adjusting the brightness of the modified spectral image according to the adjustment coefficient to obtain the modified spectral image comprises:
obtaining the brightness of each wave band number in all wave band numbers of the corrected version spectrum image, and calculating the average value of the brightness of all the wave band numbers; calculating an adjustment coefficient of the corrected version image according to the average value; and adjusting the brightness corresponding to each pixel value in each wave band of the corrected spectral image according to the adjustment coefficient to obtain the adjusted spectral image.
6. The system for identifying a cucumber fruit type based on the optoelectronic technology as claimed in claim 4, wherein the adjusting the brightness corresponding to each pel value in each band of the modified version of the spectral image according to the adjustment coefficient comprises:
adjusting by adopting a formula: a isk(i,j)=bk(i,j)×t(i,j);
Wherein i is the number of columns of the corrected spectral image, and the value range of i is from 1 to the set value of the number of columns; j is the line number of the spectral image of the correction version, and the value range of j is from 1 to the line number set value;
k is the number of wave bands, and the value range of k is from 1 to the set value of the number of wave bands;
ak(i, j) is the pixel value of the adjusted brightness;
bk(i, j) is the pixel value of the unadjusted brightness;
t (i, j) is an adjustment coefficient, and t (i, j) is calculated by the average value.
7. The cucumber fruit type identification system based on the photoelectric technology as claimed in claim 1, wherein the enhancing the edge information of the image edge sharpening map by the improved image enhancement comprises:
acquiring a Y-channel image brightness value; acquiring the brightness value of the enhanced Y-channel image by using preset parameters through the brightness value of the Y-channel image and the image edge sharpening image; according to the brightness value of the enhanced Y-channel image, brightness reduction processing is carried out on the brightness value exceeding a preset maximum brightness value through a preset parameter, and brightness improvement processing is carried out on the brightness value lower than a preset minimum brightness value;
the RGB image is converted into a YUV image, and a Y-channel image of the YUV image is obtained, wherein the formula is as follows:
Figure FDA0003156413160000041
the database module function includes:
(1) collecting cucumber fruit type images;
(2) deleting the abnormal image;
(3) storing the data into a sample library of a database;
(4) preprocessing the image;
(5) carrying out model training to realize the function of dividing the cucumbers in the sample library into different fruit type groups according to different cucumber fruit types and characteristics;
(6) identifying cucumber fruit type images;
(7) identifying a result;
(8) the expert audits;
(9) and outputting different fruit types according to whether each piece of data meets the set fruit type characteristics.
8. The fruit type identification system based on the optoelectronic technology as claimed in claim 1, wherein the information data processing terminal is used for implementing the fruit type identification system based on the optoelectronic technology as claimed in any one of claims 1 to 7.
9. An optoelectronic technology based cucumber fruit type identification system as claimed in claim 1, wherein the computer program product stored on a computer readable medium comprises a computer readable program for providing a user input interface for applying the optoelectronic technology based cucumber fruit type identification system as claimed in any one of claims 1-7 when executed on an electronic device.
10. An optoelectronic technology-based cucumber fruit type identification system as claimed in claim 1, wherein said computer-readable storage medium stores instructions which, when run on a computer, cause the computer to apply the optoelectronic technology-based cucumber fruit type identification system as claimed in any one of claims 1 to 7.
CN202110777821.6A 2021-07-09 2021-07-09 Cucumber fruit type identification system based on photoelectric technology Pending CN113450281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110777821.6A CN113450281A (en) 2021-07-09 2021-07-09 Cucumber fruit type identification system based on photoelectric technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110777821.6A CN113450281A (en) 2021-07-09 2021-07-09 Cucumber fruit type identification system based on photoelectric technology

Publications (1)

Publication Number Publication Date
CN113450281A true CN113450281A (en) 2021-09-28

Family

ID=77815686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110777821.6A Pending CN113450281A (en) 2021-07-09 2021-07-09 Cucumber fruit type identification system based on photoelectric technology

Country Status (1)

Country Link
CN (1) CN113450281A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104143076A (en) * 2013-05-09 2014-11-12 腾讯科技(深圳)有限公司 Matching method and system for face shape
CN108090883A (en) * 2018-01-04 2018-05-29 中煤航测遥感集团有限公司 High spectrum image preprocess method, device and electronic equipment
CN111210393A (en) * 2020-01-03 2020-05-29 北京理工大学珠海学院 Color image enhancement method and system based on edge extraction and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104143076A (en) * 2013-05-09 2014-11-12 腾讯科技(深圳)有限公司 Matching method and system for face shape
CN108090883A (en) * 2018-01-04 2018-05-29 中煤航测遥感集团有限公司 High spectrum image preprocess method, device and electronic equipment
CN111210393A (en) * 2020-01-03 2020-05-29 北京理工大学珠海学院 Color image enhancement method and system based on edge extraction and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李翠 等: "基于多光谱特征的柑桔品质检测算法研究", 《计算机仿真》 *
邓超 等: "《数字图像处理与模式识别研究》", 30 June 2018 *

Similar Documents

Publication Publication Date Title
CN113689428B (en) Mechanical part stress corrosion detection method and system based on image processing
CN109447945B (en) Quick counting method for basic wheat seedlings based on machine vision and graphic processing
CN113498528A (en) Image defect determining method and device, electronic equipment and storage medium
CN106845326B (en) Glacier identification method based on aviation hyperspectral remote sensing data
CN112308854B (en) Automatic detection method and system for chip surface flaws and electronic equipment
CN108460344A (en) Dynamic area intelligent identifying system in screen and intelligent identification Method
CN110991256A (en) System and method for carrying out age estimation and/or gender identification based on face features
CN113450376A (en) Cotton plant edge detection method based on FPGA
CN114199880A (en) Citrus disease and insect pest real-time detection method based on edge calculation
CN116559111A (en) Sorghum variety identification method based on hyperspectral imaging technology
CN112164030A (en) Method and device for quickly detecting rice panicle grains, computer equipment and storage medium
Al-Mashhadani et al. Autonomous ripeness detection using image processing for an agricultural robotic system
CN117456367A (en) Crop planting area identification method, device, equipment and storage medium
Shire et al. A review paper on: agricultural plant leaf disease detection using image processing
CN113450281A (en) Cucumber fruit type identification system based on photoelectric technology
CN117197479A (en) Image analysis method, device, computer equipment and storage medium applying corn ear outer surface
CN112183554A (en) Automatic road boundary contour extraction method
CN117456198A (en) Power transmission line fault detection method based on improved Yolov5 neural network
Li et al. Research on glass surface quality inspection based on machine vision
CN104463898A (en) Image identification counting system for logistics platform
CN110310274B (en) Plant flower number detection method
CN111445431B (en) Image segmentation method, terminal equipment and computer readable storage medium
CN113627329A (en) Wheat seed hyperspectral image classification method and system based on hybrid convolutional network
CN113627430B (en) Cable number detection method and device and electronic equipment
CN117474815B (en) Hyperspectral image calibration method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210928

RJ01 Rejection of invention patent application after publication